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 void 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 reads authentication information into the structure:
117 .ta 4n +4n +8n +4n +4n +4n +4n
120 char machkey[DESKEYLEN]; /* was file server's authid's des key */
122 char authkey[DESKEYLEN]; /* authid's des key from password */
125 * file server config string of device holding full configuration;
126 * secstore key on non-file-servers.
128 char config[CONFIGLEN];
130 char authid[ANAMELEN]; /* auth userid, e.g., bootes */
132 char authdom[DOMLEN]; /* auth domain, e.g., cs.bell-labs.com */
137 On Sparc, MIPS, and SGI machines this information is
138 in non-volatile ram, accessible in the file
142 successively opens the following areas stopping with the
145 \- the partition named by the
169 on a DOS floppy in drive 0
173 on a DOS floppy in drive 1
182 must match their respective checksum or that field is zeroed.
187 or at least one checksum fails and
192 will prompt for new values on
194 and then write them back to the storage area.
200 will write the values in
202 back to the storage area.
209 convert tickets, authenticators, ticket requests, and password change request
210 structures into transmittable messages.
216 are used to convert them back.
218 is used for encrypting the message before transmission and decrypting
225 encrypt/decrypt the message with the random ticket key.
229 sends a ticket request
231 returning the two encrypted tickets in
235 encodes the ticket request
237 and sends it not waiting for a response.
238 After sending a request,
240 can be used to receive the response containing a ticket and an optional
241 authenticator and decrypts the ticket and authenticator using
245 receives either a character array or an error string.
246 On error, it sets errstr and returns -1. If successful,
247 it returns the number of bytes received.
249 .B /sys/src/libauthsrv
258 Integer-valued functions return -1 on error.