RPC_CLNT_AUTH(3)
β¨ 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 callingauth_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 containsAUTH_SYSauthentication 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()β callsauthsys_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
- Copyright 1989 AT&T
- Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms