|
From: Jiri J. <jja...@re...> - 2014-09-23 09:45:56
|
Signed-off-by: Jiri Jaburek <jja...@re...>
---
audit-test/utils/bin/Makefile | 14 +-------------
audit-test/utils/bin/ipc_common.c | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/audit-test/utils/bin/Makefile b/audit-test/utils/bin/Makefile
index bbead88..aeaa493 100644
--- a/audit-test/utils/bin/Makefile
+++ b/audit-test/utils/bin/Makefile
@@ -207,19 +207,7 @@ $(MQ_EXE): LDLIBS += -lrt
endif
$(RT_EXE): LDLIBS += -lrt
-headerhack:
- @echo -en "/* Do NOT edit this file directly," \
- "it is generated from /usr/include/linux/ipc.h\n" \
- " which cannot be included due to an obsolete definition of" \
- "struct ipc_perm */\n\n" > ipc_hack.h && \
- gcc -E -dM /usr/include/linux/ipc.h | egrep "SEM|MSG|SHM" >> ipc_hack.h;
-
-clean: headerhack_clean
-headerhack_clean:
- $(RM) ipc_hack.h
-
-
-all: headerhack $(ALL_EXE)
+all: $(ALL_EXE)
clobber:
$(RM) $(ALL_EXE)
diff --git a/audit-test/utils/bin/ipc_common.c b/audit-test/utils/bin/ipc_common.c
index 2c93e4d..724b130 100644
--- a/audit-test/utils/bin/ipc_common.c
+++ b/audit-test/utils/bin/ipc_common.c
@@ -14,11 +14,26 @@
*/
#include "includes.h"
-#include "ipc_hack.h"
#include <sys/msg.h>
#include <sys/sem.h>
#include <sys/shm.h>
+/* from <linux/ipc.h> which has conflicting definition of ipc_perm */
+/* NOTE that these defines are (at this time) used only internally
+ * for one specific switch{} in do_ipc.c */
+#define SEMOP 1
+#define SEMGET 2
+#define SEMCTL 3
+#define SEMTIMEDOP 4
+#define MSGSND 11
+#define MSGRCV 12
+#define MSGGET 13
+#define MSGCTL 14
+#define SHMAT 21
+#define SHMDT 22
+#define SHMGET 23
+#define SHMCTL 24
+
int check_ipc_usage(char *call, int nargs)
{
if (!strcmp(call, "msgctl") || !strcmp(call, "msgget") ||
--
1.8.3.1
|