plan 9 kernel history: overview | file list | diff list

1993/0402/port/auth.c (diff list | history)

1993/0330/sys/src/9/port/auth.c:135,1411993/0402/sys/src/9/port/auth.c:135,144 (short | long | prev | next)
Hack around Datakit OK. Report bad cuid as auth error.
rsc Fri Mar 4 12:44:25 2005
1993/0330    
		n = convS2M(f, buf); 
		if((*devtab[c->type].write)(c, buf, n, 0) != n) 
			error(Emountrpc); 
1993/0402    
	dkhack: 
1993/0330    
		n = (*devtab[c->type].read)(c, buf, MAXMSG, 0); 
1993/0402    
		if(n == 2 && buf[0] == 'O' && buf[1] == 'K') 
			goto dkhack; 
1993/0330    
		if(convM2S(buf, f, n) == 0) 
			error(Emountrpc); 
		if(f->type == Rsession){ 
1993/0330/sys/src/9/port/auth.c:409,4161993/0402/sys/src/9/port/auth.c:412,421
1993/0330    
		c->aux = newcrypt(); 
	cp = c->aux; 
	convM2T(a, &cp->t, evekey); 
	if(cp->t.num != AuthTc || strcmp(u->p->user, cp->t.cuid)) 
1993/0402    
	if(cp->t.num != AuthTc) 
1993/0330    
		error(Ebadarg); 
1993/0402    
	if(strcmp(u->p->user, cp->t.cuid)) 
		error(cp->t.cuid); 
1993/0330    
	convM2A(a+TICKETLEN, &cp->a, cp->t.key); 
	if(cp->a.num != AuthAs || memcmp(cp->t.chal, cp->a.chal, CHALLEN)) 
		error(Eperm); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)