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

1992/0325/boot/userpasswd.c (diff list | history)

1992/0323/sys/src/9/boot/userpasswd.c:4,101992/0325/sys/src/9/boot/userpasswd.c:4,12 (short | long | prev | next)
1992/0317    
#include <../boot/boot.h> 
 
char	password[NAMELEN]; 
1992/0325    
#ifdef asdf 
1992/0323    
extern	char *sauth; 
1992/0325    
#endif asdf 
1992/0317    
 
/* 
 *  get/set user name and password.  verify password with auth server. 
1992/0323/sys/src/9/boot/userpasswd.c:20,311992/0325/sys/src/9/boot/userpasswd.c:22,27
1992/0317    
	if(*username == 0 || strcmp(username, "none") == 0){ 
		strcpy(username, "none"); 
		outin("user", username, sizeof(username)); 
1992/0323    
		/* Hack to do authentication testing */ 
		p = utfrrune(username, '!'); 
		if(p && p > username) { 
			*p = '\0'; 
			sauth = "any"; 
		} 
1992/0317    
	} 
	crfd = fd = -1; 
1992/0318    
	while(strcmp(username, "none") != 0 && !islocal){ 
1992/0323/sys/src/9/boot/userpasswd.c:41,471992/0325/sys/src/9/boot/userpasswd.c:37,45
1992/0317    
		if(crfd < 0) 
			fatal("can't open crypt file"); 
		write(crfd, "E", 1); 
		fd = (*mp->auth)(); 
1992/0325    
		fd = -1; 
		if(mp->auth) 
			fd = (*mp->auth)(); 
1992/0317    
		if(fd < 0){ 
			warning("password not checked!"); 
			break; 


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