diff options
Diffstat (limited to 'recipes-security/redhat-security/files/find-elf4tmp.sh')
-rw-r--r-- | recipes-security/redhat-security/files/find-elf4tmp.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes-security/redhat-security/files/find-elf4tmp.sh b/recipes-security/redhat-security/files/find-elf4tmp.sh index 8f39baa..3118a70 100644 --- a/recipes-security/redhat-security/files/find-elf4tmp.sh +++ b/recipes-security/redhat-security/files/find-elf4tmp.sh | |||
@@ -19,7 +19,7 @@ if [ $# -ge 2 ] ; then | |||
19 | echo "Usage: find_elf4tmp [directory]" 1>&2 | 19 | echo "Usage: find_elf4tmp [directory]" 1>&2 |
20 | exit 1 | 20 | exit 1 |
21 | fi | 21 | fi |
22 | if [ ! -x /usr/bin/eu-strings ] ; then | 22 | if [ ! -x /usr/bin/strings ] ; then |
23 | echo "Skipping due to missing /usr/bin/eu-strings utility" | 23 | echo "Skipping due to missing /usr/bin/eu-strings utility" |
24 | exit 1 | 24 | exit 1 |
25 | fi | 25 | fi |
@@ -49,7 +49,7 @@ do | |||
49 | # Get just the elf executables | 49 | # Get just the elf executables |
50 | testf=`echo $f | /usr/bin/file -n -f - 2>/dev/null | grep ELF` | 50 | testf=`echo $f | /usr/bin/file -n -f - 2>/dev/null | grep ELF` |
51 | if [ x"$testf" != "x" ] ; then | 51 | if [ x"$testf" != "x" ] ; then |
52 | test_res=`/usr/bin/eu-strings $f | /bin/grep '/tmp/' | /bin/egrep -v 'XX|/tmp/$|[ .,:]/tmp/'` | 52 | test_res=`/usr/bin/strings $f | /bin/grep '/tmp/' | /bin/egrep -v 'XX|/tmp/$|[ .,:]/tmp/'` |
53 | if [ x"$test_res" = "x" ] ; then | 53 | if [ x"$test_res" = "x" ] ; then |
54 | continue | 54 | continue |
55 | fi | 55 | fi |
@@ -64,13 +64,13 @@ do | |||
64 | FOUND=1 | 64 | FOUND=1 |
65 | 65 | ||
66 | # Get the package | 66 | # Get the package |
67 | RPM=`/bin/rpm -qf --queryformat "%{NAME}-%{VERSION}" $f 2>/dev/null | /bin/grep -v 'not owned' | /bin/sort | /usr/bin/uniq` | 67 | RPM=`/bin/rpm -qf --queryformat "%{NAME}-%{VERSION}" $f 2>/dev/null | /bin/grep -v 'not owned' | /usr/bin/sort | /usr/bin/uniq` |
68 | if [ x"$RPM" = "x" ] ; then | 68 | if [ x"$RPM" = "x" ] ; then |
69 | RPM="<unowned>" | 69 | RPM="<unowned>" |
70 | fi | 70 | fi |
71 | 71 | ||
72 | # For each tmp string, output the line | 72 | # For each tmp string, output the line |
73 | echo $test_res | /usr/bin/tr '\b' '\n' | /bin/awk 'NF >= 1 { printf "%-46s\t%-30s\t%s\n", f, r, $1 }' r=$RPM f=$f | 73 | echo $test_res | /usr/bin/tr '\b' '\n' | /usr/bin/awk 'NF >= 1 { printf "%-46s\t%-30s\t%s\n", f, r, $1 }' r=$RPM f=$f |
74 | fi | 74 | fi |
75 | done | 75 | done |
76 | done | 76 | done |