summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss
diff options
context:
space:
mode:
authorTrond Myklebust2013-08-27 01:23:04 +0200
committerTrond Myklebust2013-08-30 15:19:36 +0200
commitc2190661039b3817b4cc1cbfea620b3f7dbe5cd8 (patch)
tree61b8f6f287993f604c3a7843aa2322c36f375af9 /net/sunrpc/auth_gss
parentRPCSEC_GSS: Clean up upcall message allocation (diff)
downloadkernel-qcow2-linux-c2190661039b3817b4cc1cbfea620b3f7dbe5cd8.tar.gz
kernel-qcow2-linux-c2190661039b3817b4cc1cbfea620b3f7dbe5cd8.tar.xz
kernel-qcow2-linux-c2190661039b3817b4cc1cbfea620b3f7dbe5cd8.zip
SUNRPC: Replace clnt->cl_principal
The clnt->cl_principal is being used exclusively to store the service target name for RPCSEC_GSS/krb5 callbacks. Replace it with something that is stored only in the RPCSEC_GSS-specific code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index b62812a224a8..672a67ff6449 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -864,8 +864,9 @@ static int gss_pipes_dentries_create_net(struct rpc_clnt *clnt,
* parameters based on the input flavor (which must be a pseudoflavor)
*/
static struct rpc_auth *
-gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
+gss_create(struct rpc_auth_create_args *args, struct rpc_clnt *clnt)
{
+ rpc_authflavor_t flavor = args->pseudoflavor;
struct gss_auth *gss_auth;
struct rpc_auth * auth;
int err = -ENOMEM; /* XXX? */
@@ -877,8 +878,8 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL)))
goto out_dec;
gss_auth->target_name = NULL;
- if (clnt->cl_principal) {
- gss_auth->target_name = kstrdup(clnt->cl_principal, GFP_KERNEL);
+ if (args->target_name) {
+ gss_auth->target_name = kstrdup(args->target_name, GFP_KERNEL);
if (gss_auth->target_name == NULL)
goto err_free;
}