| plan 9 kernel history: overview | file list | diff list |
1993/0403/port/auth.c (diff list | history)
| 1993/0402/sys/src/9/port/auth.c:130,135 – 1993/0403/sys/src/9/port/auth.c:130,136 (short | long | prev | next) | ||
| 1993/0330 | memset(s, 0, sizeof(Session)); for(i = 0; i < CHALLEN; i++) s->cchal[i] = nrand(256); | |
| 1993/0403 | f->tag = NOTAG; | |
| 1993/0330 | f->type = Tsession; memmove(f->chal, s->cchal, CHALLEN); n = convS2M(f, buf); | |
| 1993/0402/sys/src/9/port/auth.c:237,246 – 1993/0403/sys/src/9/port/auth.c:238,249 | ||
| 1993/0330 | void freesession(Session *s) { | |
| 1993/0403 | Crypt *cp, *next; | |
| 1993/0330 |
| |
| 1993/0403 | for(cp = s->cache; cp; cp = next) { next = cp->next; | |
| 1993/0330 | freecrypt(cp); | |
| 1993/0403 | } | |
| 1993/0330 | free(s); } | |
| 1993/0402/sys/src/9/port/auth.c:262,270 – 1993/0403/sys/src/9/port/auth.c:265,278 | ||
| 1993/0330 | /* look for ticket in cache */ dofree = 0; | |
| 1993/0403 | lock(s); | |
| 1993/0330 | for(cp = s->cache; cp; cp = cp->next) if(strcmp(cp->t.cuid, u->p->user) == 0) break; | |
| 1993/0403 | id = s->cid++; unlock(s); | |
| 1993/0330 | if(cp == 0){ /* * create a ticket using hostkey, this solves the | |
| 1993/0402/sys/src/9/port/auth.c:280,288 – 1993/0403/sys/src/9/port/auth.c:288,293 | ||
| 1993/0330 | dofree = 1; } else memmove(f->ticket, cp->tbuf, TICKETLEN); | |
| 1993/0402/sys/src/9/port/auth.c:305,313 – 1993/0403/sys/src/9/port/auth.c:310,320 | ||
| 1993/0330 | if(s == 0) return; | |
| 1993/0403 | lock(s); | |
| 1993/0330 | for(cp = s->cache; cp; cp = cp->next) if(strcmp(cp->t.cuid, u->p->user) == 0) break; | |
| 1993/0403 | unlock(s); | |
| 1993/0330 | /* we're getting around authentication */ if(s == 0 || cp == 0 || s->authid[0] == 0 || strcmp(u->p->user, "none") == 0) | |