From: Miklos Szeredi Date: Fri, 8 Feb 2008 12:21:37 +0000 (-0800) Subject: mount options: fix autofs4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aef97cb9031755422c23cc64f7a089a0fbbcca7a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mount options: fix autofs4 Add uid= and gid= options to /proc/mounts for autofs4 filesystems. Signed-off-by: Miklos Szeredi Acked-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index 7f05d6ccdb13..2fdcf5e1d236 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c @@ -176,11 +176,16 @@ out_kill_sb: static int autofs4_show_options(struct seq_file *m, struct vfsmount *mnt) { struct autofs_sb_info *sbi = autofs4_sbi(mnt->mnt_sb); + struct inode *root_inode = mnt->mnt_sb->s_root->d_inode; if (!sbi) return 0; seq_printf(m, ",fd=%d", sbi->pipefd); + if (root_inode->i_uid != 0) + seq_printf(m, ",uid=%u", root_inode->i_uid); + if (root_inode->i_gid != 0) + seq_printf(m, ",gid=%u", root_inode->i_gid); seq_printf(m, ",pgrp=%d", sbi->oz_pgrp); seq_printf(m, ",timeout=%lu", sbi->exp_timeout/HZ); seq_printf(m, ",minproto=%d", sbi->min_proto);