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

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

1992/0318/sys/src/9/boot/userpasswd.c:1,51992/0322/sys/src/9/boot/userpasswd.c:1,6 (short | long | prev | next)
1992/0317    
#include <u.h> 
#include <libc.h> 
1992/0322    
#include <auth.h> 
1992/0317    
#include <../boot/boot.h> 
 
char	password[NAMELEN]; 
1992/0318/sys/src/9/boot/userpasswd.c:21,301992/0322/sys/src/9/boot/userpasswd.c:22,28
1992/0317    
	crfd = fd = -1; 
1992/0318    
	while(strcmp(username, "none") != 0 && !islocal){ 
1992/0317    
		getpasswd(password, sizeof password); 
		if(!passtokey(key, password, strlen(password))){ 
			print("bad password; try again\n"); 
			continue; 
		} 
1992/0322    
		passtokey(key, password); 
1992/0317    
		fd = open("#c/key", OWRITE); 
		if(fd < 0) 
			fatal("can't open #c/key; please reboot"); 


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