Revision f7613bee hw/virtio-9p-local.c
b/hw/virtio-9p-local.c | ||
---|---|---|
240 | 240 |
|
241 | 241 |
} |
242 | 242 |
|
243 |
static int local_chown(FsContext *ctx, const char *path, uid_t uid, gid_t gid)
|
|
243 |
static int local_chown(FsContext *fs_ctx, const char *path, FsCred *credp)
|
|
244 | 244 |
{ |
245 |
return chown(rpath(ctx, path), uid, gid); |
|
245 |
if (fs_ctx->fs_sm == SM_MAPPED) { |
|
246 |
return local_set_xattr(rpath(fs_ctx, path), credp); |
|
247 |
} else if (fs_ctx->fs_sm == SM_PASSTHROUGH) { |
|
248 |
return lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid); |
|
249 |
} |
|
250 |
return -1; |
|
246 | 251 |
} |
247 | 252 |
|
248 | 253 |
static int local_utime(FsContext *ctx, const char *path, |
Also available in: Unified diff