18360efbdSAlfred Perlstein /* $NetBSD: auth.h,v 1.15 2000/06/02 22:57:55 fvdl Exp $ */ 28360efbdSAlfred Perlstein 3dba7a33eSGarrett Wollman /* 4dba7a33eSGarrett Wollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5dba7a33eSGarrett Wollman * unrestricted use provided that this legend is included on all tape 6dba7a33eSGarrett Wollman * media and as a part of the software program in whole or part. Users 7dba7a33eSGarrett Wollman * may copy or modify Sun RPC without charge, but are not authorized 8dba7a33eSGarrett Wollman * to license or distribute it to anyone else except as part of a product or 9dba7a33eSGarrett Wollman * program developed by the user. 10dba7a33eSGarrett Wollman * 11dba7a33eSGarrett Wollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 1271d9c781SMike Pritchard * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 13dba7a33eSGarrett Wollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 14dba7a33eSGarrett Wollman * 15dba7a33eSGarrett Wollman * Sun RPC is provided with no support and without any obligation on the 16dba7a33eSGarrett Wollman * part of Sun Microsystems, Inc. to assist in its use, correction, 17dba7a33eSGarrett Wollman * modification or enhancement. 18dba7a33eSGarrett Wollman * 19dba7a33eSGarrett Wollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 20dba7a33eSGarrett Wollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 21dba7a33eSGarrett Wollman * OR ANY PART THEREOF. 22dba7a33eSGarrett Wollman * 23dba7a33eSGarrett Wollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 24dba7a33eSGarrett Wollman * or profits or other special, indirect and consequential damages, even if 25dba7a33eSGarrett Wollman * Sun has been advised of the possibility of such damages. 26dba7a33eSGarrett Wollman * 27dba7a33eSGarrett Wollman * Sun Microsystems, Inc. 28dba7a33eSGarrett Wollman * 2550 Garcia Avenue 29dba7a33eSGarrett Wollman * Mountain View, California 94043 3086b9a9ccSGarrett Wollman * 3186b9a9ccSGarrett Wollman * from: @(#)auth.h 1.17 88/02/08 SMI 3286b9a9ccSGarrett Wollman * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC 338360efbdSAlfred Perlstein * from: @(#)auth.h 1.43 98/02/02 SMI 34a4add9a9SPeter Wemm * $FreeBSD$ 35dba7a33eSGarrett Wollman */ 36dba7a33eSGarrett Wollman 37dba7a33eSGarrett Wollman /* 38dba7a33eSGarrett Wollman * auth.h, Authentication interface. 39dba7a33eSGarrett Wollman * 40dba7a33eSGarrett Wollman * Copyright (C) 1984, Sun Microsystems, Inc. 41dba7a33eSGarrett Wollman * 42dba7a33eSGarrett Wollman * The data structures are completely opaque to the client. The client 43dba7a33eSGarrett Wollman * is required to pass a AUTH * to routines that create rpc 44dba7a33eSGarrett Wollman * "sessions". 45dba7a33eSGarrett Wollman */ 46dba7a33eSGarrett Wollman 4786b9a9ccSGarrett Wollman #ifndef _RPC_AUTH_H 4886b9a9ccSGarrett Wollman #define _RPC_AUTH_H 498360efbdSAlfred Perlstein #include <rpc/xdr.h> 508360efbdSAlfred Perlstein #include <rpc/clnt_stat.h> 5186b9a9ccSGarrett Wollman #include <sys/cdefs.h> 52f26dae2bSBill Paul #include <sys/socket.h> 53dba7a33eSGarrett Wollman 54dba7a33eSGarrett Wollman #define MAX_AUTH_BYTES 400 55dba7a33eSGarrett Wollman #define MAXNETNAMELEN 255 /* maximum length of network user's name */ 56dba7a33eSGarrett Wollman 57dba7a33eSGarrett Wollman /* 588360efbdSAlfred Perlstein * Client side authentication/security data 598360efbdSAlfred Perlstein */ 608360efbdSAlfred Perlstein 618360efbdSAlfred Perlstein typedef struct sec_data { 628360efbdSAlfred Perlstein u_int secmod; /* security mode number e.g. in nfssec.conf */ 638360efbdSAlfred Perlstein u_int rpcflavor; /* rpc flavors:AUTH_UNIX,AUTH_DES,RPCSEC_GSS */ 648360efbdSAlfred Perlstein int flags; /* AUTH_F_xxx flags */ 658360efbdSAlfred Perlstein caddr_t data; /* opaque data per flavor */ 668360efbdSAlfred Perlstein } sec_data_t; 678360efbdSAlfred Perlstein 688360efbdSAlfred Perlstein #ifdef _SYSCALL32_IMPL 698360efbdSAlfred Perlstein struct sec_data32 { 708360efbdSAlfred Perlstein uint32_t secmod; /* security mode number e.g. in nfssec.conf */ 718360efbdSAlfred Perlstein uint32_t rpcflavor; /* rpc flavors:AUTH_UNIX,AUTH_DES,RPCSEC_GSS */ 728360efbdSAlfred Perlstein int32_t flags; /* AUTH_F_xxx flags */ 738360efbdSAlfred Perlstein caddr32_t data; /* opaque data per flavor */ 748360efbdSAlfred Perlstein }; 758360efbdSAlfred Perlstein #endif /* _SYSCALL32_IMPL */ 768360efbdSAlfred Perlstein 778360efbdSAlfred Perlstein /* 788360efbdSAlfred Perlstein * AUTH_DES flavor specific data from sec_data opaque data field. 798360efbdSAlfred Perlstein * AUTH_KERB has the same structure. 808360efbdSAlfred Perlstein */ 818360efbdSAlfred Perlstein typedef struct des_clnt_data { 828360efbdSAlfred Perlstein struct netbuf syncaddr; /* time sync addr */ 838360efbdSAlfred Perlstein struct knetconfig *knconf; /* knetconfig info that associated */ 848360efbdSAlfred Perlstein /* with the syncaddr. */ 858360efbdSAlfred Perlstein char *netname; /* server's netname */ 868360efbdSAlfred Perlstein int netnamelen; /* server's netname len */ 878360efbdSAlfred Perlstein } dh_k4_clntdata_t; 888360efbdSAlfred Perlstein 898360efbdSAlfred Perlstein #ifdef _SYSCALL32_IMPL 908360efbdSAlfred Perlstein struct des_clnt_data32 { 918360efbdSAlfred Perlstein struct netbuf32 syncaddr; /* time sync addr */ 928360efbdSAlfred Perlstein caddr32_t knconf; /* knetconfig info that associated */ 938360efbdSAlfred Perlstein /* with the syncaddr. */ 948360efbdSAlfred Perlstein caddr32_t netname; /* server's netname */ 958360efbdSAlfred Perlstein int32_t netnamelen; /* server's netname len */ 968360efbdSAlfred Perlstein }; 978360efbdSAlfred Perlstein #endif /* _SYSCALL32_IMPL */ 988360efbdSAlfred Perlstein 998360efbdSAlfred Perlstein #ifdef KERBEROS 1008360efbdSAlfred Perlstein /* 1018360efbdSAlfred Perlstein * flavor specific data to hold the data for AUTH_DES/AUTH_KERB(v4) 1028360efbdSAlfred Perlstein * in sec_data->data opaque field. 1038360efbdSAlfred Perlstein */ 1048360efbdSAlfred Perlstein typedef struct krb4_svc_data { 1058360efbdSAlfred Perlstein int window; /* window option value */ 1068360efbdSAlfred Perlstein } krb4_svcdata_t; 1078360efbdSAlfred Perlstein 1088360efbdSAlfred Perlstein typedef struct krb4_svc_data des_svcdata_t; 1098360efbdSAlfred Perlstein #endif /* KERBEROS */ 1108360efbdSAlfred Perlstein 1118360efbdSAlfred Perlstein /* 1128360efbdSAlfred Perlstein * authentication/security specific flags 1138360efbdSAlfred Perlstein */ 1148360efbdSAlfred Perlstein #define AUTH_F_RPCTIMESYNC 0x001 /* use RPC to do time sync */ 1158360efbdSAlfred Perlstein #define AUTH_F_TRYNONE 0x002 /* allow fall back to AUTH_NONE */ 1168360efbdSAlfred Perlstein 1178360efbdSAlfred Perlstein 1188360efbdSAlfred Perlstein /* 119dba7a33eSGarrett Wollman * Status returned from authentication check 120dba7a33eSGarrett Wollman */ 121dba7a33eSGarrett Wollman enum auth_stat { 122dba7a33eSGarrett Wollman AUTH_OK=0, 123dba7a33eSGarrett Wollman /* 124dba7a33eSGarrett Wollman * failed at remote end 125dba7a33eSGarrett Wollman */ 126dba7a33eSGarrett Wollman AUTH_BADCRED=1, /* bogus credentials (seal broken) */ 127dba7a33eSGarrett Wollman AUTH_REJECTEDCRED=2, /* client should begin new session */ 128dba7a33eSGarrett Wollman AUTH_BADVERF=3, /* bogus verifier (seal broken) */ 129dba7a33eSGarrett Wollman AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ 130dba7a33eSGarrett Wollman AUTH_TOOWEAK=5, /* rejected due to security reasons */ 131dba7a33eSGarrett Wollman /* 132dba7a33eSGarrett Wollman * failed locally 133dba7a33eSGarrett Wollman */ 134dba7a33eSGarrett Wollman AUTH_INVALIDRESP=6, /* bogus response verifier */ 135dba7a33eSGarrett Wollman AUTH_FAILED=7 /* some unknown reason */ 1368360efbdSAlfred Perlstein #ifdef KERBEROS 1378360efbdSAlfred Perlstein /* 1388360efbdSAlfred Perlstein * kerberos errors 1398360efbdSAlfred Perlstein */ 140f91b492aSAlfred Perlstein , 1418360efbdSAlfred Perlstein AUTH_KERB_GENERIC = 8, /* kerberos generic error */ 1428360efbdSAlfred Perlstein AUTH_TIMEEXPIRE = 9, /* time of credential expired */ 1438360efbdSAlfred Perlstein AUTH_TKT_FILE = 10, /* something wrong with ticket file */ 1448360efbdSAlfred Perlstein AUTH_DECODE = 11, /* can't decode authenticator */ 1458360efbdSAlfred Perlstein AUTH_NET_ADDR = 12 /* wrong net address in ticket */ 1468360efbdSAlfred Perlstein #endif /* KERBEROS */ 147dba7a33eSGarrett Wollman }; 148dba7a33eSGarrett Wollman 149dba7a33eSGarrett Wollman union des_block { 150dba7a33eSGarrett Wollman struct { 1518360efbdSAlfred Perlstein uint32_t high; 1528360efbdSAlfred Perlstein uint32_t low; 153dba7a33eSGarrett Wollman } key; 154dba7a33eSGarrett Wollman char c[8]; 155dba7a33eSGarrett Wollman }; 156dba7a33eSGarrett Wollman typedef union des_block des_block; 15786b9a9ccSGarrett Wollman __BEGIN_DECLS 1588360efbdSAlfred Perlstein #ifdef __STDC__ 1598360efbdSAlfred Perlstein extern bool_t xdr_des_block(XDR *, des_block *); 1608360efbdSAlfred Perlstein #else 1618360efbdSAlfred Perlstein extern bool_t xdr_des_block(); 1628360efbdSAlfred Perlstein #endif 16386b9a9ccSGarrett Wollman __END_DECLS 164dba7a33eSGarrett Wollman 165dba7a33eSGarrett Wollman /* 166dba7a33eSGarrett Wollman * Authentication info. Opaque to client. 167dba7a33eSGarrett Wollman */ 168dba7a33eSGarrett Wollman struct opaque_auth { 169dba7a33eSGarrett Wollman enum_t oa_flavor; /* flavor of auth */ 170dba7a33eSGarrett Wollman caddr_t oa_base; /* address of more auth stuff */ 171dba7a33eSGarrett Wollman u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ 172dba7a33eSGarrett Wollman }; 173dba7a33eSGarrett Wollman 174dba7a33eSGarrett Wollman 175dba7a33eSGarrett Wollman /* 176dba7a33eSGarrett Wollman * Auth handle, interface to client side authenticators. 177dba7a33eSGarrett Wollman */ 1788360efbdSAlfred Perlstein typedef struct __auth { 179dba7a33eSGarrett Wollman struct opaque_auth ah_cred; 180dba7a33eSGarrett Wollman struct opaque_auth ah_verf; 181dba7a33eSGarrett Wollman union des_block ah_key; 182dba7a33eSGarrett Wollman struct auth_ops { 1838360efbdSAlfred Perlstein void (*ah_nextverf) (struct __auth *); 18470de0abfSPeter Wemm /* nextverf & serialize */ 1858360efbdSAlfred Perlstein int (*ah_marshal) (struct __auth *, XDR *); 18670de0abfSPeter Wemm /* validate verifier */ 1878360efbdSAlfred Perlstein int (*ah_validate) (struct __auth *, 1888360efbdSAlfred Perlstein struct opaque_auth *); 18970de0abfSPeter Wemm /* refresh credentials */ 1908360efbdSAlfred Perlstein int (*ah_refresh) (struct __auth *, void *); 19170de0abfSPeter Wemm /* destroy this structure */ 1928360efbdSAlfred Perlstein void (*ah_destroy) (struct __auth *); 193dba7a33eSGarrett Wollman } *ah_ops; 194f91b492aSAlfred Perlstein void *ah_private; 195dba7a33eSGarrett Wollman } AUTH; 196dba7a33eSGarrett Wollman 197dba7a33eSGarrett Wollman 198dba7a33eSGarrett Wollman /* 199dba7a33eSGarrett Wollman * Authentication ops. 200dba7a33eSGarrett Wollman * The ops and the auth handle provide the interface to the authenticators. 201dba7a33eSGarrett Wollman * 202dba7a33eSGarrett Wollman * AUTH *auth; 203dba7a33eSGarrett Wollman * XDR *xdrs; 204dba7a33eSGarrett Wollman * struct opaque_auth verf; 205dba7a33eSGarrett Wollman */ 206dba7a33eSGarrett Wollman #define AUTH_NEXTVERF(auth) \ 207dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_nextverf))(auth)) 208dba7a33eSGarrett Wollman #define auth_nextverf(auth) \ 209dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_nextverf))(auth)) 210dba7a33eSGarrett Wollman 211dba7a33eSGarrett Wollman #define AUTH_MARSHALL(auth, xdrs) \ 212dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) 213dba7a33eSGarrett Wollman #define auth_marshall(auth, xdrs) \ 214dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) 215dba7a33eSGarrett Wollman 216dba7a33eSGarrett Wollman #define AUTH_VALIDATE(auth, verfp) \ 217dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_validate))((auth), verfp)) 218dba7a33eSGarrett Wollman #define auth_validate(auth, verfp) \ 219dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_validate))((auth), verfp)) 220dba7a33eSGarrett Wollman 2218360efbdSAlfred Perlstein #define AUTH_REFRESH(auth, msg) \ 2228360efbdSAlfred Perlstein ((*((auth)->ah_ops->ah_refresh))(auth, msg)) 2238360efbdSAlfred Perlstein #define auth_refresh(auth, msg) \ 2248360efbdSAlfred Perlstein ((*((auth)->ah_ops->ah_refresh))(auth, msg)) 225dba7a33eSGarrett Wollman 226dba7a33eSGarrett Wollman #define AUTH_DESTROY(auth) \ 227dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_destroy))(auth)) 228dba7a33eSGarrett Wollman #define auth_destroy(auth) \ 229dba7a33eSGarrett Wollman ((*((auth)->ah_ops->ah_destroy))(auth)) 230dba7a33eSGarrett Wollman 231dba7a33eSGarrett Wollman 2328360efbdSAlfred Perlstein __BEGIN_DECLS 233dba7a33eSGarrett Wollman extern struct opaque_auth _null_auth; 2348360efbdSAlfred Perlstein __END_DECLS 235dba7a33eSGarrett Wollman 236dba7a33eSGarrett Wollman /* 237dba7a33eSGarrett Wollman * These are the various implementations of client side authenticators. 238dba7a33eSGarrett Wollman */ 239dba7a33eSGarrett Wollman 240dba7a33eSGarrett Wollman /* 2418360efbdSAlfred Perlstein * System style authentication 242dba7a33eSGarrett Wollman * AUTH *authunix_create(machname, uid, gid, len, aup_gids) 243dba7a33eSGarrett Wollman * char *machname; 244dba7a33eSGarrett Wollman * int uid; 245dba7a33eSGarrett Wollman * int gid; 246dba7a33eSGarrett Wollman * int len; 247dba7a33eSGarrett Wollman * int *aup_gids; 248dba7a33eSGarrett Wollman */ 24986b9a9ccSGarrett Wollman __BEGIN_DECLS 2508360efbdSAlfred Perlstein extern AUTH *authunix_create(char *, int, int, int, 2518360efbdSAlfred Perlstein int *); 2528360efbdSAlfred Perlstein extern AUTH *authunix_create_default(void); /* takes no parameters */ 2538360efbdSAlfred Perlstein extern AUTH *authnone_create(void); /* takes no parameters */ 25486b9a9ccSGarrett Wollman __END_DECLS 255f26dae2bSBill Paul /* 256f26dae2bSBill Paul * DES style authentication 2578360efbdSAlfred Perlstein * AUTH *authsecdes_create(servername, window, timehost, ckey) 258f26dae2bSBill Paul * char *servername; - network name of server 259f26dae2bSBill Paul * u_int window; - time to live 2608360efbdSAlfred Perlstein * const char *timehost; - optional hostname to sync with 261f26dae2bSBill Paul * des_block *ckey; - optional conversation key to use 262f26dae2bSBill Paul */ 263f26dae2bSBill Paul __BEGIN_DECLS 2648360efbdSAlfred Perlstein extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *); 2658360efbdSAlfred Perlstein extern AUTH *authdes_seccreate (const char *, const u_int, const char *, 2668360efbdSAlfred Perlstein const des_block *); 267f26dae2bSBill Paul __END_DECLS 268f26dae2bSBill Paul 2698360efbdSAlfred Perlstein __BEGIN_DECLS 2708d630135SAlfred Perlstein extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); 2718360efbdSAlfred Perlstein __END_DECLS 2728360efbdSAlfred Perlstein 2738360efbdSAlfred Perlstein #define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip)) 2748360efbdSAlfred Perlstein #define authsys_create_default() authunix_create_default() 2758360efbdSAlfred Perlstein 276f26dae2bSBill Paul /* 277f26dae2bSBill Paul * Netname manipulation routines. 278f26dae2bSBill Paul */ 279f26dae2bSBill Paul __BEGIN_DECLS 2808360efbdSAlfred Perlstein extern int getnetname(char *); 2818360efbdSAlfred Perlstein extern int host2netname(char *, const char *, const char *); 2828360efbdSAlfred Perlstein extern int user2netname(char *, const uid_t, const char *); 2838360efbdSAlfred Perlstein extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *); 2848360efbdSAlfred Perlstein extern int netname2host(char *, char *, const int); 2858360efbdSAlfred Perlstein extern void passwd2des ( char *, char * ); 286f26dae2bSBill Paul __END_DECLS 287f26dae2bSBill Paul 288f26dae2bSBill Paul /* 2898360efbdSAlfred Perlstein * 2908360efbdSAlfred Perlstein * These routines interface to the keyserv daemon 2918360efbdSAlfred Perlstein * 292f26dae2bSBill Paul */ 293f26dae2bSBill Paul __BEGIN_DECLS 2948360efbdSAlfred Perlstein extern int key_decryptsession(const char *, des_block *); 2958360efbdSAlfred Perlstein extern int key_encryptsession(const char *, des_block *); 2968360efbdSAlfred Perlstein extern int key_gendes(des_block *); 2978360efbdSAlfred Perlstein extern int key_setsecret(const char *); 2988360efbdSAlfred Perlstein extern int key_secretkey_is_set(void); 2998360efbdSAlfred Perlstein __END_DECLS 3008360efbdSAlfred Perlstein 3018d630135SAlfred Perlstein /* 3028d630135SAlfred Perlstein * Publickey routines. 3038d630135SAlfred Perlstein */ 3048d630135SAlfred Perlstein __BEGIN_DECLS 3058d630135SAlfred Perlstein extern int getpublickey (const char *, char *); 3068d630135SAlfred Perlstein extern int getpublicandprivatekey (char *, char *); 3078d630135SAlfred Perlstein extern int getsecretkey (char *, char *, char *); 3088d630135SAlfred Perlstein __END_DECLS 3098d630135SAlfred Perlstein 3108360efbdSAlfred Perlstein #ifdef KERBEROS 3118360efbdSAlfred Perlstein /* 3128360efbdSAlfred Perlstein * Kerberos style authentication 3138360efbdSAlfred Perlstein * AUTH *authkerb_seccreate(service, srv_inst, realm, window, timehost, status) 3148360efbdSAlfred Perlstein * const char *service; - service name 3158360efbdSAlfred Perlstein * const char *srv_inst; - server instance 3168360efbdSAlfred Perlstein * const char *realm; - server realm 3178360efbdSAlfred Perlstein * const u_int window; - time to live 3188360efbdSAlfred Perlstein * const char *timehost; - optional hostname to sync with 3198360efbdSAlfred Perlstein * int *status; - kerberos status returned 3208360efbdSAlfred Perlstein */ 3218360efbdSAlfred Perlstein __BEGIN_DECLS 3228360efbdSAlfred Perlstein extern AUTH *authkerb_seccreate(const char *, const char *, const char *, 3238360efbdSAlfred Perlstein const u_int, const char *, int *); 324f26dae2bSBill Paul __END_DECLS 325f26dae2bSBill Paul 326f26dae2bSBill Paul /* 3278360efbdSAlfred Perlstein * Map a kerberos credential into a unix cred. 3288360efbdSAlfred Perlstein * 3298360efbdSAlfred Perlstein * authkerb_getucred(rqst, uid, gid, grouplen, groups) 3308360efbdSAlfred Perlstein * const struct svc_req *rqst; - request pointer 3318360efbdSAlfred Perlstein * uid_t *uid; 3328360efbdSAlfred Perlstein * gid_t *gid; 3338360efbdSAlfred Perlstein * short *grouplen; 3348360efbdSAlfred Perlstein * int *groups; 3358360efbdSAlfred Perlstein * 336f26dae2bSBill Paul */ 337f26dae2bSBill Paul __BEGIN_DECLS 3388360efbdSAlfred Perlstein extern int authkerb_getucred(/* struct svc_req *, uid_t *, gid_t *, 3398360efbdSAlfred Perlstein short *, int * */); 340f26dae2bSBill Paul __END_DECLS 3418360efbdSAlfred Perlstein #endif /* KERBEROS */ 342f26dae2bSBill Paul 3438360efbdSAlfred Perlstein __BEGIN_DECLS 3448360efbdSAlfred Perlstein struct svc_req; 3458360efbdSAlfred Perlstein struct rpc_msg; 3468d630135SAlfred Perlstein enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *); 3478d630135SAlfred Perlstein enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *); 3488d630135SAlfred Perlstein enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *); 3498360efbdSAlfred Perlstein __END_DECLS 350f26dae2bSBill Paul 351dba7a33eSGarrett Wollman #define AUTH_NONE 0 /* no authentication */ 352dba7a33eSGarrett Wollman #define AUTH_NULL 0 /* backward compatibility */ 3538360efbdSAlfred Perlstein #define AUTH_SYS 1 /* unix style (uid, gids) */ 3548360efbdSAlfred Perlstein #define AUTH_UNIX AUTH_SYS 355dba7a33eSGarrett Wollman #define AUTH_SHORT 2 /* short hand unix style */ 3568360efbdSAlfred Perlstein #define AUTH_DH 3 /* for Diffie-Hellman mechanism */ 3578360efbdSAlfred Perlstein #define AUTH_DES AUTH_DH /* for backward compatibility */ 3588360efbdSAlfred Perlstein #define AUTH_KERB 4 /* kerberos style */ 35986b9a9ccSGarrett Wollman 36086b9a9ccSGarrett Wollman #endif /* !_RPC_AUTH_H */ 361