static int local_post_create_passthrough(FsContext *fs_ctx, const char *path,

                                         FsCred *credp)

{

    char buffer[PATH_MAX];



    if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {

        return -1;

    }

    if (lchown(rpath(fs_ctx, path, buffer), credp->fc_uid,

                credp->fc_gid) < 0) {

        /*

         * If we fail to change ownership and if we are

         * using security model none. Ignore the error

         */

        if ((fs_ctx->export_flags & V9FS_SEC_MASK) != V9FS_SM_NONE) {

            return -1;

        }

    }

    return 0;

}

static int local_post_create_passthrough(FsContext *fs_ctx, const char *path,

                                         FsCred *credp)

{

    char buffer[PATH_MAX];



    if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {

        return -1;

    }

    if (lchown(rpath(fs_ctx, path, buffer), credp->fc_uid,

                credp->fc_gid) < 0) {

        







        if ((fs_ctx->export_flags & V9FS_SEC_MASK) != V9FS_SM_NONE) {

            return -1;

        }

    }

    return 0;

}

    if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {         return -1;
static int FUNC_0(FsContext *VAR_0, const char *VAR_1,

                                         FsCred *VAR_2)

{

    char VAR_3[PATH_MAX];



    if (chmod(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_mode & 07777) < 0) {

        return -1;

    }

    if (lchown(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_uid,

                VAR_2->fc_gid) < 0) {

        







        if ((VAR_0->export_flags & V9FS_SEC_MASK) != V9FS_SM_NONE) {

            return -1;

        }

    }

    return 0;

}

static int FUNC_0(FsContext *VAR_0, const char *VAR_1,
FsCred *VAR_2)
{ char VAR_3[PATH_MAX]; if (chmod(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_mode & 07777) < 0) { return -1; } if (lchown(rpath(VAR_0, VAR_1, VAR_3), VAR_2->fc_uid,
VAR_2->fc_gid) < 0) { if ((VAR_0->export_flags & V9FS_SEC_MASK) != V9FS_SM_NONE) { return -1; } } return 0; }