tests: fix an obsolete and now unsupported syntax for 'find -perm'
tests/test01_pkgquality tests/test02_pkgsecurity Fix an obsolete and now unsupported syntax of the external tool 'find' (-perm +<mode>) that made some quality and security tests fail. The supported one is now: -perm /<mode> Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
f172d7e6db
commit
5a4e8f799a
@ -61,6 +61,10 @@ Sat Sep 20 2014 Madrisan <davide.madrisan(a)gmail.com>
|
||||
as required by smart.
|
||||
Also add comments and a FIXME about a problem with previous patch of this
|
||||
|
||||
+ bugfix
|
||||
* tests/{test01_pkgquality,test02_pkgsecurity} - Davide Madrisan
|
||||
Fix an obsolete and now unsupported syntax for 'find -perm'.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Changes in version 1.16.4 - "Korbielow" release
|
||||
|
4
NEWS
4
NEWS
@ -45,6 +45,10 @@ List of user visible changes in the release 1.16.5
|
||||
* conf/04-rpmbuild-format-unpackaged-filelist.conf - Davide Madrisan
|
||||
The translation rules for Python 2.7 and Python 3 have been updated.
|
||||
|
||||
* tests/{test01_pkgquality,test02_pkgsecurity} - Davide Madrisan
|
||||
Fix an obsolete and now unsupported syntax for 'find -perm' that made some
|
||||
quality and security tests fail.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
List of user visible changes in the release 1.16.4 - "Korbielow" release
|
||||
|
@ -288,7 +288,7 @@ $"checking for binary files installed in /etc (see FHS)""${NORM}..."
|
||||
let "i = 0"
|
||||
for pck in ${rpmpkg_name[@]}; do
|
||||
pushd $tmpextractdir/$i >/dev/null
|
||||
for f in $( find ./etc -type f -perm +111 2>/dev/null ); do
|
||||
for f in $( find ./etc -type f -perm /111 2>/dev/null ); do
|
||||
case $f in
|
||||
./etc/rc.d/init.d/*) ;;
|
||||
*) let "warning = 1" &&
|
||||
|
@ -89,7 +89,7 @@ $"checking for RPATH vulnerabilities""${NORM}..."
|
||||
|
||||
# find ELF binaries (ELF 32-bit LSB executable)
|
||||
# and libs (ELF 32-bit LSB shared object)
|
||||
for f in $(find -mindepth 2 -perm +111 -type f); do
|
||||
for f in $(find -mindepth 2 -perm /111 -type f); do
|
||||
if [[ "$(file $f | grep " ELF ")" ]]; then
|
||||
rpath="$(security.filecheckrpath $f)"
|
||||
if [ "$rpath" ]; then
|
||||
@ -111,7 +111,7 @@ $"checking for setuid binaries""${NORM}..."
|
||||
let "i = 0"
|
||||
for pck in ${rpmpkg_name[@]}; do
|
||||
pushd $tmpextractdir/$i >/dev/null
|
||||
for f in $(find -mindepth 2 -perm +111 -type f 2>/dev/null); do
|
||||
for f in $(find -mindepth 2 -perm /111 -type f 2>/dev/null); do
|
||||
if [[ "$(LC_ALL=C file $f | grep " setuid ")" ]]; then
|
||||
notify.warning "${NORM}${pck##*/} --> ${f/./}"
|
||||
let "total_issues += 1"
|
||||
@ -147,7 +147,7 @@ $"checking for unsecure use of \`\$\$' in shell and perl scripts""${NORM}..."
|
||||
let "i = 0"
|
||||
for pck in ${rpmpkg_name[@]}; do
|
||||
pushd $tmpextractdir/$i >/dev/null
|
||||
for f in $(find -mindepth 1 -perm +111 -type f); do
|
||||
for f in $(find -mindepth 1 -perm /111 -type f); do
|
||||
# we are interesting only in shell scripts
|
||||
[[ "$(file $f | grep "shell script\|perl script")" ]] ||
|
||||
continue
|
||||
|
@ -860,7 +860,7 @@ This package contains static libraries and header files need for development."
|
||||
local pck_configure=`(\
|
||||
cd $tmpdir/$pck_rootdir &&
|
||||
{ [[ -x ./configure ]] && echo -n "./configure"
|
||||
LANG=C find . -mindepth 2 -type f -perm +111 \
|
||||
LANG=C find . -mindepth 2 -type f -perm /111 \
|
||||
-name configure -printf "%p "; } )`
|
||||
notify.debug "pck_configure = \"$pck_configure\""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user