search for: umount_ignore_fail

Displaying 13 results from an estimated 13 matches for "umount_ignore_fail".

2016 Jan 21
0
[PATCH v3 1/6] daemon: Rename daemon/command.c -> daemon/sh.c.
...sys", bs->sysroot_sys, NULL); - bs->sys_ok = r != -1; - r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL); - bs->sys_fs_selinux_ok = r != -1; - - bs->mounted = true; - - return 0; -} - -static inline void -umount_ignore_fail (const char *path) -{ - ignore_value (command (NULL, NULL, str_umount, path, NULL)); -} - -static void -free_bind_state (struct bind_state *bs) -{ - if (bs->mounted) { - if (bs->sys_fs_selinux_ok) umount_ignore_fail (bs->sysroot_sys_fs_selinux); - free (bs->sysroot_sys_fs_selinu...
2014 Jan 28
3
[PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.
...ysroot_sys, NULL); bs->sys_ok = r != -1; r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL); @@ -121,6 +129,8 @@ free_bind_state (struct bind_state *bs) free (bs->sysroot_sys_fs_selinux); if (bs->sys_ok) umount_ignore_fail (bs->sysroot_sys); free (bs->sysroot_sys); + if (bs->selinux_ok) umount_ignore_fail (bs->sysroot_selinux); + free (bs->sysroot_selinux); if (bs->proc_ok) umount_ignore_fail (bs->sysroot_proc); free (bs->sysroot_proc); if (bs->dev_pts_ok) umount_i...
2011 Jun 09
15
[PATCH 00/13] Fix errors found using Coverity static analyzer.
I ran the Coverity static analyzer[1] on libguestfs, and fixed many errors as a result. Coverity found some errors in gnulib, but it doesn't seem to be worth following those up since the version of gnulib we are using is so old. There are a couple more errors (possibly 1 false-positive) which I'm going to send in a separate email. BTW all the errors found by Coverity were in the daemon
2014 Jan 24
2
[PATCH 0/2] Implement virt-builder --selinux-relabel option.
Do SELinux relabelling properly.
2013 Aug 18
3
missing chdir before chroot in guestfsd
daemon.c does just a chroot, without chdir. The result is that pwd does not work correctly (it causes fs/dcache.c:prepend_unreachable() to add the unreachable string). A workaround is to add "cd /" before each sh command. ><fs> mount /dev/sda2 / ><fs> sh "cd / ; chroot / ; /bin/pwd" / ><fs> sh "/bin/pwd" (unreachable)/ ><fs> sh
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
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...ee (file2buf); diff --git a/daemon/command.c b/daemon/command.c index 7c67d83..5839033 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -28,10 +28,13 @@ #include "ignore-value.h" +GUESTFSD_EXT_CMD(str_mount, mount); +GUESTFSD_EXT_CMD(str_umount, umount); + static inline void umount_ignore_fail (const char *path) { - ignore_value (command (NULL, NULL, "umount", path, NULL)); + ignore_value (command (NULL, NULL, str_umount, path, NULL)); } char * @@ -81,15 +84,15 @@ do_command (char *const *argv) return NULL; } - r = command (NULL, NULL, "mount", &quot...
2012 Aug 30
1
[PATCH] collect list of called external commands
...free (file2buf); diff --git a/daemon/command.c b/daemon/command.c index 7c67d83..4ab2432 100644 --- a/daemon/command.c +++ b/daemon/command.c @@ -28,10 +28,13 @@ #include "ignore-value.h" +GUESTFS_EXT_CMD(str_mount, mount); +GUESTFS_EXT_CMD(str_umount, umount); + static inline void umount_ignore_fail (const char *path) { - ignore_value (command (NULL, NULL, "umount", path, NULL)); + ignore_value (command (NULL, NULL, str_umount, path, NULL)); } char * @@ -81,15 +84,15 @@ do_command (char *const *argv) return NULL; } - r = command (NULL, NULL, "mount", &quot...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...sys_fs_selinux, NULL); + r = command (NULL, NULL, "mount", "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL); bs->sys_fs_selinux_ok = r != -1; bs->mounted = true; @@ -124,7 +120,7 @@ bind_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 +201,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs) /* Now that the guest's <sysroot>/etc/r...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...sys_fs_selinux, NULL); + r = command (NULL, NULL, "mount", "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL); bs->sys_fs_selinux_ok = r != -1; bs->mounted = true; @@ -124,7 +122,7 @@ bind_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/r...
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’