RPC_CLNT_AUTH(3N)

NAME
auth_destroy, authnone_create, authunix_create, authunix_create_default - library routines for client side remote procedure call authentication

DESCRIPTION

RPC routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a request to the server. Upon receipt of the request, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

RPC allows various authentication types. Currently, it supports AUTH_NONE, AUTH_UNIX, AUTH_DES. For routines relating to the AUTH_DES type, see secure_rpc(3N).

These routines are called after creating the CLIENT handle. The client's authentication information is passed to the server when the RPC call is made.

  Routines

The following routines require that the header <rpc.h>. be included. The AUTH data structure is defined in the RPC/XDR Library Definitions of the

#include <rpc/rpc.h>

void
auth_destroy(auth)
AUTH *auth;

    Destroy the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *
authnone_create()

    Create and return an RPC authentication handle that passes no usable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *
authunix_create(host, uid, gid, grouplen, gidlistp)
char *host;
int uid, gid, grouplen, *gidlistp;

    Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user's user ID; gid is the user's current group ID; grouplen and gidlistp refer to a counted array of groups to which the user belongs. Warning: It is not very difficult to impersonate a user.

AUTH *
authunix_create_default()

    Call authunix_create() with the appropriate parameters.

SEE ALSO
rpc(3N), rpc_clnt_create(3N), rpc_clnt_calls(3N)