Re: [PATCH 3/4] SUNRPC: Add RPC based upcall mechanism for RPCGSS auth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Note also if you rebase to my latest for-3.5 you need something like
the following (untested).

--b.

commit 2cc8f0912880a177eee73e08c4305ac3692b8ff9
Author: J. Bruce Fields <bfields@xxxxxxxxxx>
Date:   Tue May 22 08:44:08 2012 -0400

    client_name->cred.cr_principal

diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 0211265..95104ae 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1182,26 +1182,27 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
 
 		/* get client name */
 		if (ud->client_name.len != 0) {
+			struct svc_cred *cred = &rsci.cred;
 			status = -ENOMEM;
 			/* convert to GSS_NT_HOSTBASED_SERVICE form */
-			rsci.client_name = kstrndup(ud->client_name.data,
+			cred->cr_principal = kstrndup(ud->client_name.data,
 							ud->client_name.len,
 							GFP_KERNEL);
-			if (!rsci.client_name)
+			if (!cred->cr_principal)
 				goto out;
 			/* terminate and remove realm part */
-			c = strchr(rsci.client_name, '@');
+			c = strchr(cred->cr_principal, '@');
 			if (c) {
 				*c = '\0';
 
 				/* change service-hostname delimiter */
-				c = strchr(rsci.client_name, '/');
+				c = strchr(cred->cr_principal, '/');
 				if (c) *c = '@';
 			}
 			if (!c) {
 				/* not a service principal */
-				kfree(rsci.client_name);
-				rsci.client_name = NULL;
+				kfree(cred->cr_principal);
+				cred->cr_principal = NULL;
 			}
 		}
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux