From: Andrew Deason Date: Fri, 2 Dec 2011 22:06:42 +0000 (-0600) Subject: fuse: Add -oallow_other by default where possible X-Git-Tag: upstream/1.8.0_pre1^2~2906 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=83d3084e95ac025660f0b8064f49400eb94bfb60;p=packages%2Fo%2Fopenafs.git fuse: Add -oallow_other by default where possible By default, fuse mountpoints are only accessible by the same uid as that which mounted the fuse filesystem. When we're running as root, specify -oallow_other so by default anyone can access the afs mountpoint. Change-Id: Idc732a22136fbe6bc585b76ac6291d8518f1f9de Reviewed-on: http://gerrit.openafs.org/6390 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afsd/afsd_fuse.c b/src/afsd/afsd_fuse.c index 1bf5e86e8..de80b520e 100644 --- a/src/afsd/afsd_fuse.c +++ b/src/afsd/afsd_fuse.c @@ -545,6 +545,12 @@ main(int argc, char **argv) * in df/mount/mnttab/etc output. */ fuse_opt_add_arg(&fuse_args, "-ouse_ino,fsname=AFS"); + if (getuid() == 0) { + /* allow other users to access the mountpoint. only do this for + * root, since non-root may or may not be able to do this */ + fuse_opt_add_arg(&fuse_args, "-oallow_other"); + } + code = uafs_Setup("/afs"); if (code) { errno = code;