diff options
-rw-r--r-- | sys/miscfs/fuse/fuse_vfsops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c index 486c50476ed..24bf23f4f82 100644 --- a/sys/miscfs/fuse/fuse_vfsops.c +++ b/sys/miscfs/fuse/fuse_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vfsops.c,v 1.39 2018/06/25 12:03:53 helg Exp $ */ +/* $OpenBSD: fuse_vfsops.c,v 1.40 2018/07/05 15:34:25 mpi Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -98,6 +98,10 @@ fusefs_mount(struct mount *mp, const char *path, void *data, goto bad; } + /* Only root may specify allow_other. */ + if (args->allow_other && (error = suser_ucred(p->p_ucred))) + goto bad; + fmp = malloc(sizeof(*fmp), M_FUSEFS, M_WAITOK | M_ZERO); fmp->mp = mp; fmp->sess_init = PENDING; @@ -107,9 +111,6 @@ fusefs_mount(struct mount *mp, const char *path, void *data, else fmp->max_read = FUSEBUFMAXSIZE; - /* Only root may specify allow_other. */ - if (args->allow_other && (error = suser_ucred(p->p_ucred))) - return (error); fmp->allow_other = args->allow_other; mp->mnt_data = fmp; |