1 /* @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC; from 1.3 88/02/08 SMI */
3 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
4 * unrestricted use provided that this legend is included on all tape
5 * media and as a part of the software program in whole or part. Users
6 * may copy or modify Sun RPC without charge, but are not authorized
7 * to license or distribute it to anyone else except as part of a product or
8 * program developed by the user.
10 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
12 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 * Sun RPC is provided with no support and without any obligation on the
15 * part of Sun Microsystems, Inc. to assist in its use, correction,
16 * modification or enhancement.
18 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20 * OR ANY PART THEREOF.
22 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23 * or profits or other special, indirect and consequential damages, even if
24 * Sun has been advised of the possibility of such damages.
26 * Sun Microsystems, Inc.
28 * Mountain View, California 94043
32 * Copyright (c) 1988 by Sun Microsystems, Inc.
36 * auth_des.h, Protocol for DES style authentication for RPC
43 * There are two kinds of "names": fullnames and nicknames
45 enum authdes_namekind {
51 * A fullname contains the network name of the client,
52 * a conversation key and the window
54 struct authdes_fullname {
55 char *name; /* network name of client, up to MAXNETNAMELEN */
56 des_block key; /* conversation key */
57 u_long window; /* associated window */
65 enum authdes_namekind adc_namekind;
66 struct authdes_fullname adc_fullname;
73 * A des authentication verifier
77 struct timeval adv_ctime; /* clear time */
78 des_block adv_xtime; /* crypt time */
84 * des authentication verifier: client variety
86 * adv_timestamp is the current time.
87 * adv_winverf is the credential window + 1.
88 * Both are encrypted using the conversation key.
90 #define adv_timestamp adv_time_u.adv_ctime
91 #define adv_xtimestamp adv_time_u.adv_xtime
92 #define adv_winverf adv_int_u
95 * des authentication verifier: server variety
97 * adv_timeverf is the client's timestamp + client's window
98 * adv_nickname is the server's nickname for the client.
99 * adv_timeverf is encrypted using the conversation key.
101 #define adv_timeverf adv_time_u.adv_ctime
102 #define adv_xtimeverf adv_time_u.adv_xtime
103 #define adv_nickname adv_int_u
106 extern int authdes_getucred __P(( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * ));
109 #endif /* ndef _AUTH_DES_ */