Displaying 7 results from an estimated 7 matches for "dev_null_fd".
2015 Dec 02
3
[PATCH] daemon: improve internal commandrvf
...+--------
3 files changed, 34 insertions(+), 23 deletions(-)
diff --git a/daemon/command.c b/daemon/command.c
index 27a4d0c..c4efa5b 100644
--- a/daemon/command.c
+++ b/daemon/command.c
@@ -244,7 +244,7 @@ do_command (char *const *argv)
{
char *out;
CLEANUP_FREE char *err = NULL;
- int r, dev_null_fd, flags;
+ int r, flags;
CLEANUP_BIND_STATE struct bind_state bind_state = { .mounted = false };
CLEANUP_RESOLVER_STATE struct resolver_state resolver_state =
{ .mounted = false };
@@ -261,17 +261,6 @@ do_command (char *const *argv)
return NULL;
}
- /* Provide /dev/null as std...
2015 Dec 02
0
Re: [PATCH] daemon: improve internal commandrvf
...eletions(-)
>
> diff --git a/daemon/command.c b/daemon/command.c
> index 27a4d0c..c4efa5b 100644
> --- a/daemon/command.c
> +++ b/daemon/command.c
> @@ -244,7 +244,7 @@ do_command (char *const *argv)
> {
> char *out;
> CLEANUP_FREE char *err = NULL;
> - int r, dev_null_fd, flags;
> + int r, flags;
> CLEANUP_BIND_STATE struct bind_state bind_state = { .mounted = false };
> CLEANUP_RESOLVER_STATE struct resolver_state resolver_state =
> { .mounted = false };
> @@ -261,17 +261,6 @@ do_command (char *const *argv)
> return NULL;
>...
2017 Nov 18
2
Dovecots header files not optimized for external plugins
...y has a C++ interface.
== Source 1
/* g++-7 -c a.cpp */
#include <byteswap.h>
#include <dovecot/lib.h>
#include <dovecot/auth-request.h>
#include <dovecot/passdb.h>
static enum passdb_result
authdb_mapi_logon(struct auth_request *rq, const char *password)
{
int x = dev_null_fd + bswap_16(1);
}
== Problems 1
/usr/include/dovecot/compat.h:45:4: error: #error uoff_t size not set
# error uoff_t size not set
== Source 2
/* g++-7 -DHAVE_CONFIG_H -c a.cpp */
#include "config.h" /* generated by my configure */
#include <byteswap.h>
#include <dovecot/lib.h&...
2015 Nov 20
0
Re: [PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
...d;
> +
> CHROOT_IN;
> - r = commandv (&out, &err, (const char * const *) argv);
> + r = commandvf (&out, &err, flags, (const char * const *) argv);
> CHROOT_OUT;
>
> free_bind_state (&bind_state);
Looks good. How about naming the variable 'dev_null_fd' or something,
so we know it's not just a temporary file descriptor variable?
Anyway, ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests wit...
2017 Nov 19
0
Dovecots header files not optimized for external plugins
...t in);
Try #undef bswap_16 (and others)? We have a patch pending that does these #undefs to fix compiling issue with uclibc-ng - maybe a similar problem.
> == Other problems
> dovecot headers files are missing 'extern "C"' lines.
> This means the linkage of symbols like dev_null_fd is not what it should be.
> I can't use
> extern "C" {
> #include <dovecot/...>
> }
> either because then the standardy library headers that are included
> by dovecot headers can easily start acting up too.
lucene-wrapper.cc seems to compile fine with this..
2015 Nov 19
5
[PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
When running commands in the mounted guest (using the "command" API, and
APIs based on it), provide the /dev/null from the appliance as open fd
for stdin. Commands usually assume stdin is open if they didn't close
it explicitly, so this should avoid crashes or misbehavings due to that.
---
daemon/command.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
2015 Dec 05
6
[PATCH 0/6 v2] [FOR COMMENTS ONLY] Rework inspection.
This is a more working version. Inspection (partially) succeeds on a
real guest this time :-)
You can test it out on a real guest (in this case, a CentOS disk image
located at /tmp/centos-6.img) by doing:
$ ./run guestfish -v -x -a /tmp/centos-6.img
><fs> run
><fs> debug sh "guestfs-inspection --verbose"
which will print lots of debugging, and at the end the