3 authdial, passtokey, nvcsum, readnvram, convT2M, convM2T, convTR2M, convM2TR, convA2M, convM2A, convPR2M, convM2PR, _asgetticket, _asrequest, _asgetresp, _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(Authkey *key, char *password)
21 uchar nvcsum(void *mem, int len)
24 int readnvram(Nvrsafe *nv, int flag);
27 int convT2M(Ticket *t, char *msg, int len, Authkey *key)
30 int convM2T(char *msg, int len, Ticket *t, Authkey *key)
33 int convA2M(Authenticator *a, char *msg, int len, Ticket *t)
36 int convM2A(char *msg, int len, Authenticator *a, Ticket *t)
39 int convTR2M(Ticketreq *tr, char *msg, int len)
42 int convM2TR(char *msg, int len, Ticketreq *tr)
45 int convPR2M(Passwordreq *pr, char *msg, int len, Ticket *t)
48 int convM2PR(char *msg, int len, Passwordreq *pr, Ticket *t)
51 int _asgetticket(int fd, Ticketreq *tr, char *buf, int len)
54 int _asrequest(int fd, Ticketreq *tr)
57 int _asgetresp(int fd, Ticket *t, Authenticator *a, Authkey *key)
60 int _asrdresp(int fd, char *buf, int len)
63 dials an authentication server over the
68 The authentication domain,
70 specifies which server to call.
78 is queried for an entry which contains
82 the former having precedence,
83 and which also contains an
86 If it finds neither, it tries
88 in DNS as the authentication server.
89 The string dialed is then
90 .I netroot\fP!\fIserver\fP!ticket
96 If no entry is found, the error string is
97 set to ``no authentication server found''
102 .IB netroot !$auth! ticket
103 is used to make the call.
108 into a set of cryptographic keys and stores them in the
114 could not be converted,
118 reads authentication information into the structure:
121 .ta 4n +4n +8n +4n +4n +4n +4n
124 char machkey[DESKEYLEN]; /* was file server's authid's des key */
126 char authkey[DESKEYLEN]; /* authid's des key from password */
129 * file server config string of device holding full configuration;
130 * secstore key on non-file-servers.
132 char config[CONFIGLEN];
134 char authid[ANAMELEN]; /* auth userid, e.g., bootes */
136 char authdom[DOMLEN]; /* auth domain, e.g., cs.bell-labs.com */
141 On Sparc, MIPS, and SGI machines this information is
142 in non-volatile ram, accessible in the file
146 successively opens the following areas stopping with the
149 \- the partition named by the
173 on a DOS floppy in drive 0
177 on a DOS floppy in drive 1
186 must match their respective checksum or that field is zeroed.
191 or at least one checksum fails and
196 will prompt for new values on
198 and then write them back to the storage area.
204 will write the values in
206 back to the storage area.
213 convert tickets, authenticators, ticket requests, and password change request
214 structures into transmittable messages.
220 are used to convert them back.
222 is used for encrypting the message before transmission and decrypting
229 encrypt/decrypt the message with the random ticket key.
233 sends a ticket request
235 returning the two encrypted tickets in
239 encodes the ticket request
241 and sends it not waiting for a response.
242 After sending a request,
244 can be used to receive the response containing a ticket and an optional
245 authenticator and decrypts the ticket and authenticator using
249 receives either a character array or an error string.
250 On error, it sets errstr and returns -1. If successful,
251 it returns the number of bytes received.
253 .B /sys/src/libauthsrv
262 Integer-valued functions return -1 on error.