Commit 18065826 authored by osm0sis's avatar osm0sis Committed by John Wu

scripts: improve basic module setup

- expand utility of the basic module setup (zip without customize.sh) by setting more default perms, since really it couldn't do any simple binary files additions correctly withonly 0755 0644
- ensure CON stays local
parent 84e19cee
...@@ -658,7 +658,7 @@ copy_sepolicy_rules() { ...@@ -658,7 +658,7 @@ copy_sepolicy_rules() {
set_perm() { set_perm() {
chown $2:$3 $1 || return 1 chown $2:$3 $1 || return 1
chmod $4 $1 || return 1 chmod $4 $1 || return 1
CON=$5 local CON=$5
[ -z $CON ] && CON=u:object_r:system_file:s0 [ -z $CON ] && CON=u:object_r:system_file:s0
chcon $CON $1 || return 1 chcon $CON $1 || return 1
} }
...@@ -758,6 +758,10 @@ install_module() { ...@@ -758,6 +758,10 @@ install_module() {
# Default permissions # Default permissions
set_perm_recursive $MODPATH 0 0 0755 0644 set_perm_recursive $MODPATH 0 0 0755 0644
set_perm_recursive $MODPATH/system/bin 0 2000 0755 0755
set_perm_recursive $MODPATH/system/xbin 0 2000 0755 0755
set_perm_recursive $MODPATH/system/system_ext/bin 0 2000 0755 0755
set_perm_recursive $MODPATH/system/vendor/bin 0 2000 0755 0755 u:object_r:vendor_file:s0
fi fi
# Load customization script # Load customization script
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment