mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
732 B

allow empty passwords (shadow-lookup only when 'x' found.)
(patch thankfully copied from T2)
--- fgetty-0.6/checkpassword.c 2001-09-10 12:35:12.000000000 +0200
+++ fgetty-0.6/checkpassword.c 2005-02-08 20:23:32.391861824 +0100
@@ -36,9 +36,11 @@
login=buf;
if ((pw=getpwnam(login))) {
passwd=pw->pw_passwd;
- if ((spw=getspnam(login)))
+ if (!strcmp(passwd, "x") && (spw=getspnam(login)))
passwd=spw->sp_pwdp;
- if (*passwd && !strcmp(crypt(ptr=login+strlen(login)+1,passwd),passwd)) {
+ ptr=login+strlen(login)+1;
+ if (*passwd == 0 || !strcmp(crypt(ptr,passwd),passwd)) {
+ puts("password checked\n");
char **env,**ep;
char buf[100];
for (len=0; environ[len]; ++len) ;