From: Felix Fietkau Date: Mon, 10 Oct 2005 20:11:47 +0000 (+0000) Subject: fix set password issue in header function X-Git-Tag: whiterussian_rc4~121 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=94a6dfbc9fb8b0b4d370723148fb418a1646f589;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix set password issue in header function SVN-Revision: 2097 --- diff --git a/openwrt/package/webif/files/usr/lib/webif/webif.sh b/openwrt/package/webif/files/usr/lib/webif/webif.sh index a2c889158a..f624720db9 100644 --- a/openwrt/package/webif/files/usr/lib/webif/webif.sh +++ b/openwrt/package/webif/files/usr/lib/webif/webif.sh @@ -71,6 +71,12 @@ header() { _savebutton="${5:+

}" _categories=$(categories $1) _subcategories=${2:+$(subcategories "$1" "$2")} + + empty "$REMOTE_USER" && neq "${SCRIPT_NAME#/cgi-bin/}" "webif.sh" && grep 'root:!' /etc/passwd >&- 2>&- && { + _nopasswd=1 + _form="" + _savebutton="" + } update_changes cat <' ( echo "$FORM_passwd1" @@ -119,7 +125,8 @@ EOF footer exit } - grep 'root:!' /etc/passwd >&- 2>&- && { + + equal "$_nopasswd" 1 && { cat <