diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-23 20:52:47 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-06-23 20:52:47 +0000 |
commit | 1f56baceee8d86b84c07227b6a6bfe9a95b6b123 (patch) | |
tree | d44a3c9a87f3d812687f08a32e7d98dbe4c2e9a5 /cron-sh/security_check.sh | |
parent | c34ef5f3c13e691056c6a59b6b945d87c678b710 (diff) | |
download | msec-1f56baceee8d86b84c07227b6a6bfe9a95b6b123.tar msec-1f56baceee8d86b84c07227b6a6bfe9a95b6b123.tar.gz msec-1f56baceee8d86b84c07227b6a6bfe9a95b6b123.tar.bz2 msec-1f56baceee8d86b84c07227b6a6bfe9a95b6b123.tar.xz msec-1f56baceee8d86b84c07227b6a6bfe9a95b6b123.zip |
Add support for FIX_UNOWNED to allow changing unowned files owner and
group (#51791).
Diffstat (limited to 'cron-sh/security_check.sh')
-rwxr-xr-x | cron-sh/security_check.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cron-sh/security_check.sh b/cron-sh/security_check.sh index bbff82a..fe1418b 100755 --- a/cron-sh/security_check.sh +++ b/cron-sh/security_check.sh @@ -40,7 +40,9 @@ if [[ ${CHECK_UNOWNED} == yes ]]; then printf "\t( theses files now have user \"nobody\" as their owner. )\n" >> ${SECURITY} cat ${UNOWNED_USER_TODAY} | awk '{print "\t\t- " $0}' >> ${SECURITY} cat ${UNOWNED_USER_TODAY} | while read line; do + if [[ ${FIX_UNOWNED} == yes ]]; then chown nobody "${line}"; # Use quote if filename contain space. + fi done fi @@ -49,7 +51,9 @@ if [[ ${CHECK_UNOWNED} == yes ]]; then printf "\t( theses files now have group \"nogroup\" as their group owner. )\n" >> ${SECURITY} cat ${UNOWNED_GROUP_TODAY} | awk '{print "\t\t- " $0}' >> ${SECURITY} cat ${UNOWNED_GROUP_TODAY} | while read line; do + if [[ ${FIX_UNOWNED} == yes ]]; then chgrp nogroup "${line}"; # Use quote if filename contain space. + fi done fi fi |