diff --git a/files/etc/arednsysupgrade.conf b/files/etc/arednsysupgrade.conf index f1f0b8e9..cc115a7b 100644 --- a/files/etc/arednsysupgrade.conf +++ b/files/etc/arednsysupgrade.conf @@ -26,7 +26,6 @@ /etc/firewall.user /etc/group /etc/hosts -/etc/httpd.conf /etc/gridsquare /etc/latlon /etc/local/services diff --git a/files/etc/httpd.conf b/files/etc/httpd.conf index 78df3541..9124a08c 100644 --- a/files/etc/httpd.conf +++ b/files/etc/httpd.conf @@ -1,6 +1,6 @@ -/cgi-bin/setup:root:hsmm -/cgi-bin/ports:root:hsmm -/cgi-bin/admin:root:hsmm -/cgi-bin/vpn:root:hsmm -/cgi-bin/vpnc:root:hsmm -/cgi-bin/supporttool:root:hsmm +/cgi-bin/setup:root:$p$root +/cgi-bin/ports:root:$p$root +/cgi-bin/admin:root:$p$root +/cgi-bin/vpn:root:$p$root +/cgi-bin/vpnc:root:$p$root +/cgi-bin/supporttool:root:$p$root diff --git a/files/etc/uci-defaults/40_aredn_migrate-httpdconf b/files/etc/uci-defaults/40_aredn_migrate-httpdconf old mode 100644 new mode 100755 index 7aa6b2df..1040ac38 --- a/files/etc/uci-defaults/40_aredn_migrate-httpdconf +++ b/files/etc/uci-defaults/40_aredn_migrate-httpdconf @@ -1,20 +1,10 @@ #!/bin/sh -IFS=" -" - -addedpaths="/cgi-bin/vpn -/cgi-bin/vpnc -/cgi-bin/supporttool -" - -currentpwd=$(grep "/cgi-bin/setup" /etc/httpd.conf |cut -d ':' -f 3) - -for protectedpath in $addedpaths -do - if grep -q "$protectedpath" "/etc/httpd.conf"; then - continue - fi - echo "$protectedpath:root:$currentpwd" >> /etc/httpd.conf -done - +cat > /etc/httpd.conf <<'EOF' +/cgi-bin/setup:root:$p$root +/cgi-bin/ports:root:$p$root +/cgi-bin/admin:root:$p$root +/cgi-bin/vpn:root:$p$root +/cgi-bin/vpnc:root:$p$root +/cgi-bin/supporttool:root:$p$root +EOF diff --git a/files/usr/local/bin/setpasswd b/files/usr/local/bin/setpasswd index 42979c07..1bc3be70 100755 --- a/files/usr/local/bin/setpasswd +++ b/files/usr/local/bin/setpasswd @@ -47,13 +47,4 @@ $pw2 = $pw; $pw2 =~ s/'/'\\''/g; system "{ echo '$pw2'; sleep 1; echo '$pw2'; } | passwd > /dev/null\n"; -@web = `cat /etc/httpd.conf`; -open(FILE, ">/etc/httpd.conf") or die; -foreach(@web) -{ - s/^(.*:root:)(.*)$/$1$pw/; - print FILE $_; -} -close(FILE); - print STDERR "passwords changed.\n";