fuse-overlayfs: shift uid/gid from FUSE ctx

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2018-07-11 10:27:58 +02:00
parent 3c4027da81
commit d8e9ee1299
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED

2
main.c
View File

@ -1750,7 +1750,7 @@ ovl_do_open (fuse_req_t req, fuse_ino_t parent, const char *name, int flags, mod
if (fd < 0)
return -1;
if (fchown (fd, ctx->uid, ctx->gid) < 0)
if (fchown (fd, get_uid (lo, ctx->uid), get_gid (lo, ctx->gid)) < 0)
{
unlinkat (lo->workdir_fd, wd_tmp_file_name, 0);
return -1;