提交 19e7b8d2 编写于 作者: T Trond Myklebust

NFS: Clean up nfs_parse_security_flavors()

Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 74c98811
...@@ -1032,49 +1032,50 @@ static int nfs_parse_security_flavors(char *value, ...@@ -1032,49 +1032,50 @@ static int nfs_parse_security_flavors(char *value,
struct nfs_parsed_mount_data *mnt) struct nfs_parsed_mount_data *mnt)
{ {
substring_t args[MAX_OPT_ARGS]; substring_t args[MAX_OPT_ARGS];
rpc_authflavor_t pseudoflavor;
dfprintk(MOUNT, "NFS: parsing sec=%s option\n", value); dfprintk(MOUNT, "NFS: parsing sec=%s option\n", value);
switch (match_token(value, nfs_secflavor_tokens, args)) { switch (match_token(value, nfs_secflavor_tokens, args)) {
case Opt_sec_none: case Opt_sec_none:
mnt->auth_flavors[0] = RPC_AUTH_NULL; pseudoflavor = RPC_AUTH_NULL;
break; break;
case Opt_sec_sys: case Opt_sec_sys:
mnt->auth_flavors[0] = RPC_AUTH_UNIX; pseudoflavor = RPC_AUTH_UNIX;
break; break;
case Opt_sec_krb5: case Opt_sec_krb5:
mnt->auth_flavors[0] = RPC_AUTH_GSS_KRB5; pseudoflavor = RPC_AUTH_GSS_KRB5;
break; break;
case Opt_sec_krb5i: case Opt_sec_krb5i:
mnt->auth_flavors[0] = RPC_AUTH_GSS_KRB5I; pseudoflavor = RPC_AUTH_GSS_KRB5I;
break; break;
case Opt_sec_krb5p: case Opt_sec_krb5p:
mnt->auth_flavors[0] = RPC_AUTH_GSS_KRB5P; pseudoflavor = RPC_AUTH_GSS_KRB5P;
break; break;
case Opt_sec_lkey: case Opt_sec_lkey:
mnt->auth_flavors[0] = RPC_AUTH_GSS_LKEY; pseudoflavor = RPC_AUTH_GSS_LKEY;
break; break;
case Opt_sec_lkeyi: case Opt_sec_lkeyi:
mnt->auth_flavors[0] = RPC_AUTH_GSS_LKEYI; pseudoflavor = RPC_AUTH_GSS_LKEYI;
break; break;
case Opt_sec_lkeyp: case Opt_sec_lkeyp:
mnt->auth_flavors[0] = RPC_AUTH_GSS_LKEYP; pseudoflavor = RPC_AUTH_GSS_LKEYP;
break; break;
case Opt_sec_spkm: case Opt_sec_spkm:
mnt->auth_flavors[0] = RPC_AUTH_GSS_SPKM; pseudoflavor = RPC_AUTH_GSS_SPKM;
break; break;
case Opt_sec_spkmi: case Opt_sec_spkmi:
mnt->auth_flavors[0] = RPC_AUTH_GSS_SPKMI; pseudoflavor = RPC_AUTH_GSS_SPKMI;
break; break;
case Opt_sec_spkmp: case Opt_sec_spkmp:
mnt->auth_flavors[0] = RPC_AUTH_GSS_SPKMP; pseudoflavor = RPC_AUTH_GSS_SPKMP;
break; break;
default: default:
return 0; return 0;
} }
mnt->flags |= NFS_MOUNT_SECFLAVOUR; mnt->flags |= NFS_MOUNT_SECFLAVOUR;
mnt->auth_flavor_len = 1; nfs_set_auth_parsed_mount_data(mnt, pseudoflavor);
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册