diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-26 19:23:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-30 09:19:36 -0400 |
commit | c2190661039b3817b4cc1cbfea620b3f7dbe5cd8 (patch) | |
tree | 61b8f6f287993f604c3a7843aa2322c36f375af9 /net/sunrpc/auth_gss/auth_gss.c | |
parent | bd4a3eb15bb42296e61d0fd16f2c7f8cc171b681 (diff) |
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/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 7 |
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, | |||
864 | * parameters based on the input flavor (which must be a pseudoflavor) | 864 | * parameters based on the input flavor (which must be a pseudoflavor) |
865 | */ | 865 | */ |
866 | static struct rpc_auth * | 866 | static struct rpc_auth * |
867 | gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) | 867 | gss_create(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) |
868 | { | 868 | { |
869 | rpc_authflavor_t flavor = args->pseudoflavor; | ||
869 | struct gss_auth *gss_auth; | 870 | struct gss_auth *gss_auth; |
870 | struct rpc_auth * auth; | 871 | struct rpc_auth * auth; |
871 | int err = -ENOMEM; /* XXX? */ | 872 | int err = -ENOMEM; /* XXX? */ |
@@ -877,8 +878,8 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) | |||
877 | if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL))) | 878 | if (!(gss_auth = kmalloc(sizeof(*gss_auth), GFP_KERNEL))) |
878 | goto out_dec; | 879 | goto out_dec; |
879 | gss_auth->target_name = NULL; | 880 | gss_auth->target_name = NULL; |
880 | if (clnt->cl_principal) { | 881 | if (args->target_name) { |
881 | gss_auth->target_name = kstrdup(clnt->cl_principal, GFP_KERNEL); | 882 | gss_auth->target_name = kstrdup(args->target_name, GFP_KERNEL); |
882 | if (gss_auth->target_name == NULL) | 883 | if (gss_auth->target_name == NULL) |
883 | goto err_free; | 884 | goto err_free; |
884 | } | 885 | } |