RPC_CLNT_AUTH(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

✨ RPC_CLNT_AUTH(3) β€” the client-side RPC auth bestie guide ✨

okay so picture this: you're deep in the Library Functions Manual section 3, and you need to know about auth_destroy, authnone_create, authsys_create, and authsys_create_default β€” literally all the library routines for client side remote procedure call authentication πŸ’…. this is that page, but make it make sense.


πŸŽ€ LIBRARY πŸŽ€

Standard C Library (libc, -lc). that's it, that's the whole vibe. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

like, the shape of it:

#include <rpc/rpc.h>

void
auth_destroy(AUTH *auth);

AUTH *
authnone_create(void);

AUTH *
authsys_create(const char *host, const uid_t uid, const gid_t gid,
    const int len, const gid_t *aup_gids);

AUTH *
authsys_create_default(void);

copy those signatures exactly, no cap. πŸ”₯


🌸 DESCRIPTION 🌸

so these routines are part of the RPC library, and the whole point of that library is letting C language programs make procedure calls on other machines across the network β€” with the authentication you want. yes bestie, you get to pick. πŸ‘‘

these routines are normally called after you've created the CLIENT handle. the cl_auth field of the CLIENT structure should be initialized by the AUTH structure that some of the routines below hand back to you. then, when the RPC call actually goes out, the client's authentication information gets passed to the server. it's giving "showing your ID at the door" energy. πŸͺͺ

heads up: only the NULL and the SYS style of authentication is discussed here. that's the whole scope, don't come for me. πŸ™ˆ


🌈 Routines 🌈

  • auth_destroy() β€” a function macro that destroys the authentication information associated with auth. destruction usually involves deallocation of private data structures. ⚠️ important: the use of auth is undefined after calling auth_destroy(). like, that pointer is donezo, do not touch, it's not your friend anymore πŸ’€.
  • authnone_create() β€” creates and returns an RPC authentication handle that passes nonusable authentication information with each remote procedure call. this is the default authentication used by RPC. lowkey the lazy girl option but it's iconic in its own way πŸŽ€.
  • authsys_create() β€” creates and returns an RPC authentication handle that contains AUTH_SYS authentication information. here's the breakdown of the args:
    • host β€” the name of the machine on which the information was created πŸ–₯️
    • uid β€” the user's user ID
    • gid β€” the user's current group ID
    • len and aup_gids β€” these refer to a counted array of groups to which the user belongs πŸ‘―β€β™€οΈ
  • authsys_create_default() β€” calls authsys_create() with the appropriate arguments. it's the "you do it for me, I trust you" routine, and honestly? slay. ✨

πŸ‘‘ SEE ALSO πŸ‘‘

rpc(3), rpc_clnt_calls(3), rpc_clnt_create(3) β€” go read your sisters, they ate πŸ’–


and that's the whole page, bestie, no crumbs left πŸ“. this little gem comes to you from Debian, dated May 7, 1993 (yes, a vintage icon β€” it was cute before you were born 🌸), and it lives at RPC_CLNT_AUTH(3) in the manual. mwah, study hard, drink water, and don't use auth after auth_destroy() πŸ’…πŸ«Ά

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms