mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-23 01:03:35 +07:00
refactoring
This commit is contained in:
parent
d00235897d
commit
fdd1f4b7f8
@ -17,21 +17,25 @@ run_cmd_whitelist() {
|
||||
|
||||
echo "$0: INFO: START"
|
||||
|
||||
sysfs_whitelist=1
|
||||
cpuinfo_whitelist=1
|
||||
default_variables_set() {
|
||||
sysfs_whitelist=1
|
||||
cpuinfo_whitelist=1
|
||||
|
||||
sysfs=1
|
||||
sysfs=1
|
||||
|
||||
## https://www.kicksecure.com/wiki/Security-misc#selinux
|
||||
selinux=0
|
||||
## https://www.kicksecure.com/wiki/Security-misc#selinux
|
||||
selinux=0
|
||||
}
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
## Allows for disabling the whitelist.
|
||||
for i in /usr/local/etc/hide-hardware-info.d/*.conf /etc/hide-hardware-info.d/*.conf ; do
|
||||
parse_configuration() {
|
||||
## Allows for disabling the whitelist.
|
||||
for i in /usr/local/etc/hide-hardware-info.d/*.conf /etc/hide-hardware-info.d/*.conf ; do
|
||||
bash -n "${i}"
|
||||
source "${i}"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
create_whitelist() {
|
||||
if [ "${1}" = "sysfs" ]; then
|
||||
@ -55,6 +59,9 @@ create_whitelist() {
|
||||
fi
|
||||
}
|
||||
|
||||
default_variables_set
|
||||
parse_configuration
|
||||
|
||||
## sysfs and debugfs expose a lot of information
|
||||
## that should not be accessible by an unprivileged
|
||||
## user which includes hardware info, debug info and
|
||||
|
Loading…
Reference in New Issue
Block a user