auth.h (25885) | auth.h (26211) |
---|---|
1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user. 8 * --- 14 unchanged lines hidden (view full) --- 23 * Sun has been advised of the possibility of such damages. 24 * 25 * Sun Microsystems, Inc. 26 * 2550 Garcia Avenue 27 * Mountain View, California 94043 28 * 29 * from: @(#)auth.h 1.17 88/02/08 SMI 30 * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC | 1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user. 8 * --- 14 unchanged lines hidden (view full) --- 23 * Sun has been advised of the possibility of such damages. 24 * 25 * Sun Microsystems, Inc. 26 * 2550 Garcia Avenue 27 * Mountain View, California 94043 28 * 29 * from: @(#)auth.h 1.17 88/02/08 SMI 30 * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC |
31 * $Id: auth.h,v 1.11 1997/05/07 20:00:40 eivind Exp $ | 31 * $Id: auth.h,v 1.6 1996/12/30 13:59:37 peter Exp $ |
32 */ 33 34/* 35 * auth.h, Authentication interface. 36 * 37 * Copyright (C) 1984, Sun Microsystems, Inc. 38 * 39 * The data structures are completely opaque to the client. The client 40 * is required to pass a AUTH * to routines that create rpc 41 * "sessions". 42 */ 43 44#ifndef _RPC_AUTH_H 45#define _RPC_AUTH_H 46#include <sys/cdefs.h> | 32 */ 33 34/* 35 * auth.h, Authentication interface. 36 * 37 * Copyright (C) 1984, Sun Microsystems, Inc. 38 * 39 * The data structures are completely opaque to the client. The client 40 * is required to pass a AUTH * to routines that create rpc 41 * "sessions". 42 */ 43 44#ifndef _RPC_AUTH_H 45#define _RPC_AUTH_H 46#include <sys/cdefs.h> |
47#include <sys/socket.h> |
|
47 48#define MAX_AUTH_BYTES 400 49#define MAXNETNAMELEN 255 /* maximum length of network user's name */ 50 51/* 52 * Status returned from authentication check 53 */ 54enum auth_stat { --- 110 unchanged lines hidden (view full) --- 165 * int len; 166 * int *aup_gids; 167 */ 168__BEGIN_DECLS 169struct sockaddr_in; 170extern AUTH *authunix_create __P((char *, int, int, int, int *)); 171extern AUTH *authunix_create_default __P((void)); 172extern AUTH *authnone_create __P((void)); | 48 49#define MAX_AUTH_BYTES 400 50#define MAXNETNAMELEN 255 /* maximum length of network user's name */ 51 52/* 53 * Status returned from authentication check 54 */ 55enum auth_stat { --- 110 unchanged lines hidden (view full) --- 166 * int len; 167 * int *aup_gids; 168 */ 169__BEGIN_DECLS 170struct sockaddr_in; 171extern AUTH *authunix_create __P((char *, int, int, int, int *)); 172extern AUTH *authunix_create_default __P((void)); 173extern AUTH *authnone_create __P((void)); |
173extern AUTH *authdes_create __P((char *, u_int, 174 struct sockaddr_in *, des_block *)); | |
175__END_DECLS 176 | 174__END_DECLS 175 |
176/* Forward compatibility with TI-RPC */ 177#define authsys_create authunix_create 178#define authsys_create_default authunix_create_default 179 180/* 181 * DES style authentication 182 * AUTH *authdes_create(servername, window, timehost, ckey) 183 * char *servername; - network name of server 184 * u_int window; - time to live 185 * struct sockaddr *timehost; - optional hostname to sync with 186 * des_block *ckey; - optional conversation key to use 187 */ 188__BEGIN_DECLS 189extern AUTH *authdes_create __P(( char *, u_int, struct sockaddr *, des_block * )); 190#ifdef NOTYET 191/* 192 * TI-RPC supports this call, but it requires the inclusion of 193 * NIS+-specific headers which would require the inclusion of other 194 * headers which would result in a tangled mess. For now, the NIS+ 195 * code prototypes this routine internally. 196 */ 197extern AUTH *authdes_pk_create __P(( char *, netobj *, u_int, 198 struct sockaddr *, des_block *, 199 nis_server * )); 200#endif 201__END_DECLS 202 203/* 204 * Netname manipulation routines. 205 */ 206__BEGIN_DECLS 207extern int netname2user __P(( char *, uid_t *, gid_t *, int *, gid_t *)); 208extern int netname2host __P(( char *, char *, int )); 209extern int getnetname __P(( char * )); 210extern int user2netname __P(( char *, uid_t, char * )); 211extern int host2netname __P(( char *, char *, char * )); 212extern void passwd2des __P(( char *, char * )); 213__END_DECLS 214 215/* 216 * Keyserv interface routines. 217 * XXX Should not be here. 218 */ 219#ifndef HEXKEYBYTES 220#define HEXKEYBYTES 48 221#endif 222typedef char kbuf[HEXKEYBYTES]; 223typedef char *namestr; 224 225struct netstarg { 226 kbuf st_priv_key; 227 kbuf st_pub_key; 228 namestr st_netname; 229}; 230 231__BEGIN_DECLS 232extern int key_decryptsession __P(( const char *, des_block * )); 233extern int key_decryptsession_pk __P(( char *, netobj *, des_block * )); 234extern int key_encryptsession __P(( const char *, des_block * )); 235extern int key_encryptsession_pk __P(( char *, netobj *, des_block * )); 236extern int key_gendes __P(( des_block * )); 237extern int key_setsecret __P(( const char * )); 238extern int key_secretkey_is_set __P(( void )); 239extern int key_setnet __P(( struct netstarg * )); 240extern int key_get_conv __P(( char *, des_block * )); 241__END_DECLS 242 243/* 244 * Publickey routines. 245 */ 246__BEGIN_DECLS 247extern int getpublickey __P(( char *, char * )); 248extern int getpublicandprivatekey __P(( char *, char * )); 249extern int getsecretkey __P(( char *, char *, char * )); 250__END_DECLS 251 252 |
|
177#ifndef AUTH_NONE /* Protect against <login_cap.h> */ 178#define AUTH_NONE 0 /* no authentication */ 179#endif 180#define AUTH_NULL 0 /* backward compatibility */ 181#define AUTH_UNIX 1 /* unix style (uid, gids) */ | 253#ifndef AUTH_NONE /* Protect against <login_cap.h> */ 254#define AUTH_NONE 0 /* no authentication */ 255#endif 256#define AUTH_NULL 0 /* backward compatibility */ 257#define AUTH_UNIX 1 /* unix style (uid, gids) */ |
258#define AUTH_SYS 1 /* forward compatibility */ |
|
182#define AUTH_SHORT 2 /* short hand unix style */ 183#define AUTH_DES 3 /* des style (encrypted timestamps) */ 184 185#endif /* !_RPC_AUTH_H */ | 259#define AUTH_SHORT 2 /* short hand unix style */ 260#define AUTH_DES 3 /* des style (encrypted timestamps) */ 261 262#endif /* !_RPC_AUTH_H */ |