summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/meta-perl/recipes-scanners/checksecurity/files')
-rw-r--r--dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/check-setuid-use-more-portable-find-args.patch23
-rw-r--r--dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/setuid-log-folder.patch52
2 files changed, 75 insertions, 0 deletions
diff --git a/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/check-setuid-use-more-portable-find-args.patch b/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/check-setuid-use-more-portable-find-args.patch
new file mode 100644
index 0000000..f1fe8ed
--- /dev/null
+++ b/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/check-setuid-use-more-portable-find-args.patch
@@ -0,0 +1,23 @@
1From f3073b8e06a607677d47ad9a19533b2e33408a4f Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Wed, 5 Sep 2018 23:21:43 +0500
4Subject: [PATCH] check-setuid: use more portable find args
5
6Signed-off-by: Christopher Larson <chris_larson@mentor.com>
7---
8 plugins/check-setuid | 6 +++---
9 1 file changed, 3 insertions(+), 3 deletions(-)
10
11Index: checksecurity-2.0.15/plugins/check-setuid
12===================================================================
13--- checksecurity-2.0.15.orig/plugins/check-setuid 2018-09-06 00:49:23.930934294 +0500
14+++ checksecurity-2.0.15/plugins/check-setuid 2018-09-06 00:49:49.694934757 +0500
15@@ -99,7 +99,7 @@
16 ionice -t -c3 \
17 find `mount | grep -vE "$CHECKSECURITY_FILTER" | cut -d ' ' -f 3` \
18 -xdev $PATHCHK \
19- \( -type f -perm +06000 -o \( \( -type b -o -type c \) \
20+ \( -type f \( -perm -4000 -o -perm -2000 \) -o \( \( -type b -o -type c \) \
21 $DEVCHK \) \) \
22 -ignore_readdir_race \
23 -printf "%8i %5m %3n %-10u %-10g %9s %t %h/%f\n" |
diff --git a/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/setuid-log-folder.patch b/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/setuid-log-folder.patch
new file mode 100644
index 0000000..540ea9c
--- /dev/null
+++ b/dynamic-layers/meta-perl/recipes-scanners/checksecurity/files/setuid-log-folder.patch
@@ -0,0 +1,52 @@
1From 24dbeec135ff83f2fd35ef12fe9842f02d6fd337 Mon Sep 17 00:00:00 2001
2From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
3Date: Thu, 20 Jun 2013 15:14:55 +0300
4Subject: [PATCH] changed log folder for check-setuid
5
6check-setuid was creating logs in /var/log directory,
7which cannot be created persistently. To avoid errors
8the log folder was changed to /etc/checksecurity/.
9
10Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
11---
12 etc/check-setuid.conf | 2 +-
13 plugins/check-setuid | 6 +++---
14 2 files changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/etc/check-setuid.conf b/etc/check-setuid.conf
17index 621336f..e1532c0 100644
18--- a/etc/check-setuid.conf
19+++ b/etc/check-setuid.conf
20@@ -116,4 +116,4 @@ CHECKSECURITY_PATHFILTER="-false"
21 #
22 # Location of setuid file databases.
23 #
24-LOGDIR=/var/log/setuid
25+LOGDIR=/etc/checksecurity/
26diff --git a/plugins/check-setuid b/plugins/check-setuid
27index 8d6f90b..bdb21c1 100755
28--- a/plugins/check-setuid
29+++ b/plugins/check-setuid
30@@ -44,8 +44,8 @@ if [ `/usr/bin/id -u` != 0 ] ; then
31 exit 1
32 fi
33
34-TMPSETUID=${LOGDIR:=/var/log/setuid}/setuid.new.tmp
35-TMPDIFF=${LOGDIR:=/var/log/setuid}/setuid.diff.tmp
36+TMPSETUID=${LOGDIR:=/etc/checksecurity/}/setuid.new.tmp
37+TMPDIFF=${LOGDIR:=/etc/checksecurity/}/setuid.diff.tmp
38
39 #
40 # Check for NFS/AFS mounts that are not nosuid/nodev
41@@ -75,7 +75,7 @@ if [ "$CHECKSECURITY_NOFINDERRORS" = "TRUE" ] ; then
42 fi
43
44 # Guard against undefined vars
45-[ -z "$LOGDIR" ] && LOGDIR=/var/log/setuid
46+[ -z "$LOGDIR" ] && LOGDIR=/etc/checksecurity/
47 if [ ! -e "$LOGDIR" ] ; then
48 echo "ERROR: Log directory $LOGDIR does not exist"
49 exit 1
50--
511.7.9.5
52