RPC(3)

NAME
rpc_secure - library routines for secure remote procedure calls

SYNOPSIS
#include <rpc/rpc.h>
int
getnetname(char *name);
int
host2netname(char *name, const char *host, const char *domain);
int
key_decryptsession(const char *remotename, des_block *deskey);
int
key_encryptsession(const char *remotename, des_block *deskey);
int
key_gendes(des_block *deskey);
int
key_setsecret(const char *key);
int
netname2host(char *name, char *host, int hostlen);
int
netname2user(char *name, uid_t *uidp, gid_t *gidp, int *gidlenp, gid_t *gidlist);
int
user2netname(char *name, const uid_t uid, const char *domain);

DESCRIPTION
These routines are part of the RPC library. They implement DES Authentication. See rpc(3) for further details about RPC.

The getnetname() function installs the unique, operating-system independent netname of the caller in the fixed-length array name. Returns TRUE if it succeeds and FALSE if it fails.

The host2netname() function converts from a domain-specific hostname to an operating-system independent netname. Returns TRUE if it succeeds and FALSE if it fails. Inverse of netname2host().

The key_decryptsession() function is an interface to the keyserver daemon, which is associated with RPC's secure authentication system (DES authentication). User programs rarely need to call it, or its associated routines key_encryptsession(), key_gendes() and key_setsecret(). System commands such as login(1) and the RPC library are the main clients of these four routines.

The key_decryptsession() function takes a server netname and a DES key, and decrypts the key by using the public key of the server and the secret key associated with the effective uid of the calling process. It is the inverse of key_encryptsession().

The key_encryptsession() function is a keyserver interface routine. It takes a server netname and a des key, and encrypts it using the public key of the server and the secret key associated with the effective uid of the calling process. It is the inverse of key_decryptsession().

The key_gendes() function is a keyserver interface routine. It is used to ask the keyserver for a secure conversation key. Choosing one "random" is usually not good enough, because the common ways of choosing random numbers, such as using the current time, are very easy to guess.

The key_setsecret() function is a keyserver interface routine. It is used to set the key for the effective uid of the calling process.

The netname2host() function converts from an operating-system independent netname to a domain-specific hostname. Returns TRUE if it succeeds and FALSE if it fails. Inverse of host2netname().

The netname2user() function converts from an operating-system independent netname to a domain-specific user ID. Returns TRUE if it succeeds and FALSE if it fails. Inverse of user2netname().

The user2netname() function converts from a domain-specific username to an operating-system independent netname. Returns TRUE if it succeeds and FALSE if it fails. Inverse of netname2user().

SEE ALSO
rpc(3), xdr(3), keyserv(8)

The following manuals: Remote Procedure Calls: Protocol Specification. Remote Procedure Call Programming Guide. Rpcgen Programming Guide. RPC: Remote Procedure Call Protocol Specification, RFC1050, Sun Microsystems Inc., USC-ISI.