libcfg.lib: do not check for configuration files groups and permissions

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-11-10 21:42:10 +01:00
parent ffe2b496d1
commit 4edf024f5f
2 changed files with 6 additions and 9 deletions

View File

@ -27,6 +27,12 @@ Changes in version 1.14.2
Remove the variable 'rpmbuild_group': it's no more needed. Personal data is Remove the variable 'rpmbuild_group': it's no more needed. Personal data is
located in the files ~/.autospec and ~/.autospec.d/*.conf located in the files ~/.autospec and ~/.autospec.d/*.conf
+ update
* lib/libcfg.lib - Davide Madrisan:
config.security(): do not check for configuration files groups and
permissions. These files are now own by root and never contain sensible
data (that is passwords).
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Changes in version 1.14.1 - _TO*Hacklab release Changes in version 1.14.1 - _TO*Hacklab release

View File

@ -61,15 +61,6 @@ function config.security() {
[ "$(groups 2>/dev/null | grep $packager_group 2>/dev/null)" ] || [ "$(groups 2>/dev/null | grep $packager_group 2>/dev/null)" ] ||
notify.error $"\ notify.error $"\
user \`$(id -nu)' does not belong to group \`$packager_group'" user \`$(id -nu)' does not belong to group \`$packager_group'"
# security check for configuration file(s) groups and permissions
for f in ${default_cfg[0]}; do
cfg_file_mod=(`find $f -printf "%g %m" 2>/dev/null`)
[[ ${cfg_file_mod[0]} = $packager_group &&
"`expr ${cfg_file_mod[1]} : '.*\(.\)'`" = 0 ]] ||
notify.warning $"\
the file \`$f' should be readable only by the group \`$packager_group'"
done
else else
notify.warning "\`packager_group' "$"unset in the configuration files" notify.warning "\`packager_group' "$"unset in the configuration files"
fi fi