fix for the password check (checked the wrong variable)

SVN-Revision: 4887
owl
Felix Fietkau 2006-10-02 17:43:42 +00:00
parent 92d0956040
commit bcad7263a0
1 changed files with 2 additions and 2 deletions

View File

@ -16,11 +16,11 @@ diff -urN busybox.old/networking/httpd.c busybox.dev/networking/httpd.c
continue;
}
pp = strchr(p, ':');
+ if(pp && pp[1] == '!' && pp[2] == ':')
+ continue;
+ if(pp && pp[1] == '$' && pp[2] == 'p' &&
+ pp[3] == '$' && pp[4] &&
+ (pwd = getpwnam(&pp[4])) != NULL) {
+ if(pwd->pw_passwd && pwd->pw_passwd[0] == '!')
+ continue;
+ ppnew = malloc(5 + strlen(pwd->pw_passwd));
+ ppnew[0] = ':';
+ strcpy(ppnew + 1, pwd->pw_passwd);