core: Work around libguestfs/FUSE issue with setuid binaries

For some reason, the setuid bits are being stripped.  This
workaround is enough for now.
This commit is contained in:
Colin Walters 2013-07-26 14:48:15 -04:00
parent 5aea9db3f2
commit 74b2c7aab3
1 changed files with 10 additions and 0 deletions

View File

@ -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))
{