mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
security fixes: change _access_r to _access_w
ice-client: perform del_list prior to add_list _access_w
This commit is contained in:
parent
54e25d9c59
commit
5260f1ecfb
3 changed files with 7 additions and 3 deletions
|
|
@ -7,7 +7,8 @@ grep -rq "^ice:" /etc/passwd || {
|
||||||
uci -q delete passwords.ice
|
uci -q delete passwords.ice
|
||||||
uci -q set passwords.ice=usertype
|
uci -q set passwords.ice=usertype
|
||||||
uci -q set passwords.ice.password="\$WPAKEY"
|
uci -q set passwords.ice.password="\$WPAKEY"
|
||||||
uci -q add_list passwords.ice._access_r=root
|
uci -q del_list passwords.ice._access_w=root
|
||||||
|
uci -q add_list passwords.ice._access_w=root
|
||||||
uci -q commit passwords
|
uci -q commit passwords
|
||||||
|
|
||||||
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
||||||
|
|
@ -16,7 +17,7 @@ cat >> /etc/config/rpcd << EOF
|
||||||
config login
|
config login
|
||||||
option username 'ice'
|
option username 'ice'
|
||||||
option password '\$p\$ice'
|
option password '\$p\$ice'
|
||||||
list _access_r 'none'
|
list _access_w 'none'
|
||||||
list write 'user-user'
|
list write 'user-user'
|
||||||
list write 'juci-broadcom-dsl'
|
list write 'juci-broadcom-dsl'
|
||||||
list write 'juci-broadcom-dsl-admin'
|
list write 'juci-broadcom-dsl-admin'
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,8 @@ populate_netmodes() {
|
||||||
if json_select acl; then
|
if json_select acl; then
|
||||||
_i=1
|
_i=1
|
||||||
while json_get_var user $_i; do
|
while json_get_var user $_i; do
|
||||||
uci add_list netmode.$mode._access_r="$user"
|
uci del_list netmode.$mode._access_w="$user"
|
||||||
|
uci add_list netmode.$mode._access_w="$user"
|
||||||
_i=$((_i+1))
|
_i=$((_i+1))
|
||||||
done
|
done
|
||||||
json_select ..
|
json_select ..
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ uci -q batch <<-EOT
|
||||||
set firewall.sip=include
|
set firewall.sip=include
|
||||||
set firewall.sip.path=/etc/firewall.sip
|
set firewall.sip.path=/etc/firewall.sip
|
||||||
set firewall.sip.reload=1
|
set firewall.sip.reload=1
|
||||||
|
uci del_list firewall.sip._access_w="root"
|
||||||
|
uci add_list firewall.sip._access_w="root"
|
||||||
commit firewall
|
commit firewall
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue