search for: guestfs_free_stat

Displaying 8 results from an estimated 8 matches for "guestfs_free_stat".

2012 Feb 08
2
Fix virt-edit so it preserves permissions (RHBZ#788641)
The first patch preserves file mode, UID, GID and SELinux context across edited files. The second patch adds a useful new command in guestfish ('llz') which shows SELinux context (like 'ls -laZ') that was useful when debugging this. Rich.
2014 Jan 14
0
[PATCH] builder, edit, fish: use copy-attributes
...&selinux_context_size); - /* selinux_context could be NULL. This isn't an error. */ - - guestfs_pop_error_handler (g); - } - - /* Set the permissions (inc. sticky and set*id bits), UID, GID. */ - if (guestfs_chmod (g, stat->mode & 07777, dest) == -1) { - guestfs_free_stat (stat); - return -1; - } - if (guestfs_chown (g, stat->uid, stat->gid, dest) == -1) { - guestfs_free_stat (stat); - return -1; - } - guestfs_free_stat (stat); - - /* Set the SELinux context. */ - if (has_linuxxattrs && selinux_context) { - if (guestfs_setxattr (g, &q...
2012 Feb 10
3
[PATCH 0/3] Fix guestfish edit command.
This is a further, more comprehensive fix for https://bugzilla.redhat.com/show_bug.cgi?id=788641 The guestfish 'edit' command (aka 'emacs', 'vi') suffered from the same problems as virt-edit and more. It could have failed and left a partially overwritten file, and it didn't preserve permissions etc from the original file. These three patches fix all this. The first
2014 Jan 07
8
RFC: copy-attributes command
Hi, attached there is a prototype of patch for adding a new copy-attributes command. Such command would allow copy the attributes of a "file" to another, so for example in guestfish: copy-attributes foo bar permissions:true xattributes:false would only copy the permissions of foo to bar, not copying its extended attributes too. Just few notes: - my first daemon command, so
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...stat *stat; + struct guestfs_statns *stat; struct guestfs_xattr_list *xattrs; char *csum; /* Checksum. If NULL, use file times and size. */ }; @@ -410,7 +410,7 @@ free_tree (struct tree *t) for (i = 0; i < t->nr_files; ++i) { free (t->files[i].path); - guestfs_free_stat (t->files[i].stat); + guestfs_free_statns (t->files[i].stat); guestfs_free_xattr_list (t->files[i].xattrs); free (t->files[i].csum); } @@ -420,7 +420,7 @@ free_tree (struct tree *t) free (t); } -static int visit_entry (const char *dir, const char *name, const struc...
2012 Mar 28
2
[PATCH v2] New APIs: mount-local and umount-local using FUSE
This version doesn't crash or cause hung processes or stuck mountpoints, so that's an improvement. Rich.
2012 Mar 27
3
[PATCH 0/3] Enable FUSE support in the API via 'mount-local' call.
This patch is just for review. It enables FUSE support in the API via two new calls, 'guestfs_mount_local' and 'guestfs_umount_local'. FUSE turns out to be very easy to deadlock (necessitating that the machine be rebooted). Running the test from the third patch is usually an effective way to demonstrate this. However I have not yet managed to produce a simple reproducer that
2012 Mar 29
3
[PATCH v3] New APIs: mount-local, mount-local-run and umount-local using FUSE
This changes the proposed API slightly. Previously 'mount-local' generating a 'mounted' event when the filesystem was ready, and from the 'mounted' event you had to effectively do a fork. Now, 'mount-local' just initializes the mountpoint and you have to call 'mount-local-run' to enter the FUSE main loop. Between these calls you can do a fork or whatever