Skip to content
Snippets Groups Projects
Commit bcad7263 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

fix for the password check (checked the wrong variable)

SVN-Revision: 4887
parent 92d09560
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,11 @@ diff -urN busybox.old/networking/httpd.c busybox.dev/networking/httpd.c ...@@ -16,11 +16,11 @@ diff -urN busybox.old/networking/httpd.c busybox.dev/networking/httpd.c
continue; continue;
} }
pp = strchr(p, ':'); pp = strchr(p, ':');
+ if(pp && pp[1] == '!' && pp[2] == ':')
+ continue;
+ if(pp && pp[1] == '$' && pp[2] == 'p' && + if(pp && pp[1] == '$' && pp[2] == 'p' &&
+ pp[3] == '$' && pp[4] && + pp[3] == '$' && pp[4] &&
+ (pwd = getpwnam(&pp[4])) != NULL) { + (pwd = getpwnam(&pp[4])) != NULL) {
+ if(pwd->pw_passwd && pwd->pw_passwd[0] == '!')
+ continue;
+ ppnew = malloc(5 + strlen(pwd->pw_passwd)); + ppnew = malloc(5 + strlen(pwd->pw_passwd));
+ ppnew[0] = ':'; + ppnew[0] = ':';
+ strcpy(ppnew + 1, pwd->pw_passwd); + strcpy(ppnew + 1, pwd->pw_passwd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment