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

{

    char *buffer;

    int ret = -1;

    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)) {

        buffer = rpath(fs_ctx, path);

        ret = lchown(buffer, credp->fc_uid, credp->fc_gid);

        g_free(buffer);

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

        buffer = rpath(fs_ctx, path);

        ret = local_set_xattr(buffer, credp);

        g_free(buffer);

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

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    }

    return ret;

}

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

{

    char *buffer;

    int ret = -1;

    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)) {

        buffer = rpath(fs_ctx, path);

        ret = lchown(buffer, credp->fc_uid, credp->fc_gid);

        g_free(buffer);

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

        buffer = rpath(fs_ctx, path);

        ret = local_set_xattr(buffer, credp);

        g_free(buffer);

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

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    }

    return ret;

}

    char *buffer;     char *path = fs_path->data;         buffer = rpath(fs_ctx, path);         ret = lchown(buffer, credp->fc_uid, credp->fc_gid);         g_free(buffer);         buffer = rpath(fs_ctx, path);         ret = local_set_xattr(buffer, credp);         g_free(buffer);         return local_set_mapped_file_attr(fs_ctx, path, credp);
static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)

{

    char *VAR_3;

    int VAR_4 = -1;

    char *VAR_5 = 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)) {

        VAR_3 = rpath(VAR_0, VAR_5);

        VAR_4 = lchown(VAR_3, VAR_2->fc_uid, VAR_2->fc_gid);

        g_free(VAR_3);

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

        VAR_3 = rpath(VAR_0, VAR_5);

        VAR_4 = local_set_xattr(VAR_3, VAR_2);

        g_free(VAR_3);

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

        return local_set_mapped_file_attr(VAR_0, VAR_5, VAR_2);

    }

    return VAR_4;

}

static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1, FsCred *VAR_2)
{ char *VAR_3; int VAR_4 = -1; char *VAR_5 = 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)) { VAR_3 = rpath(VAR_0, VAR_5); VAR_4 = lchown(VAR_3, VAR_2->fc_uid, VAR_2->fc_gid); g_free(VAR_3); } else if (VAR_0->export_flags & V9FS_SM_MAPPED) { VAR_3 = rpath(VAR_0, VAR_5); VAR_4 = local_set_xattr(VAR_3, VAR_2); g_free(VAR_3); } else if (VAR_0->export_flags & V9FS_SM_MAPPED_FILE) { return local_set_mapped_file_attr(VAR_0, VAR_5, VAR_2); } return VAR_4; }