From 94a6dfbc9fb8b0b4d370723148fb418a1646f589 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 10 Oct 2005 20:11:47 +0000 Subject: [PATCH] fix set password issue in header function SVN-Revision: 2097 --- openwrt/package/webif/files/usr/lib/webif/webif.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 <
-- 2.30.2