fix for the password check (checked the wrong variable)
authorFelix Fietkau <nbd@openwrt.org>
Mon, 2 Oct 2006 17:43:42 +0000 (17:43 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 2 Oct 2006 17:43:42 +0000 (17:43 +0000)
SVN-Revision: 4887

openwrt/package/busybox/patches/310-passwd_access.patch

index 3d4efb13513bee378568e6a55e56196c19cb203d..740181ac77842f8dc65687b28c470f5081245c90 100644 (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);