search for: resolver_st

Displaying 17 results from an estimated 17 matches for "resolver_st".

Did you mean: resolver's
2016 Jan 21
0
[PATCH v3 1/6] daemon: Rename daemon/command.c -> daemon/sh.c.
...-#include "actions.h" - -#include "ignore-value.h" - -GUESTFSD_EXT_CMD(str_cp, cp); -GUESTFSD_EXT_CMD(str_mount, mount); -GUESTFSD_EXT_CMD(str_umount, umount); - -#ifdef HAVE_ATTRIBUTE_CLEANUP -#define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state))) -#define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state))) -#else -#define CLEANUP_BIND_STATE -#define CLEANUP_RESOLVER_STATE -#endif - -struct bind_state { - bool mounted; - char *sysroot_dev; - char *sysroot_dev_pts; - char *sysroot_proc; - char *sysroot_selinux; - char *sysroot_sys; - char *sysroot...
2015 Dec 02
3
[PATCH] daemon: improve internal commandrvf
...0c..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 stdin for the command, since we want - * to make sure processes have an open stdin, and it is not - * possible to rely on...
2015 Dec 02
0
Re: [PATCH] daemon: improve internal commandrvf
...; +++ 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 stdin for the command, since we want > - * to make sure processes have an open stdin, and i...
2015 Nov 19
5
[PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
....h> #include "guestfs_protocol.h" #include "daemon.h" @@ -242,7 +244,7 @@ do_command (char *const *argv) { char *out; CLEANUP_FREE char *err = NULL; - int r; + int r, fd, flags; CLEANUP_BIND_STATE struct bind_state bind_state = { .mounted = false }; CLEANUP_RESOLVER_STATE struct resolver_state resolver_state = { .mounted = false }; @@ -259,6 +261,17 @@ do_command (char *const *argv) return NULL; } + /* Provide /dev/null as stdin for the command, since we want + * to make sure processes have an open stdin, and it is not + * possible to rely on...
2015 Nov 20
0
Re: [PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
...uot; > #include "daemon.h" > @@ -242,7 +244,7 @@ do_command (char *const *argv) > { > char *out; > CLEANUP_FREE char *err = NULL; > - int r; > + int r, fd, flags; > CLEANUP_BIND_STATE struct bind_state bind_state = { .mounted = false }; > CLEANUP_RESOLVER_STATE struct resolver_state resolver_state = > { .mounted = false }; > @@ -259,6 +261,17 @@ do_command (char *const *argv) > return NULL; > } > > + /* Provide /dev/null as stdin for the command, since we want > + * to make sure processes have an open stdin, and i...
2014 Jan 28
3
[PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.
...r *sysroot_dev; char *sysroot_dev_pts; char *sysroot_proc; + char *sysroot_selinux; char *sysroot_sys; char *sysroot_sys_fs_selinux; - bool dev_ok, dev_pts_ok, proc_ok, sys_ok, sys_fs_selinux_ok; + bool dev_ok, dev_pts_ok, proc_ok, selinux_ok, sys_ok, sys_fs_selinux_ok; }; struct resolver_state { @@ -76,16 +77,18 @@ bind_mount (struct bind_state *bs) bs->sysroot_dev = sysroot_path ("/dev"); bs->sysroot_dev_pts = sysroot_path ("/dev/pts"); bs->sysroot_proc = sysroot_path ("/proc"); + bs->sysroot_selinux = sysroot_path ("/selinux&q...
2014 Jan 28
0
Re: [PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.
...gt; char *sysroot_proc; > + char *sysroot_selinux; > char *sysroot_sys; > char *sysroot_sys_fs_selinux; > - bool dev_ok, dev_pts_ok, proc_ok, sys_ok, sys_fs_selinux_ok; > + bool dev_ok, dev_pts_ok, proc_ok, selinux_ok, sys_ok, > sys_fs_selinux_ok; }; > > struct resolver_state { > @@ -76,16 +77,18 @@ bind_mount (struct bind_state *bs) > bs->sysroot_dev = sysroot_path ("/dev"); > bs->sysroot_dev_pts = sysroot_path ("/dev/pts"); > bs->sysroot_proc = sysroot_path ("/proc"); > + bs->sysroot_selinux = sysro...
2014 Jan 19
1
[PATCH] daemon: add missing GUESTFSD_EXT_CMD usage
...nd.c index 02e1dd4..066c773 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -30,6 +30,7 @@ #include "ignore-value.h" +GUESTFSD_EXT_CMD(str_cp, cp); GUESTFSD_EXT_CMD(str_mount, mount); GUESTFSD_EXT_CMD(str_umount, umount); @@ -179,7 +180,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs) /* Now that the guest's <sysroot>/etc/resolv.conf is out the way, we * can create our own copy of the appliance /etc/resolv.conf. */ - ignore_value (command (NULL, NULL, "cp", "/etc/resolv.conf", + ignore_value (command (NULL, NULL, str_cp, "/...
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
2016 Jan 21
8
[PATCH v3 0/6] [FOR COMMENTS ONLY] Rework inspection.
For background on this change, see: https://rwmj.wordpress.com/2015/12/06/inspection-now-with-added-prolog/ v2 was previously posted here: https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html To test this patch series on a real guest, you can do: $ ./run guestfish -v -x -a /var/tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection
2014 Jan 24
2
[PATCH 0/2] Implement virt-builder --selinux-relabel option.
Do SELinux relabelling properly.
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
..._chunk *) chunk)) { fprintf (stderr, "guestfsd: send_chunk: failed to encode chunk\n"); xdr_destroy (&xdr); diff --git a/daemon/sh.c b/daemon/sh.c index c4efa5b..94f348b 100644 --- a/daemon/sh.c +++ b/daemon/sh.c @@ -160,6 +160,7 @@ static int set_up_etc_resolv_conf (struct resolver_state *rs) { struct stat statbuf; + CLEANUP_FREE char *buf = NULL; rs->sysroot_etc_resolv_conf_old = NULL; @@ -174,11 +175,11 @@ set_up_etc_resolv_conf (struct resolver_state *rs) * that on Ubuntu it's a dangling symlink. */ if (lstat (rs->sysroot_etc_resolv_conf, &amp...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
.../daemon/sh.c @@ -32,10 +32,6 @@ #include "ignore-value.h" -GUESTFSD_EXT_CMD(str_cp, cp); -GUESTFSD_EXT_CMD(str_mount, mount); -GUESTFSD_EXT_CMD(str_umount, umount); - #ifdef HAVE_ATTRIBUTE_CLEANUP #define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state))) #define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state))) @@ -100,20 +96,20 @@ bind_mount (struct bind_state *bs) * However I have not found a reliable way to unmount the same set * of directories (umount -R does NOT work). */ - r = command (NULL, NULL, str_mount, "--bind", "/dev...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...nd_mount (struct bind_state *bs) static inline void umount_ignore_fail (const char *path) { - ignore_value (command (NULL, NULL, str_umount, path, NULL)); + ignore_value (command (NULL, NULL, "umount", path, NULL)); } static void @@ -205,7 +203,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs) /* Now that the guest's <sysroot>/etc/resolv.conf is out the way, we * can create our own copy of the appliance /etc/resolv.conf. */ - ignore_value (command (NULL, NULL, str_cp, "/etc/resolv.conf", + ignore_value (command (NULL, NULL, "cp", "/...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’