URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [librpc/] [src/] [rpc/] [rpc_secure.3] - Rev 173
Compare with Previous | Blame | View Log
.\" @(#)rpc_secure.3n 2.1 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI.\" $FreeBSD: src/lib/libc/rpc/rpc_secure.3,v 1.6 2000/03/02 09:13:48 sheldonh Exp $.\".Dd February 16, 1988.Dt RPC 3.Sh NAME.Nm rpc_secure.Nd library routines for secure remote procedure calls.Sh SYNOPSIS.Fd #include <rpc/rpc.h>.Ft AUTH *.Fo authdes_create.Fa "char *name".Fa "unsigned window".Fa "struct sockaddr *addr".Fa "des_block *ckey".Fc.Ft int.Fn authdes_getucred "struct authdes_cred *adc" "uid_t *uid" "gid_t *gid" "int *grouplen" "gid_t *groups".Ft int.Fn getnetname "char *name".Ft int.Fn host2netname "char *name" "char *host" "char *domain".Ft int.Fn key_decryptsession "const char *remotename" "des_block *deskey".Ft int.Fn key_encryptsession "const char *remotename" "des_block *deskey".Ft int.Fn key_gendes "des_block *deskey".Ft int.Fn key_setsecret "const char *key".Ft int.Fn netname2host "char *name" "char *host" "int hostlen".Ft int.Fn netname2user "char *name" "uid_t *uidp" "gid_t *gidp" "int *gidlenp" "gid_t *gidlist".Ft int.Fn user2netname "char *name" "uid_t uid" "char *domain".Sh DESCRIPTIONThese routines are part of the.Tn RPClibrary. They implement.Tn DESAuthentication. See.Xr rpc 3for further details about.Tn RPC ..PpThe.Fn authdes_createis the first of two routines which interface to the.Tn RPCsecure authentication system, known as.Tn DESauthentication.The second is.Fn authdes_getucred ,below..PpNote: the keyserver daemon.Xr keyserv 8must be running for the.Tn DESauthentication system to work..Pp.Fn Authdes_create ,used on the client side, returns an authentication handle thatwill enable the use of the secure authentication system.The first parameter.Fa nameis the network name, or.Fa netname ,of the owner of the server process.This field usuallyrepresents a.Fa hostnamederived from the utility routine.Fn host2netname ,but could also represent a user name using.Fn user2netname .The second field is window on the validity ofthe client credential, given in seconds. A smallwindow is more secure than a large one, but choosingtoo small of a window will increase the frequency ofresynchronizations because of clock drift.The thirdparameter.Fa addris optional. If it is.Dv NULL ,then the authentication system will assumethat the local clock is always in sync with the server'sclock, and will not attempt resynchronizations.If an addressis supplied, however, then the system will use the addressfor consulting the remote time service wheneverresynchronizationis required.This parameter is usually theaddress of the.Tn RPCserver itself.The final parameter.Fa ckeyis also optional. If it is.Dv NULL ,then the authentication system willgenerate a random.Tn DESkey to be used for the encryption of credentials.If it is supplied, however, then it will be used instead..Pp.Fn Authdes_getucred ,the second of the two.Tn DESauthentication routines,is used on the server side for converting a.Tn DEScredential, which isoperating system independent, into a.Uxcredential.This routine differs from utility routine.Fn netname2userin that.Fn authdes_getucredpulls its information from a cache, and does not have to do aYellow Pages lookup every time it is called to get its information..Pp.Fn Getnetnameinstalls the unique, operating-system independent netname ofthecaller in the fixed-length array.Fa name .Returns.Dv TRUEif it succeeds and.Dv FALSEif it fails..Pp.Fn Host2netnameconverts from a domain-specific hostname to anoperating-system independent netname.Returns.Dv TRUEif it succeeds and.Dv FALSEif it fails.Inverse of.Fn netname2host ..Pp.Fn Key_decryptsessionis an interface to the keyserver daemon, which is associatedwith.Tn RPC Ns 'ssecure authentication system (.Tn DESauthentication).User programs rarely need to call it, or its associated routines.Fn key_encryptsession ,.Fn key_gendesand.Fn key_setsecret .System commands such as.Xr login 1and the.Tn RPClibrary are the main clients of these four routines..Pp.Fn Key_decryptsessiontakes a server netname and a.Tn DESkey, and decrypts the key byusing the the public key of the the server and the secret keyassociated with the effective uid of the calling process. Itis the inverse of.Fn key_encryptsession ..Pp.Fn Key_encryptsessionis a keyserver interface routine.Ittakes a server netname and a des key, and encryptsit using the public key of the the server and the secret keyassociated with the effective uid of the calling process. Itis the inverse of.Fn key_decryptsession ..Pp.Fn Key_gendesis a keyserver interface routine.Itis used to ask the keyserver for a secure conversation key.Choosing one.Qq randomis usually not good enough,becausethe common ways of choosing random numbers, such as using thecurrent time, are very easy to guess..Pp.Fn Key_setsecretis a keyserver interface routine.It is used to set the key forthe effective.Fa uidof the calling process..Pp.Fn Netname2hostconverts from an operating-system independent netname to adomain-specific hostname.Returns.Dv TRUEif it succeeds and.Dv FALSEif it fails. Inverse of.Fn host2netname ..Pp.Fn Netname2userconverts from an operating-system independent netname to adomain-specific user ID.Returns.Dv TRUEif it succeeds and.Dv FALSEif it fails.Inverse of.Fn user2netname ..Pp.Fn User2netnameconverts from a domain-specific username to an operating-systemindependent netname.Returns.Dv TRUEif it succeeds and.Dv FALSEif it fails.Inverse of.Fn netname2user ..Sh SEE ALSO.Xr rpc 3 ,.Xr xdr 3 ,.Xr keyserv 8.PpThe following manuals:.Rs.%B Remote Procedure Calls: Protocol Specification.Re.Rs.%B Remote Procedure Call Programming Guide.Re.Rs.%B Rpcgen Programming Guide.Re.Rs.%B RPC: Remote Procedure Call Protocol Specification.%O RFC1050, Sun Microsystems Inc., USC-ISI.Re
