summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@eng.windriver.com>2025-03-27 21:23:23 +0800
committerArmin Kuster <akuster808@gmail.com>2025-04-13 14:07:57 -0400
commitb9d0a654048c7bdd8543ff4db66768426ff4387b (patch)
treecc6e84c9e276374504df09f0d5e2acefa09e36a9
parent2dc22272672a466040ccafb5b407b4c4d0ea3b26 (diff)
downloadmeta-security-b9d0a654048c7bdd8543ff4db66768426ff4387b.tar.gz
samhain: upgrade 4.4.10 -> 4.5.2
ChangeLog: https://fossies.org/linux/samhain/docs/Changelog * Refresh patches Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--recipes-ids/samhain/files/0001-Hash-fix-for-MIPS64-and-AARCH64.patch (renamed from recipes-ids/samhain/files/samhain-mips64-aarch64-dnmalloc-hash-fix.patch)27
-rw-r--r--recipes-ids/samhain/files/0002-Make-samhainrc-OE-friendly.patch (renamed from recipes-ids/samhain/files/samhain-samhainrc.patch)25
-rw-r--r--recipes-ids/samhain/files/0003-fix-real-path-for-some-files-dirs.patch (renamed from recipes-ids/samhain/files/samhain-samhainrc-fix-files-dirs-path.patch)10
-rw-r--r--recipes-ids/samhain/files/0004-Set-the-PID-Lock-path-for-samhain.pid.patch (renamed from recipes-ids/samhain/files/samhain-pid-path.patch)21
-rw-r--r--recipes-ids/samhain/files/0005-Fix-sha256-for-big-endian-machines.patch (renamed from recipes-ids/samhain/files/samhain-sha256-big-endian.patch)16
-rw-r--r--recipes-ids/samhain/files/0006-configure-add-option-for-ps.patch (renamed from recipes-ids/samhain/files/samhain-configure-add-option-for-ps.patch)72
-rw-r--r--recipes-ids/samhain/files/0007-configure.ac-avoid-searching-host-for-postgresql.patch (renamed from recipes-ids/samhain/files/samhain-avoid-searching-host-for-postgresql.patch)27
-rw-r--r--recipes-ids/samhain/files/0008-Add-LDFLAGS-variable-for-compiling-samhain_setpwd.patch (renamed from recipes-ids/samhain/files/samhain-add-LDFLAGS-variable-for-samhain_setpwd.patch)8
-rw-r--r--recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch (renamed from recipes-ids/samhain/files/fix-build-with-new-version-attr.patch)22
-rw-r--r--recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch (renamed from recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch)10
-rw-r--r--recipes-ids/samhain/files/0011-not-run-test-on-host-since-we-are-doing-cross-compil.patch (renamed from recipes-ids/samhain/files/samhain-not-run-ptest-on-host.patch)13
-rw-r--r--recipes-ids/samhain/files/0012-Don-t-expose-configure-args.patch (renamed from recipes-ids/samhain/files/0001-Don-t-expose-configure-args.patch)4
-rw-r--r--[-rwxr-xr-x]recipes-ids/samhain/files/run-ptest0
-rw-r--r--recipes-ids/samhain/samhain-standalone.bb7
-rw-r--r--recipes-ids/samhain/samhain.inc24
15 files changed, 168 insertions, 118 deletions
diff --git a/recipes-ids/samhain/files/samhain-mips64-aarch64-dnmalloc-hash-fix.patch b/recipes-ids/samhain/files/0001-Hash-fix-for-MIPS64-and-AARCH64.patch
index 0608660..a34c553 100644
--- a/recipes-ids/samhain/files/samhain-mips64-aarch64-dnmalloc-hash-fix.patch
+++ b/recipes-ids/samhain/files/0001-Hash-fix-for-MIPS64-and-AARCH64.patch
@@ -1,28 +1,30 @@
1commit 0f6bdc219e598de08a3f37887efa5dfa50e2b996 1From 3f6884e711cdbd66ceca8ed13158b11ca2d6ddc1 Mon Sep 17 00:00:00 2001
2Author: Aws Ismail <aws.ismail@windriver.com> 2From: Aws Ismail <aws.ismail@windriver.com>
3Date: Fri Jun 22 15:47:08 2012 -0400 3Date: Fri, 22 Jun 2012 15:47:08 -0400
4Subject: [PATCH] Hash fix for MIPS64 and AARCH64
4 5
5Hash fix for MIPS64 and AARCH64
6
7Samhain uses the addresses of local variables in generating hash 6Samhain uses the addresses of local variables in generating hash
8values. The hashing function is designed only for 32-bit values. 7values. The hashing function is designed only for 32-bit values.
9For MIPS64 when a 64-bit address is passed in the resulting hash 8For MIPS64 when a 64-bit address is passed in the resulting hash
10exceeds the limits of the underlying mechanism and samhain 9exceeds the limits of the underlying mechanism and samhain
11ultimately fails. The solution is to simply take the lower 10ultimately fails. The solution is to simply take the lower
1232-bits of the address and use that in generating hash values. 1132-bits of the address and use that in generating hash values.
13 12
14Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com> 13Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com>
15 14
16Upstream-Status: Pending 15Upstream-Status: Pending
17 16
18Signed-off-by: Aws Ismail <aws.ismail@windriver.com> 17Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
19Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 18Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
19---
20 src/dnmalloc.c | 8 ++++++++
21 1 file changed, 8 insertions(+)
20 22
21diff --git a/src/dnmalloc.c b/src/dnmalloc.c 23diff --git a/src/dnmalloc.c b/src/dnmalloc.c
22index da9a5c5..fc91400 100644 24index 9f7bacc..d6e9ec5 100644
23--- a/src/dnmalloc.c 25--- a/src/dnmalloc.c
24+++ b/src/dnmalloc.c 26+++ b/src/dnmalloc.c
25@@ -2703,11 +2703,19 @@ static void freecilst_add(chunkinfoptr p) { 27@@ -2710,11 +2710,19 @@ static void freecilst_add(chunkinfoptr p) {
26 } 28 }
27 29
28 /* Calculate the hash table entry for a chunk */ 30 /* Calculate the hash table entry for a chunk */
@@ -38,7 +40,10 @@ index da9a5c5..fc91400 100644
38 #else 40 #else
39 #define hash(p) (((unsigned long) p - (unsigned long) startheap) >> 7) 41 #define hash(p) (((unsigned long) p - (unsigned long) startheap) >> 7)
40 #endif 42 #endif
41+#endif /* CONFIG_ARCH_MIPS64 */ 43+#endif /* CONFIG_ARCH_MIPS64 */
42 44
43 static void 45 static void
44 hashtable_add (chunkinfoptr ci) 46 hashtable_add (chunkinfoptr ci)
47--
482.34.1
49
diff --git a/recipes-ids/samhain/files/samhain-samhainrc.patch b/recipes-ids/samhain/files/0002-Make-samhainrc-OE-friendly.patch
index 145700a..5e0cf59 100644
--- a/recipes-ids/samhain/files/samhain-samhainrc.patch
+++ b/recipes-ids/samhain/files/0002-Make-samhainrc-OE-friendly.patch
@@ -1,20 +1,22 @@
1commit 4c6658441eb3ffc4e51ed70f78cbdab046957580 1From 5797a57fd839d4b42c38fec49a6f937ca2e359af Mon Sep 17 00:00:00 2001
2Author: Aws Ismail <aws.ismail@windriver.com> 2From: Aws Ismail <aws.ismail@windriver.com>
3Date: Fri Jun 22 16:38:20 2012 -0400 3Date: Fri, 22 Jun 2012 16:38:20 -0400
4Subject: [PATCH] Make samhainrc OE-friendly.
4 5
5Make samhainrc OE-friendly. 6Patch the samhainrc that will be installed
6
7Patch the samhainrc that will be installed
8as part of the 'make install' step to more 7as part of the 'make install' step to more
9accurately reflect what will be found, and 8accurately reflect what will be found, and
10what will be of concern, on a OE install. 9what will be of concern, on a OE install.
11 10
12Upstream-Status: Inappropriate [configuration] 11Upstream-Status: Inappropriate [configuration]
13 12
14Signed-off-by: Aws Ismail <aws.ismail@windriver.com> 13Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
14---
15 samhainrc.linux | 63 +++++++++----------------------------------------
16 1 file changed, 11 insertions(+), 52 deletions(-)
15 17
16diff --git a/samhainrc.linux b/samhainrc.linux 18diff --git a/samhainrc.linux b/samhainrc.linux
17index 9bc5ca4..10a8176 100644 19index 02906bb..5b6ec6a 100644
18--- a/samhainrc.linux 20--- a/samhainrc.linux
19+++ b/samhainrc.linux 21+++ b/samhainrc.linux
20@@ -74,7 +74,6 @@ dir = 0/ 22@@ -74,7 +74,6 @@ dir = 0/
@@ -128,7 +130,7 @@ index 9bc5ca4..10a8176 100644
128 130
129 ## Remote server (yule) 131 ## Remote server (yule)
130 ## 132 ##
131@@ -556,7 +513,8 @@ ChecksumTest=check 133@@ -539,7 +496,8 @@ ChecksumTest=check
132 ## and I/O limit (kilobytes per second; 0 == off) 134 ## and I/O limit (kilobytes per second; 0 == off)
133 ## to reduce load on host. 135 ## to reduce load on host.
134 # 136 #
@@ -138,7 +140,7 @@ index 9bc5ca4..10a8176 100644
138 # SetIOLimit = 0 140 # SetIOLimit = 0
139 141
140 ## The version string to embed in file signature databases 142 ## The version string to embed in file signature databases
141@@ -565,13 +523,14 @@ ChecksumTest=check 143@@ -548,13 +506,14 @@ ChecksumTest=check
142 144
143 ## Interval between time stamp messages 145 ## Interval between time stamp messages
144 # 146 #
@@ -156,3 +158,6 @@ index 9bc5ca4..10a8176 100644
156 158
157 ## Alternative: crontab-like schedule 159 ## Alternative: crontab-like schedule
158 # 160 #
161--
1622.34.1
163
diff --git a/recipes-ids/samhain/files/samhain-samhainrc-fix-files-dirs-path.patch b/recipes-ids/samhain/files/0003-fix-real-path-for-some-files-dirs.patch
index dad6b15..222e1cf 100644
--- a/recipes-ids/samhain/files/samhain-samhainrc-fix-files-dirs-path.patch
+++ b/recipes-ids/samhain/files/0003-fix-real-path-for-some-files-dirs.patch
@@ -1,4 +1,4 @@
1From 00fb527e45da42550156197647e01de9a6b1ad52 Mon Sep 17 00:00:00 2001 1From 041af4897336b0873cbac8d15b434638bf3aaf7e Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com> 2From: Wenzong Fan <wenzong.fan@windriver.com>
3Date: Mon, 3 Mar 2014 01:50:01 -0500 3Date: Mon, 3 Mar 2014 01:50:01 -0500
4Subject: [PATCH] fix real path for some files/dirs 4Subject: [PATCH] fix real path for some files/dirs
@@ -7,11 +7,11 @@ Upstream-Status: Inappropriate [configuration]
7 7
8Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 8Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
9--- 9---
10 samhainrc.linux | 15 +++++++-------- 10 samhainrc.linux | 13 ++++++-------
11 1 file changed, 7 insertions(+), 8 deletions(-) 11 1 file changed, 6 insertions(+), 7 deletions(-)
12 12
13diff --git a/samhainrc.linux b/samhainrc.linux 13diff --git a/samhainrc.linux b/samhainrc.linux
14index e9727b4..7775d83 100644 14index 5b6ec6a..ff6ddf1 100644
15--- a/samhainrc.linux 15--- a/samhainrc.linux
16+++ b/samhainrc.linux 16+++ b/samhainrc.linux
17@@ -93,7 +93,6 @@ dir = 99/etc 17@@ -93,7 +93,6 @@ dir = 99/etc
@@ -57,5 +57,5 @@ index e9727b4..7775d83 100644
57 [Attributes] 57 [Attributes]
58 # 58 #
59-- 59--
601.7.9.5 602.34.1
61 61
diff --git a/recipes-ids/samhain/files/samhain-pid-path.patch b/recipes-ids/samhain/files/0004-Set-the-PID-Lock-path-for-samhain.pid.patch
index 8fdadd1..0ae4b62 100644
--- a/recipes-ids/samhain/files/samhain-pid-path.patch
+++ b/recipes-ids/samhain/files/0004-Set-the-PID-Lock-path-for-samhain.pid.patch
@@ -1,22 +1,24 @@
1commit a932b03b65edeb02ccad2fce06bfa68a8f2fbb04 1From 942843096e86669492700f49abc2c6489ea9994e Mon Sep 17 00:00:00 2001
2Author: Aws Ismail <aws.ismail@windriver.com> 2From: Aws Ismail <aws.ismail@windriver.com>
3Date: Thu Jan 10 16:29:05 2013 -0500 3Date: Thu, 10 Jan 2013 16:29:05 -0500
4Subject: [PATCH] Set the PID Lock path for samhain.pid
4 5
5Set the PID Lock path for samhain.pid
6
7The explicit path for samhain.pid inorder 6The explicit path for samhain.pid inorder
8for samhain to work properly after it initial 7for samhain to work properly after it initial
9database build. 8database build.
10 9
11Upstream-Status: Inappropriate [configuration] 10Upstream-Status: Inappropriate [configuration]
12 11
13Signed-off-by: Aws Ismail <aws.ismail@windriver.com> 12Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
13---
14 samhainrc.linux | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
14 16
15diff --git a/samhainrc.linux b/samhainrc.linux 17diff --git a/samhainrc.linux b/samhainrc.linux
16index 10a8176..a7b06e6 100644 18index ff6ddf1..d4b71e9 100644
17--- a/samhainrc.linux 19--- a/samhainrc.linux
18+++ b/samhainrc.linux 20+++ b/samhainrc.linux
19@@ -639,7 +639,7 @@ SetFileCheckTime = 86400 21@@ -621,7 +621,7 @@ SetFileCheckTime = 86400
20 22
21 ## Path to the PID file 23 ## Path to the PID file
22 # 24 #
@@ -25,3 +27,6 @@ index 10a8176..a7b06e6 100644
25 27
26 28
27 ## The digest/checksum/hash algorithm 29 ## The digest/checksum/hash algorithm
30--
312.34.1
32
diff --git a/recipes-ids/samhain/files/samhain-sha256-big-endian.patch b/recipes-ids/samhain/files/0005-Fix-sha256-for-big-endian-machines.patch
index 3065c73..9467a60 100644
--- a/recipes-ids/samhain/files/samhain-sha256-big-endian.patch
+++ b/recipes-ids/samhain/files/0005-Fix-sha256-for-big-endian-machines.patch
@@ -1,4 +1,7 @@
1samhain: fix sha256 for big-endian machines 1From 54242aa53da0d69c04b76c22120956ac6079ef6f Mon Sep 17 00:00:00 2001
2From: Joe Slater <jslater@windriver.com>
3Date: Thu, 27 Mar 2025 11:12:33 +0800
4Subject: [PATCH] Fix sha256 for big-endian machines
2 5
3After computing the digest, big-endian machines would 6After computing the digest, big-endian machines would
4memset() the digest to the first byte of state instead 7memset() the digest to the first byte of state instead
@@ -7,11 +10,15 @@ of using memcpy() to transfer it.
7Upstream-Status: Pending 10Upstream-Status: Pending
8 11
9Signed-off-by: Joe Slater <jslater@windriver.com> 12Signed-off-by: Joe Slater <jslater@windriver.com>
13---
14 src/sh_checksum.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
10 16
11 17diff --git a/src/sh_checksum.c b/src/sh_checksum.c
18index e434d5c..dc23738 100644
12--- a/src/sh_checksum.c 19--- a/src/sh_checksum.c
13+++ b/src/sh_checksum.c 20+++ b/src/sh_checksum.c
14@@ -468,7 +468,7 @@ void SHA256_Final(sha2_byte digest[], SH 21@@ -468,7 +468,7 @@ void SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context)
15 } 22 }
16 } 23 }
17 #else 24 #else
@@ -20,3 +27,6 @@ Signed-off-by: Joe Slater <jslater@windriver.com>
20 /* bcopy(context->state, d, SHA256_DIGEST_LENGTH); */ 27 /* bcopy(context->state, d, SHA256_DIGEST_LENGTH); */
21 #endif 28 #endif
22 } 29 }
30--
312.34.1
32
diff --git a/recipes-ids/samhain/files/samhain-configure-add-option-for-ps.patch b/recipes-ids/samhain/files/0006-configure-add-option-for-ps.patch
index 7e7f86e..e6a011b 100644
--- a/recipes-ids/samhain/files/samhain-configure-add-option-for-ps.patch
+++ b/recipes-ids/samhain/files/0006-configure-add-option-for-ps.patch
@@ -1,4 +1,4 @@
1From 02a143f0068cbc6cea71359169210fbb3606d4bb Mon Sep 17 00:00:00 2001 1From 2a33032ee97be5015101d94b333244e6fc53840c Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com> 2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Mon, 18 Jan 2016 00:24:57 -0500 3Date: Mon, 18 Jan 2016 00:24:57 -0500
4Subject: [PATCH] configure: add option for ps 4Subject: [PATCH] configure: add option for ps
@@ -16,12 +16,31 @@ Upstream-Status: Inappropriate [cross compile specific]
16Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 16Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
17[AK: refactored for 4.4.3] 17[AK: refactored for 4.4.3]
18Signed-off-by: Armin Kuster <akuster808@gmail.com> 18Signed-off-by: Armin Kuster <akuster808@gmail.com>
19Refresh to 4.5.2
20Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
21---
22 acinclude.m4 | 2 +-
23 configure.ac | 60 +++++++++-------------------------------------------
24 2 files changed, 11 insertions(+), 51 deletions(-)
19 25
20Index: samhain-4.4.2/configure.ac 26diff --git a/acinclude.m4 b/acinclude.m4
21=================================================================== 27index def24be..e2a57e2 100644
22--- samhain-4.4.2.orig/configure.ac 28--- a/acinclude.m4
23+++ samhain-4.4.2/configure.ac 29+++ b/acinclude.m4
24@@ -743,56 +743,16 @@ then 30@@ -359,7 +359,7 @@ x_includes=NONE
31 x_libraries=NONE
32 DESTDIR=
33 SH_ENABLE_OPTS="selinux posix-acl asm ssp db-reload xml-log message-queue login-watch process-check port-check mounts-check logfile-monitor userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp dnmalloc ipv6 shellexpand suid"
34-SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver signify pubkey-checksum gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
35+SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver signify pubkey-checksum gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file ps-path"
36
37 # Installation directory options.
38 # These are left unexpanded so users can "make install exec_prefix=/foo"
39diff --git a/configure.ac b/configure.ac
40index f59754c..d0e3657 100644
41--- a/configure.ac
42+++ b/configure.ac
43@@ -799,56 +799,16 @@ then
25 fi 44 fi
26 AC_CHECK_HEADERS(gmp.h) 45 AC_CHECK_HEADERS(gmp.h)
27 46
@@ -39,17 +58,8 @@ Index: samhain-4.4.2/configure.ac
39- AC_MSG_RESULT([no]) 58- AC_MSG_RESULT([no])
40- AC_MSG_ERROR([Cannot find ps in any of /usr/ucb /bin /usr/bin]) 59- AC_MSG_ERROR([Cannot find ps in any of /usr/ucb /bin /usr/bin])
41-fi 60-fi
42-AC_DEFINE_UNQUOTED([PSPATH], _("$PS"), [Path to ps]) 61-AC_DEFINE_UNQUOTED([PSPATH], [_("$PS")], [Path to ps executable])
43+AC_ARG_WITH(ps-path, 62-
44+ [ --with-ps-path=PATH set path to ps command ],
45+ [
46+ if test "x${withval}" != xno; then
47+ pspath="${withval}"
48+ AC_DEFINE_UNQUOTED([PSPATH], _("${pspath}"), [Path to ps])
49+ AC_DEFINE_UNQUOTED([PSARG], _("ax"), [Argument for ps])
50+ fi
51+ ])
52
53-AC_MSG_CHECKING([how to use ps]) 63-AC_MSG_CHECKING([how to use ps])
54-$PS ax >/dev/null 2>&1 64-$PS ax >/dev/null 2>&1
55-if test $? -eq 0; then 65-if test $? -eq 0; then
@@ -83,20 +93,20 @@ Index: samhain-4.4.2/configure.ac
83-else 93-else
84- PSARG="-e" 94- PSARG="-e"
85-fi 95-fi
86-AC_DEFINE_UNQUOTED([PSARG], _("$PSARG"), [Argument for ps]) 96-AC_DEFINE_UNQUOTED([PSARG], [_("$PSARG")], [Argument for ps])
97+AC_ARG_WITH(ps-path,
98+ [ --with-ps-path=PATH set path to ps command ],
99+ [
100+ if test "x${withval}" != xno; then
101+ pspath="${withval}"
102+ AC_DEFINE_UNQUOTED([PSPATH], _("${pspath}"), [Path to ps])
103+ AC_DEFINE_UNQUOTED([PSARG], _("ax"), [Argument for ps])
104+ fi
105+ ])
106+
87 AC_MSG_RESULT([$PS $PSARG]) 107 AC_MSG_RESULT([$PS $PSARG])
88 108
89 dnl ***************************************** 109 dnl *****************************************
90Index: samhain-4.4.2/aclocal.m4 110--
91=================================================================== 1112.34.1
92--- samhain-4.4.2.orig/aclocal.m4 112
93+++ samhain-4.4.2/aclocal.m4
94@@ -409,7 +409,7 @@ x_includes=NONE
95 x_libraries=NONE
96 DESTDIR=
97 SH_ENABLE_OPTS="selinux posix-acl asm ssp db-reload xml-log message-queue login-watch process-check port-check mounts-check logfile-monitor userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp dnmalloc ipv6 shellexpand suid"
98-SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver signify pubkey-checksum gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
99+SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file ps-path"
100
101 # Installation directory options.
102 # These are left unexpanded so users can "make install exec_prefix=/foo"
diff --git a/recipes-ids/samhain/files/samhain-avoid-searching-host-for-postgresql.patch b/recipes-ids/samhain/files/0007-configure.ac-avoid-searching-host-for-postgresql.patch
index a84229e..9652c53 100644
--- a/recipes-ids/samhain/files/samhain-avoid-searching-host-for-postgresql.patch
+++ b/recipes-ids/samhain/files/0007-configure.ac-avoid-searching-host-for-postgresql.patch
@@ -1,4 +1,4 @@
1From 3e2ca7e06b16ceff6d12beb5113312f6525df595 Mon Sep 17 00:00:00 2001 1From 117078cd32ee2c76bbe7d65325fbc0b451c73ace Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com> 2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 14 Sep 2017 11:02:12 +0800 3Date: Thu, 14 Sep 2017 11:02:12 +0800
4Subject: [PATCH] configure.ac: avoid searching host for postgresql 4Subject: [PATCH] configure.ac: avoid searching host for postgresql
@@ -7,16 +7,16 @@ Upstream-Status: Inappropriate [cross compile specific]
7 7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9--- 9---
10 configure.ac | 101 +++-------------------------------------------------------- 10 configure.ac | 101 +++------------------------------------------------
11 1 file changed, 5 insertions(+), 96 deletions(-) 11 1 file changed, 5 insertions(+), 96 deletions(-)
12 12
13Index: samhain-4.4.2/configure.ac 13diff --git a/configure.ac b/configure.ac
14=================================================================== 14index d0e3657..5b8d167 100644
15--- samhain-4.4.2.orig/configure.ac 15--- a/configure.ac
16+++ samhain-4.4.2/configure.ac 16+++ b/configure.ac
17@@ -1290,90 +1290,11 @@ AC_ARG_WITH(database, 17@@ -1351,90 +1351,11 @@ AC_ARG_WITH(database,
18 AC_DEFINE(WITH_POSTGRES) 18 AC_DEFINE([WITH_POSTGRES], [1], [Use postgres as database])
19 AC_DEFINE(WITH_DATABASE) 19 AC_DEFINE([WITH_DATABASE], [1], [Use a database])
20 # 20 #
21- PGCONF="no" 21- PGCONF="no"
22- MY_PATH="${PATH}:/usr/local/bin:/usr/local/pgsql/bin" 22- MY_PATH="${PATH}:/usr/local/bin:/usr/local/pgsql/bin"
@@ -103,14 +103,14 @@ Index: samhain-4.4.2/configure.ac
103- AC_MSG_RESULT(yes) 103- AC_MSG_RESULT(yes)
104- 104-
105+ if test -z "${PGSQL_LIB_DIR}" ; then 105+ if test -z "${PGSQL_LIB_DIR}" ; then
106+ FAIL_MESSAGE("PGSQL_LIB_DIR is not set!") 106+ FAIL_MESSAGE("PGSQL_LIB_DIR is not set!")
107+ elif test -z "${PGSQL_INC_DIR}" ; then 107+ elif test -z "${PGSQL_INC_DIR}" ; then
108+ FAIL_MESSAGE("PGSQL_INC_DIR is not set!") 108+ FAIL_MESSAGE("PGSQL_INC_DIR is not set!")
109+ else 109+ else
110 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lm" 110 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lm"
111 if test x"$enable_static" = xyes; then 111 if test x"$enable_static" = xyes; then
112 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lcrypt -lm" 112 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lcrypt -lm"
113@@ -1382,18 +1303,6 @@ AC_ARG_WITH(database, 113@@ -1443,18 +1364,6 @@ AC_ARG_WITH(database,
114 fi 114 fi
115 # CFLAGS="$CFLAGS -I${PGSQL_INC_DIR}" 115 # CFLAGS="$CFLAGS -I${PGSQL_INC_DIR}"
116 CPPFLAGS="$CPPFLAGS -I${PGSQL_INC_DIR}" 116 CPPFLAGS="$CPPFLAGS -I${PGSQL_INC_DIR}"
@@ -129,3 +129,6 @@ Index: samhain-4.4.2/configure.ac
129 fi 129 fi
130 elif test "x${withval}" = "xodbc"; then 130 elif test "x${withval}" = "xodbc"; then
131 AC_MSG_CHECKING(for odbc in /usr /usr/local ODBC_HOME) 131 AC_MSG_CHECKING(for odbc in /usr /usr/local ODBC_HOME)
132--
1332.34.1
134
diff --git a/recipes-ids/samhain/files/samhain-add-LDFLAGS-variable-for-samhain_setpwd.patch b/recipes-ids/samhain/files/0008-Add-LDFLAGS-variable-for-compiling-samhain_setpwd.patch
index 088a938..f2691e7 100644
--- a/recipes-ids/samhain/files/samhain-add-LDFLAGS-variable-for-samhain_setpwd.patch
+++ b/recipes-ids/samhain/files/0008-Add-LDFLAGS-variable-for-compiling-samhain_setpwd.patch
@@ -1,4 +1,4 @@
1From ae79606a6745dbbd429d1d4671dfe3045d735057 Mon Sep 17 00:00:00 2001 1From 7fc1f0a8d4c6a109f7e86853a9136a008c68808a Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com> 2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 14 Sep 2017 13:26:55 +0800 3Date: Thu, 14 Sep 2017 13:26:55 +0800
4Subject: [PATCH] Add LDFLAGS variable for compiling samhain_setpwd 4Subject: [PATCH] Add LDFLAGS variable for compiling samhain_setpwd
@@ -11,10 +11,10 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 1 file changed, 1 insertion(+), 1 deletion(-)
12 12
13diff --git a/Makefile.in b/Makefile.in 13diff --git a/Makefile.in b/Makefile.in
14index 01de987..49356cf 100644 14index ade0638..1806159 100644
15--- a/Makefile.in 15--- a/Makefile.in
16+++ b/Makefile.in 16+++ b/Makefile.in
17@@ -1128,7 +1128,7 @@ sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h 17@@ -1159,7 +1159,7 @@ sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h
18 samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c 18 samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c
19 @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \ 19 @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \
20 ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \ 20 ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \
@@ -24,5 +24,5 @@ index 01de987..49356cf 100644
24 24
25 samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c 25 samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c
26-- 26--
272.11.0 272.34.1
28 28
diff --git a/recipes-ids/samhain/files/fix-build-with-new-version-attr.patch b/recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch
index eaf30db..b58eda9 100644
--- a/recipes-ids/samhain/files/fix-build-with-new-version-attr.patch
+++ b/recipes-ids/samhain/files/0009-fix-build-with-new-version-attr.patch
@@ -1,4 +1,4 @@
1From e67acafa62f71f0015ed548918b98ed0b1ded128 Mon Sep 17 00:00:00 2001 1From 9d693fbeb0a14bfe858aed2b46cb9e74a90d00b9 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com> 2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Sun, 19 Jan 2020 15:53:48 +0800 3Date: Sun, 19 Jan 2020 15:53:48 +0800
4Subject: [PATCH] fix build with new version attr 4Subject: [PATCH] fix build with new version attr
@@ -12,15 +12,15 @@ Upstream-Status: Pending
12 12
13Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 13Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
14--- 14---
15 aclocal.m4 | 26 +++++++++++--------------- 15 acinclude.m4 | 26 +++++++++++---------------
16 src/sh_unix.c | 2 +- 16 src/sh_unix.c | 2 +-
17 2 files changed, 12 insertions(+), 16 deletions(-) 17 2 files changed, 12 insertions(+), 16 deletions(-)
18 18
19diff --git a/aclocal.m4 b/aclocal.m4 19diff --git a/acinclude.m4 b/acinclude.m4
20index ee5b204..38cef8e 100644 20index e2a57e2..bfdd2f6 100644
21--- a/aclocal.m4 21--- a/acinclude.m4
22+++ b/aclocal.m4 22+++ b/acinclude.m4
23@@ -1453,23 +1453,19 @@ AC_DEFUN([sh_CHECK_POSIX_ACL], 23@@ -1392,23 +1392,19 @@ AC_DEFUN([sh_CHECK_POSIX_ACL],
24 24
25 AC_DEFUN([sh_CHECK_XATTR], 25 AC_DEFUN([sh_CHECK_XATTR],
26 [ 26 [
@@ -53,13 +53,13 @@ index ee5b204..38cef8e 100644
53+ LIBS="$OLDLIBS" 53+ LIBS="$OLDLIBS"
54+ 54+
55 if test x"$sh_fattr" = xyes; then 55 if test x"$sh_fattr" = xyes; then
56 AC_DEFINE(USE_XATTR, 1, [Define if you want extended attributes support.]) 56 AC_DEFINE([USE_XATTR], [1], [Define if you want extended attributes support.])
57 LIBS="$LIBS $LIBATTR" 57 LIBS="$LIBS $LIBATTR"
58diff --git a/src/sh_unix.c b/src/sh_unix.c 58diff --git a/src/sh_unix.c b/src/sh_unix.c
59index 3ede57f..ef236e9 100644 59index b1c0b75..2469068 100644
60--- a/src/sh_unix.c 60--- a/src/sh_unix.c
61+++ b/src/sh_unix.c 61+++ b/src/sh_unix.c
62@@ -3681,7 +3681,7 @@ static char * sh_unix_getinfo_acl (char * path, int fd, struct stat * buf) 62@@ -3682,7 +3682,7 @@ static char * sh_unix_getinfo_acl (char * path, int fd, struct stat * buf)
63 63
64 #ifdef USE_XATTR 64 #ifdef USE_XATTR
65 65
@@ -69,5 +69,5 @@ index 3ede57f..ef236e9 100644
69 { 69 {
70 char * out = NULL; 70 char * out = NULL;
71-- 71--
722.7.4 722.34.1
73 73
diff --git a/recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch b/recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch
index 72cb880..8479165 100644
--- a/recipes-ids/samhain/files/samhain-fix-initializer-element-is-not-constant.patch
+++ b/recipes-ids/samhain/files/0010-Fix-initializer-element-is-not-constant.patch
@@ -1,3 +1,8 @@
1From 77d55c4707395b76e32e07bf0f679b5b6999d568 Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com>
3Date: Thu, 27 Mar 2025 11:43:40 +0800
4Subject: [PATCH] Fix initializer element is not constant
5
1Fix error when compile for powerpc: 6Fix error when compile for powerpc:
2 7
3| x_sh_dbIO.c: In function 'swap_short': 8| x_sh_dbIO.c: In function 'swap_short':
@@ -13,7 +18,7 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
13 1 file changed, 2 insertions(+), 1 deletion(-) 18 1 file changed, 2 insertions(+), 1 deletion(-)
14 19
15diff --git a/src/sh_dbIO.c b/src/sh_dbIO.c 20diff --git a/src/sh_dbIO.c b/src/sh_dbIO.c
16index b547ac5..23a9621 100644 21index 1f9b152..503456d 100644
17--- a/src/sh_dbIO.c 22--- a/src/sh_dbIO.c
18+++ b/src/sh_dbIO.c 23+++ b/src/sh_dbIO.c
19@@ -226,7 +226,8 @@ static unsigned short * swap_short (unsigned short * iptr) 24@@ -226,7 +226,8 @@ static unsigned short * swap_short (unsigned short * iptr)
@@ -26,3 +31,6 @@ index b547ac5..23a9621 100644
26 unsigned short hi = (ooop & 0xff00); 31 unsigned short hi = (ooop & 0xff00);
27 unsigned short lo = (ooop & 0xff); 32 unsigned short lo = (ooop & 0xff);
28 ooop = (lo << 8) | (hi >> 8); 33 ooop = (lo << 8) | (hi >> 8);
34--
352.34.1
36
diff --git a/recipes-ids/samhain/files/samhain-not-run-ptest-on-host.patch b/recipes-ids/samhain/files/0011-not-run-test-on-host-since-we-are-doing-cross-compil.patch
index e00fc2a..dc9f42e 100644
--- a/recipes-ids/samhain/files/samhain-not-run-ptest-on-host.patch
+++ b/recipes-ids/samhain/files/0011-not-run-test-on-host-since-we-are-doing-cross-compil.patch
@@ -1,17 +1,20 @@
1not run test on host, since we are doing cross-compile 1From 506833786a4ae5b888f12c59b82f7d842cda778c Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Thu, 27 Mar 2025 11:46:20 +0800
4Subject: [PATCH] not run test on host, since we are doing cross-compile
2 5
3Upstream-Status: Inappropriate [cross compile specific] 6Upstream-Status: Inappropriate [cross compile specific]
4 7
5Signed-off-by: Roy Li <rongqing.li@windriver.com> 8Signed-off-by: Roy Li <rongqing.li@windriver.com>
6--- 9---
7 Makefile.in | 1 - 10 Makefile.in | 1 -
8 1 file changed, 1 deletion(-) 11 1 file changed, 1 deletion(-)
9 12
10diff --git a/Makefile.in b/Makefile.in 13diff --git a/Makefile.in b/Makefile.in
11index e1b32a8..74bfdc9 100644 14index 1806159..eccb4f6 100644
12--- a/Makefile.in 15--- a/Makefile.in
13+++ b/Makefile.in 16+++ b/Makefile.in
14@@ -1234,7 +1234,6 @@ intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/CuTest 17@@ -1219,7 +1219,6 @@ intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/CuTest
15 rm x_samhain.c; \ 18 rm x_samhain.c; \
16 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \ 19 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
17 test -f ./intcutest && mv ./intcutest ./cutest; \ 20 test -f ./intcutest && mv ./intcutest ./cutest; \
@@ -20,5 +23,5 @@ index e1b32a8..74bfdc9 100644
20 runcutest: 23 runcutest:
21 gdb ./cutest 24 gdb ./cutest
22-- 25--
231.7.10.4 262.34.1
24 27
diff --git a/recipes-ids/samhain/files/0001-Don-t-expose-configure-args.patch b/recipes-ids/samhain/files/0012-Don-t-expose-configure-args.patch
index fedbe5b..f881b5d 100644
--- a/recipes-ids/samhain/files/0001-Don-t-expose-configure-args.patch
+++ b/recipes-ids/samhain/files/0012-Don-t-expose-configure-args.patch
@@ -1,4 +1,4 @@
1From 111b1e8f35e989513d8961a45a806767109f6e1e Mon Sep 17 00:00:00 2001 1From 4625ce72e462950cfbbd37ad2a19be625fd081b0 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com> 2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Thu, 11 Aug 2022 17:15:30 +0800 3Date: Thu, 11 Aug 2022 17:15:30 +0800
4Subject: [PATCH] Don't expose configure args 4Subject: [PATCH] Don't expose configure args
@@ -40,5 +40,5 @@ index 635a746..b9a42e7 100644
40 40
41 echo '#!/bin/sh' > ./sstrip 41 echo '#!/bin/sh' > ./sstrip
42-- 42--
432.25.1 432.34.1
44 44
diff --git a/recipes-ids/samhain/files/run-ptest b/recipes-ids/samhain/files/run-ptest
index 2a4a765..2a4a765 100755..100644
--- a/recipes-ids/samhain/files/run-ptest
+++ b/recipes-ids/samhain/files/run-ptest
diff --git a/recipes-ids/samhain/samhain-standalone.bb b/recipes-ids/samhain/samhain-standalone.bb
index ae9ed2b..87df017 100644
--- a/recipes-ids/samhain/samhain-standalone.bb
+++ b/recipes-ids/samhain/samhain-standalone.bb
@@ -1,7 +1,7 @@
1require samhain.inc 1require samhain.inc
2 2
3SRC_URI += "file://samhain-not-run-ptest-on-host.patch \ 3SRC_URI += "file://0011-not-run-test-on-host-since-we-are-doing-cross-compil.patch \
4 file://0001-Don-t-expose-configure-args.patch \ 4 file://0012-Don-t-expose-configure-args.patch \
5 file://run-ptest \ 5 file://run-ptest \
6" 6"
7 7
@@ -28,7 +28,8 @@ do_install:append() {
28 28
29do_install_ptest() { 29do_install_ptest() {
30 mkdir -p ${D}${PTEST_PATH} 30 mkdir -p ${D}${PTEST_PATH}
31 install ${S}/cutest ${D}${PTEST_PATH} 31 install -m 755 ${S}/cutest ${D}${PTEST_PATH}
32 install -m 644 ${S}/COPYING ${D}${PTEST_PATH}
32} 33}
33 34
34RPROVIDES:${PN} += "samhain" 35RPROVIDES:${PN} += "samhain"
diff --git a/recipes-ids/samhain/samhain.inc b/recipes-ids/samhain/samhain.inc
index 65e6734..6b8d30e 100644
--- a/recipes-ids/samhain/samhain.inc
+++ b/recipes-ids/samhain/samhain.inc
@@ -3,25 +3,25 @@ HOMEPAGE = "http://www.la-samhna.de/samhain/"
3LICENSE = "GPL-2.0-only" 3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=8ca43cbc842c2336e835926c2166c28b" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=8ca43cbc842c2336e835926c2166c28b"
5 5
6PV = "4.4.10" 6PV = "4.5.2"
7 7
8SRC_URI = "https://la-samhna.de/archive/samhain_signed-${PV}.tar.gz \ 8SRC_URI = "https://la-samhna.de/archive/samhain_signed-${PV}.tar.gz \
9 file://${INITSCRIPT_NAME}.init \ 9 file://${INITSCRIPT_NAME}.init \
10 file://${INITSCRIPT_NAME}.default \ 10 file://${INITSCRIPT_NAME}.default \
11 file://samhain.service \ 11 file://samhain.service \
12 file://samhain-mips64-aarch64-dnmalloc-hash-fix.patch \ 12 file://0001-Hash-fix-for-MIPS64-and-AARCH64.patch \
13 file://samhain-samhainrc.patch \ 13 file://0002-Make-samhainrc-OE-friendly.patch \
14 file://samhain-samhainrc-fix-files-dirs-path.patch \ 14 file://0003-fix-real-path-for-some-files-dirs.patch \
15 file://samhain-pid-path.patch \ 15 file://0004-Set-the-PID-Lock-path-for-samhain.pid.patch \
16 file://samhain-sha256-big-endian.patch \ 16 file://0005-Fix-sha256-for-big-endian-machines.patch \
17 file://samhain-configure-add-option-for-ps.patch \ 17 file://0006-configure-add-option-for-ps.patch \
18 file://samhain-avoid-searching-host-for-postgresql.patch \ 18 file://0007-configure.ac-avoid-searching-host-for-postgresql.patch \
19 file://samhain-add-LDFLAGS-variable-for-samhain_setpwd.patch \ 19 file://0008-Add-LDFLAGS-variable-for-compiling-samhain_setpwd.patch \
20 file://fix-build-with-new-version-attr.patch \ 20 file://0009-fix-build-with-new-version-attr.patch \
21 file://samhain-fix-initializer-element-is-not-constant.patch \ 21 file://0010-Fix-initializer-element-is-not-constant.patch \
22 " 22 "
23 23
24SRC_URI[sha256sum] = "ae6ee8eff3cb111b7fc14a57bcc258443dd0bcf1bfacfdf229935ed053c1ce3d" 24SRC_URI[sha256sum] = "0b5d3534fd60ecf45dfd79bd415e81f7a56eba7f1755771735e204f334033578"
25 25
26UPSTREAM_CHECK_URI = "https://www.la-samhna.de/samhain/archive.html" 26UPSTREAM_CHECK_URI = "https://www.la-samhna.de/samhain/archive.html"
27UPSTREAM_CHECK_REGEX = "samhain_signed-(?P<pver>(\d+(\.\d+)+))\.tar" 27UPSTREAM_CHECK_REGEX = "samhain_signed-(?P<pver>(\d+(\.\d+)+))\.tar"