NFSv4: Ensure non-root user can trigger a referral automount
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 2 Feb 2007 23:56:06 +0000 (15:56 -0800)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 3 Feb 2007 23:35:10 +0000 (15:35 -0800)
Currently only root can trigger a referral automount because only root
can access rpc_pipefs directories. Enabling read access to non-root
should be harmless (they can still not access the pipes themselves)
and will suffice to fix this problem.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpc_pipe.c

index 89273d3..0812828 100644 (file)
@@ -589,7 +589,7 @@ __rpc_mkdir(struct inode *dir, struct dentry *dentry)
 {
        struct inode *inode;
 
-       inode = rpc_get_inode(dir->i_sb, S_IFDIR | S_IRUSR | S_IXUSR);
+       inode = rpc_get_inode(dir->i_sb, S_IFDIR | S_IRUGO | S_IXUGO);
        if (!inode)
                goto out_err;
        inode->i_ino = iunique(dir->i_sb, 100);