aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4namespace.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2013-03-16 15:54:34 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-03-29 15:42:56 -0400
commitfb15b26f8ba3ff629a052faf3f4a4744585ca2dc (patch)
tree2218a2e577bf075170497549847d49840f296aae /fs/nfs/nfs4namespace.c
parent72f4dc117b57e05120aaac6e218b8abc09a5c350 (diff)
SUNRPC: Define rpcsec_gss_info structure
The NFSv4 SECINFO procedure returns a list of security flavors. Any GSS flavor also has a GSS tuple containing an OID, a quality-of- protection value, and a service value, which specifies a particular GSS pseudoflavor. For simplicity and efficiency, I'd like to return each GSS tuple from the NFSv4 SECINFO XDR decoder and pass it straight into the RPC client. Define a data structure that is visible to both the NFS client and the RPC client. Take structure and field names from the relevant standards to avoid confusion. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4namespace.c')
-rw-r--r--fs/nfs/nfs4namespace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c
index 0dd766079e1c..88231c92317c 100644
--- a/fs/nfs/nfs4namespace.c
+++ b/fs/nfs/nfs4namespace.c
@@ -138,23 +138,23 @@ rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors)
138{ 138{
139 struct gss_api_mech *mech; 139 struct gss_api_mech *mech;
140 struct xdr_netobj oid; 140 struct xdr_netobj oid;
141 int i; 141 unsigned int i;
142 rpc_authflavor_t pseudoflavor = RPC_AUTH_UNIX; 142 rpc_authflavor_t pseudoflavor = RPC_AUTH_UNIX;
143 143
144 for (i = 0; i < flavors->num_flavors; i++) { 144 for (i = 0; i < flavors->num_flavors; i++) {
145 struct nfs4_secinfo_flavor *flavor; 145 struct nfs4_secinfo4 *flavor = &flavors->flavors[i];
146 flavor = &flavors->flavors[i];
147 146
148 if (flavor->flavor == RPC_AUTH_NULL || flavor->flavor == RPC_AUTH_UNIX) { 147 if (flavor->flavor == RPC_AUTH_NULL || flavor->flavor == RPC_AUTH_UNIX) {
149 pseudoflavor = flavor->flavor; 148 pseudoflavor = flavor->flavor;
150 break; 149 break;
151 } else if (flavor->flavor == RPC_AUTH_GSS) { 150 } else if (flavor->flavor == RPC_AUTH_GSS) {
152 oid.len = flavor->gss.sec_oid4.len; 151 oid.len = flavor->flavor_info.oid.len;
153 oid.data = flavor->gss.sec_oid4.data; 152 oid.data = flavor->flavor_info.oid.data;
154 mech = gss_mech_get_by_OID(&oid); 153 mech = gss_mech_get_by_OID(&oid);
155 if (!mech) 154 if (!mech)
156 continue; 155 continue;
157 pseudoflavor = gss_svc_to_pseudoflavor(mech, flavor->gss.service); 156 pseudoflavor = gss_svc_to_pseudoflavor(mech,
157 flavor->flavor_info.service);
158 gss_mech_put(mech); 158 gss_mech_put(mech);
159 break; 159 break;
160 } 160 }