From: Felix Fietkau Date: Mon, 2 Oct 2006 17:43:42 +0000 (+0000) Subject: fix for the password check (checked the wrong variable) X-Git-Tag: whiterussian_rc6~120 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f4473d19e307ef4526f9b772a01ea22b8af2b791;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix for the password check (checked the wrong variable) SVN-Revision: 4887 --- diff --git a/openwrt/package/busybox/patches/310-passwd_access.patch b/openwrt/package/busybox/patches/310-passwd_access.patch index 4ecb0d61d4..e1a4fdad39 100644 --- a/openwrt/package/busybox/patches/310-passwd_access.patch +++ b/openwrt/package/busybox/patches/310-passwd_access.patch @@ -13,11 +13,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);