| This is the mechanism that put entries in /sys/lib/httpd.rewrite |
| and passwords on the authserver in /sys/lib/httppasswords, which |
| was awkward to administer. Instead, use local .httplogin files, |
| which are implemented in sys/src/cmd/ip/httpd/authorize.c */ |
| httpauth(char *name, char *password) |
| afd = authdial(nil, nil); |
| /* send ticket request to AS */ |
| memset(&tr, 0, sizeof(tr)); |
| if(write(afd, buf, TICKREQLEN) != TICKREQLEN){ |
| if(_asrdresp(afd, buf, TICKETLEN) < 0){ |
| * use password and try to decrypt the |
| * ticket. If it doesn't work we've got a bad password, |
| passtokey(key, password); |
| if(t.num != AuthHr || strcmp(t.cuid, tr.uid)) |