static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)

{

    char buffer[PATH_MAX];

    char *path = fs_path->data;



    if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||

        (fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||

        (fs_ctx->export_flags & V9FS_SM_NONE)) {

        return lchown(rpath(fs_ctx, path, buffer),

                      credp->fc_uid, credp->fc_gid);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED) {

        return local_set_xattr(rpath(fs_ctx, path, buffer), credp);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    }

    return -1;

}

static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)

{

    char buffer[PATH_MAX];

    char *path = fs_path->data;



    if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||

        (fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||

        (fs_ctx->export_flags & V9FS_SM_NONE)) {

        return lchown(rpath(fs_ctx, path, buffer),

                      credp->fc_uid, credp->fc_gid);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED) {

        return local_set_xattr(rpath(fs_ctx, path, buffer), credp);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    }

    return -1;

}

static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)

{

    char VAR_3[PATH_MAX];

    char *VAR_4 = VAR_1->data;



    if ((VAR_2->fc_uid == -1 && VAR_2->fc_gid == -1) ||

        (VAR_0->export_flags & V9FS_SM_PASSTHROUGH) ||

        (VAR_0->export_flags & V9FS_SM_NONE)) {

        return lchown(rpath(VAR_0, VAR_4, VAR_3),

                      VAR_2->fc_uid, VAR_2->fc_gid);

    } else if (VAR_0->export_flags & V9FS_SM_MAPPED) {

        return local_set_xattr(rpath(VAR_0, VAR_4, VAR_3), VAR_2);

    } else if (VAR_0->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(VAR_0, VAR_4, VAR_2);

    }

    return -1;

}

static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)
{ char VAR_3[PATH_MAX]; char *VAR_4 = VAR_1->data; if ((VAR_2->fc_uid == -1 && VAR_2->fc_gid == -1) ||
(VAR_0->export_flags & V9FS_SM_PASSTHROUGH) ||
(VAR_0->export_flags & V9FS_SM_NONE)) { return lchown(rpath(VAR_0, VAR_4, VAR_3),
VAR_2->fc_uid, VAR_2->fc_gid); } else if (VAR_0->export_flags & V9FS_SM_MAPPED) { return local_set_xattr(rpath(VAR_0, VAR_4, VAR_3), VAR_2); } else if (VAR_0->export_flags & V9FS_SM_MAPPED_FILE) { return local_set_mapped_file_attr(VAR_0, VAR_4, VAR_2); } return -1; }