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: openafs-stable-1_8_0pre1~2906 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=83d3084e95ac025660f0b8064f49400eb94bfb60;hp=3ca42749357edc97922918d04558deb268fe78f0 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 1bf5e86..de80b52 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;