Commit 91fe39d3 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Linus Torvalds

knfsd: nfsd: display export secinfo information

Add secinfo information to the display in proc/net/sunrpc/nfsd.export/content.
Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ac34cdb0
...@@ -641,6 +641,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) ...@@ -641,6 +641,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
static void exp_flags(struct seq_file *m, int flag, int fsid, static void exp_flags(struct seq_file *m, int flag, int fsid,
uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fslocs); uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fslocs);
static void show_secinfo(struct seq_file *m, struct svc_export *exp);
static int svc_export_show(struct seq_file *m, static int svc_export_show(struct seq_file *m,
struct cache_detail *cd, struct cache_detail *cd,
...@@ -670,6 +671,7 @@ static int svc_export_show(struct seq_file *m, ...@@ -670,6 +671,7 @@ static int svc_export_show(struct seq_file *m,
seq_printf(m, "%02x", exp->ex_uuid[i]); seq_printf(m, "%02x", exp->ex_uuid[i]);
} }
} }
show_secinfo(m, exp);
} }
seq_puts(m, ")\n"); seq_puts(m, ")\n");
return 0; return 0;
...@@ -1467,6 +1469,33 @@ static void show_expflags(struct seq_file *m, int flags, int mask) ...@@ -1467,6 +1469,33 @@ static void show_expflags(struct seq_file *m, int flags, int mask)
} }
} }
static void show_secinfo_flags(struct seq_file *m, int flags)
{
seq_printf(m, ",");
show_expflags(m, flags, NFSEXP_SECINFO_FLAGS);
}
static void show_secinfo(struct seq_file *m, struct svc_export *exp)
{
struct exp_flavor_info *f;
struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors;
int lastflags = 0, first = 0;
if (exp->ex_nflavors == 0)
return;
for (f = exp->ex_flavors; f < end; f++) {
if (first || f->flags != lastflags) {
if (!first)
show_secinfo_flags(m, lastflags);
seq_printf(m, ",sec=%d", f->pseudoflavor);
lastflags = f->flags;
} else {
seq_printf(m, ":%d", f->pseudoflavor);
}
}
show_secinfo_flags(m, lastflags);
}
static void exp_flags(struct seq_file *m, int flag, int fsid, static void exp_flags(struct seq_file *m, int flag, int fsid,
uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc) uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment