mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-28 20:02:36 -04:00
Merge branch 'pr/glnx-no-chown' into 'master'
glnx_file_copy_at: Add GLNX_FILE_COPY_NOCHOWN See merge request GNOME/libglnx!22
This commit is contained in:
@@ -1000,8 +1000,11 @@ glnx_file_copy_at (int src_dfd,
|
||||
if (glnx_regfile_copy_bytes (src_fd, tmp_dest.fd, (off_t) -1) < 0)
|
||||
return glnx_throw_errno_prefix (error, "regfile copy");
|
||||
|
||||
if (fchown (tmp_dest.fd, src_stbuf->st_uid, src_stbuf->st_gid) != 0)
|
||||
return glnx_throw_errno_prefix (error, "fchown");
|
||||
if (!(copyflags & GLNX_FILE_COPY_NOCHOWN))
|
||||
{
|
||||
if (fchown (tmp_dest.fd, src_stbuf->st_uid, src_stbuf->st_gid) != 0)
|
||||
return glnx_throw_errno_prefix (error, "fchown");
|
||||
}
|
||||
|
||||
if (!(copyflags & GLNX_FILE_COPY_NOXATTRS))
|
||||
{
|
||||
|
||||
@@ -189,7 +189,8 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes);
|
||||
typedef enum {
|
||||
GLNX_FILE_COPY_OVERWRITE = (1 << 0),
|
||||
GLNX_FILE_COPY_NOXATTRS = (1 << 1),
|
||||
GLNX_FILE_COPY_DATASYNC = (1 << 2)
|
||||
GLNX_FILE_COPY_DATASYNC = (1 << 2),
|
||||
GLNX_FILE_COPY_NOCHOWN = (1 << 3)
|
||||
} GLnxFileCopyFlags;
|
||||
|
||||
gboolean
|
||||
|
||||
Reference in New Issue
Block a user