RPC_GSS_SECCREATE(3)

πŸ’– RPC_GSS_SECCREATE(3) πŸ’–

okay bestie, this is a page from the Library Functions Manual β€” it's rpc_gss_seccreate, and it's about making a security context with RPCSEC_GSS. sit down, hydrate, we're doing this 🫢


✨ NAME ✨

rpc_gss_seccreate β€” create a security context using the RPCSEC_GSS protocol


🌸 SYNOPSIS 🌸

#include <rpc/rpcsec_gss.h>

AUTH *
rpc_gss_seccreate(CLIENT *clnt, const char *principal,
    const char *mechanism, rpc_gss_service_t service, const char *qop,
    rpc_gss_options_req_t *options_req,
    rpc_gss_options_ret_t *options_ret);

πŸ’… DESCRIPTION πŸ’…

so basically, this function is the one that sets up a security context between your application and a remote peer, and it does it using the RPCSEC_GSS protocol. that's the whole job. iconic of it honestly πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

okay here's the cast of characters, one by one, no skips:

  • clnt β€” an RPC handle that's already connected to the remote peer πŸ¦‹
  • principal β€” the name of the service principal on the remote peer. like, for example, an application that needs to talk to an NFS server might use a principal such as "nfs@server.example.com" ✨
  • mechanism β€” the name of the GSS_API mechanism to use for the new security context. rn "kerberos_v5" is the only supported mechanism. that's it, that's the list πŸ’€
  • service β€” the type of service you're requesting. there are options, so let's go:
    • rpc_gss_svc_default β€” the default one, and typically that's the same as rpc_gss_svc_none
    • rpc_gss_svc_none β€” only the RPC headers are integrity protected, by a checksum
    • rpc_gss_svc_integrity β€” both the RPC headers and the data are integrity protected by a checksum
    • rpc_gss_svc_privacy β€” the RPC headers are integrity protected by a checksum, and the data gets encrypted πŸ”₯
  • qop β€” the name of the Quality of Protection to use for the new security context, or NULL if you just want the default QOP. "GSS_C_QOP_DEFAULT" is currently the only supported QOP, periodt βœ‹
  • options_req β€” extra security context options that get passed down to the underlying GSS-API mechanism. pass NULL if you want the default values 🌸
  • options_ret β€” various values that get returned by the underlying GSS-API mechanism. pass NULL if you don't need those values, no pressure πŸ’œ

πŸ‘‘ RETURN VALUES πŸ‘‘

if the security context got created successfully, you get back a pointer to an AUTH structure that represents that context. and to actually use this security context for the RPC calls that come after, you set clnt->cl_auth to that value. that's the move, bestie ✨


🌈 AVAILABILITY 🌈

the rpc_gss_seccreate() function is part of libtirpc. so that's where it lives 🏠


πŸ”₯ SEE ALSO πŸ”₯


🫢 AUTHORS 🫢

this manual page was written by Doug Rabson <dfr@FreeBSD.org>. thank you Doug, we appreciate you πŸ’–


and that's the whole page, bestie!! this one came from the fine folks at Debian, and it's dated January 26, 2010 β€” vintage, honestly, but still serving βœ¨πŸ’… mwah, go set your clnt->cl_auth and thrive πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from