[ostree] core: Work around libguestfs/FUSE issue with setuid binaries
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: Work around libguestfs/FUSE issue with setuid binaries
- Date: Fri, 26 Jul 2013 18:49:07 +0000 (UTC)
commit 74b2c7aab357e6d5c5a9e5ace777c6991dac2638
Author: Colin Walters <walters verbum org>
Date: Fri Jul 26 14:48:15 2013 -0400
core: Work around libguestfs/FUSE issue with setuid binaries
For some reason, the setuid bits are being stripped. This
workaround is enough for now.
src/libostree/ostree-core.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index ef9595d..8a98937 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -1245,6 +1245,16 @@ ostree_create_file_from_input (GFile *dest_file,
if (!g_output_stream_close ((GOutputStream*)out, NULL, error))
goto out;
+
+ /* Work around libguestfs/FUSE bug */
+ if (mode & (S_ISUID|S_ISGID))
+ {
+ if (chmod (dest_path, mode) == -1)
+ {
+ ot_util_set_error_from_errno (error, errno);
+ goto out;
+ }
+ }
}
else if (S_ISLNK (mode))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]