3 authdial, passtokey, nvcsum, readnvram, convT2M, convM2T, convTR2M, convM2TR, convA2M, convM2A, convPR2M, convM2PR, _asgetticket, _asrdresp \- routines for communicating with authentication servers
12 .ta 8n +4n +4n +4n +4n +4n +4n
15 int authdial(char *netroot, char *ad);
18 int passtokey(char key[DESKEYLEN], char *password)
21 uchar nvcsum(void *mem, int len)
24 int readnvram(Nvrsafe *nv, int flag);
27 int convT2M(Ticket *t, char *msg, char *key)
30 void convM2T(char *msg, Ticket *t, char *key)
33 int convA2M(Authenticator *a, char *msg, char *key)
36 void convM2A(char *msg, Authenticator *a, char *key)
39 int convTR2M(Ticketreq *tr, char *msg)
42 void convM2TR(char *msg, Ticketreq *tr)
45 int convPR2M(Passwordreq *pr, char *msg, char *key)
48 void convM2PR(char *msg, Passwordreq *pr, char *key)
51 int _asgetticket(int fd, char *trbuf, char *tbuf);
54 int _asrdresp(int fd, char *buf, int len);
58 dials an authentication server over the
63 The authentication domain,
65 specifies which server to call.
72 is queried for an entry which contains
76 the former having precedence,
77 and which also contains an
80 The string dialed is then
81 .I netroot\fP!\fIserver\fP!ticket
87 If no entry is found, the error string is
88 set to ``no authentication server found''
93 .IB netroot !$auth! ticket
94 is used to make the call.
99 into a DES key and stores the result in
103 could not be converted,
107 reads authentication information into the structure:
109 .ta 4n +4n +8n +4n +4n +4n +4n
112 char machkey[DESKEYLEN];
114 char authkey[DESKEYLEN];
116 char config[CONFIGLEN];
118 char authid[ANAMELEN];
120 char authdom[DOMLEN];
125 On Sparc, MIPS, and SGI machines this information is
126 in non-volatile ram, accessible in the file
130 successively opens the following areas stopping with the
133 \- the partition named by the
136 .\" (commonly set via
137 .\" .IR plan9.ini (8))
157 on a DOS floppy in drive 0
161 on a DOS floppy in drive 1
170 must match their respective checksum or that field is zeroed.
175 or at least one checksum fails and
180 will prompt for new values on
182 and then write them back to the storage area.
189 convert tickets, authenticators, ticket requests, and password change request
190 structures into transmittable messages.
196 are used to convert them back.
198 is used for encrypting the message before transmission and decrypting
203 receives either a character array or an error string.
204 On error, it sets errstr and returns -1. If successful,
205 it returns the number of bytes received.
209 sends a ticket request message and then uses
211 to recieve an answer.
213 .B \*9/src/libauthsrv
222 Integer-valued functions return -1 on error.