Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30116
b: refs/heads/master
c: 81039f1
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 9, 2006
1 parent ea75b9a commit 19514f2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7b422b17ee5ee4920e8ae24a6ad04bf3481ce72
refs/heads/master: 81039f1f204a0fd2952112a240284e114f1a25e6
29 changes: 29 additions & 0 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,34 @@ static int nfs_statfs(struct super_block *sb, struct kstatfs *buf)

}

static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour)
{
static struct {
rpc_authflavor_t flavour;
const char *str;
} sec_flavours[] = {
{ RPC_AUTH_NULL, "null" },
{ RPC_AUTH_UNIX, "sys" },
{ RPC_AUTH_GSS_KRB5, "krb5" },
{ RPC_AUTH_GSS_KRB5I, "krb5i" },
{ RPC_AUTH_GSS_KRB5P, "krb5p" },
{ RPC_AUTH_GSS_LKEY, "lkey" },
{ RPC_AUTH_GSS_LKEYI, "lkeyi" },
{ RPC_AUTH_GSS_LKEYP, "lkeyp" },
{ RPC_AUTH_GSS_SPKM, "spkm" },
{ RPC_AUTH_GSS_SPKMI, "spkmi" },
{ RPC_AUTH_GSS_SPKMP, "spkmp" },
{ -1, "unknown" }
};
int i;

for (i=0; sec_flavours[i].flavour != -1; i++) {
if (sec_flavours[i].flavour == flavour)
break;
}
return sec_flavours[i].str;
}

/*
* Describe the mount options in force on this server representation
*/
Expand Down Expand Up @@ -371,6 +399,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
seq_printf(m, ",proto=%s", proto);
seq_printf(m, ",timeo=%lu", 10U * nfss->retrans_timeo / HZ);
seq_printf(m, ",retrans=%u", nfss->retrans_count);
seq_printf(m, ",sec=%s", nfs_pseudoflavour_to_name(nfss->client->cl_auth->au_flavor));
}

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/sunrpc/auth_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ struct rpc_auth null_auth = {
.au_cslack = 4,
.au_rslack = 2,
.au_ops = &authnull_ops,
.au_flavor = RPC_AUTH_NULL,
.au_count = ATOMIC_INIT(0),
};

static
Expand Down
1 change: 1 addition & 0 deletions trunk/net/sunrpc/auth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ struct rpc_auth unix_auth = {
.au_cslack = UNX_WRITESLACK,
.au_rslack = 2, /* assume AUTH_NULL verf */
.au_ops = &authunix_ops,
.au_flavor = RPC_AUTH_UNIX,
.au_count = ATOMIC_INIT(0),
.au_credcache = &unix_cred_cache,
};
Expand Down

0 comments on commit 19514f2

Please sign in to comment.