diff mbox

fedfsd: libtirpc 1.0 moves the xp_auth field

Message ID 20151102183543.102808.28300.stgit@seurat.1015granger.net
State Accepted
Headers show

Commit Message

Chuck Lever Nov. 2, 2015, 6:37 p.m. UTC
svcauth_gss_get_principal() comes from the legacy U-M svc GSS
API, but is not documented, and does not appear in TI-RPC
headers. fedfs-utils 0.10 adopted this API to provide RPCGSS
support for the FedFS ADMIN protocol.

As a consequence of using an undocumented API, fedfs-utils
0.10 is exposed to library changes to this API. Add some
compatibility measures.

The fedfsd in fedfs-utils 0.11 replaces this call with a valid
contract API that does not expose SVCAUTH. Just a rebuild-relink
should take care of it there.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
Proposed for fedfs-utils 0.10.5 to accommodate recent libtirpc
changes. Review period ends Thursday, November 5 at 23:59 ET.

 src/fedfsd/gss.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Chuck Lever Nov. 6, 2015, 3:29 p.m. UTC | #1
> On Nov 2, 2015, at 1:37 PM, Chuck Lever <chuck.lever@oracle.com> wrote:
> 
> svcauth_gss_get_principal() comes from the legacy U-M svc GSS
> API, but is not documented, and does not appear in TI-RPC
> headers. fedfs-utils 0.10 adopted this API to provide RPCGSS
> support for the FedFS ADMIN protocol.
> 
> As a consequence of using an undocumented API, fedfs-utils
> 0.10 is exposed to library changes to this API. Add some
> compatibility measures.
> 
> The fedfsd in fedfs-utils 0.11 replaces this call with a valid
> contract API that does not expose SVCAUTH. Just a rebuild-relink
> should take care of it there.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> Proposed for fedfs-utils 0.10.5 to accommodate recent libtirpc
> changes. Review period ends Thursday, November 5 at 23:59 ET.

Committed.


> src/fedfsd/gss.c |    4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/src/fedfsd/gss.c b/src/fedfsd/gss.c
> index c63f42f..f762466 100644
> --- a/src/fedfsd/gss.c
> +++ b/src/fedfsd/gss.c
> @@ -175,6 +175,10 @@ fedfsd_get_gss_cred(struct svc_req *rqstp)
> {
> 	SVCAUTH *auth;
> 
> +#if defined(SVC_XP_AUTH)
> +	auth = &SVC_XP_AUTH(rqstp->rq_xprt);
> +#else
> 	auth = rqstp->rq_xprt->xp_auth;
> +#endif
> 	return svcauth_gss_get_principal(auth);
> }
> 
> 
> _______________________________________________
> fedfs-utils-devel mailing list
> fedfs-utils-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel

—
Chuck Lever
diff mbox

Patch

diff --git a/src/fedfsd/gss.c b/src/fedfsd/gss.c
index c63f42f..f762466 100644
--- a/src/fedfsd/gss.c
+++ b/src/fedfsd/gss.c
@@ -175,6 +175,10 @@  fedfsd_get_gss_cred(struct svc_req *rqstp)
 {
 	SVCAUTH *auth;
 
+#if defined(SVC_XP_AUTH)
+	auth = &SVC_XP_AUTH(rqstp->rq_xprt);
+#else
 	auth = rqstp->rq_xprt->xp_auth;
+#endif
 	return svcauth_gss_get_principal(auth);
 }