Revision c79ce737 hw/virtio-9p-local.c

b/hw/virtio-9p-local.c
442 442

  
443 443
static int local_chown(FsContext *fs_ctx, const char *path, FsCred *credp)
444 444
{
445
    if (fs_ctx->fs_sm == SM_MAPPED) {
445
    if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||
446
            (fs_ctx->fs_sm == SM_PASSTHROUGH)) {
447
        return lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid);
448
    } else if (fs_ctx->fs_sm == SM_MAPPED) {
446 449
        return local_set_xattr(rpath(fs_ctx, path), credp);
447 450
    } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {
448 451
        return lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid);

Also available in: Unified diff