This patch adds RHEL4 and RHEL5 detection to refpolicy Makefile and fixes
policy compilation errors on RHEL5 introduced by the bounds test policy.

Signed-off-by: Ramon de Carvalho Valle <[email protected]>


-- 
Ramon de Carvalho Valle
Software Engineer
IBM Linux Technology Center
E-Mail: [email protected]

diff -urN ltp-full-20081130.original/testcases/kernel/security/selinux-testsuite/refpolicy/Makefile ltp-full-20081130/testcases/kernel/security/selinux-testsuite/refpolicy/Makefile
--- ltp-full-20081130.original/testcases/kernel/security/selinux-testsuite/refpolicy/Makefile	2008-10-23 07:41:38.000000000 -0200
+++ ltp-full-20081130/testcases/kernel/security/selinux-testsuite/refpolicy/Makefile	2009-01-07 23:31:02.000000000 -0200
@@ -1,3 +1,4 @@
+REDHAT_RELEASE=$(shell rpm -q redhat-release)
 POLICYDEVEL = /usr/share/selinux/devel
 SEMODULE = /usr/sbin/semodule
 
@@ -11,6 +12,30 @@
 test_task_getpgid.te test_task_getsched.te test_task_getsid.te \
 test_task_setpgid.te test_task_setsched.te test_transition.te test_wait.te 
 
+ifeq (redhat-release-4, $(findstring redhat-release-4, $(REDHAT_RELEASE)))
+    TARGETS=test_global.te test_capable_file.te test_capable_net.te \
+    test_capable_sys.te test_entrypoint.te \
+    test_execshare.te test_exectrace.te test_execute_no_trans.te \
+    test_fdreceive.te test_file.te test_inherit.te test_ioctl.te test_ipc.te \
+    test_link.te test_mkdir.te test_open.te test_ptrace.te test_readlink.te \
+    test_relabel.te test_rename.te test_rxdir.te test_setattr.te test_setnice.te \
+    test_sigkill.te test_stat.te test_sysctl.te test_task_create.te \
+    test_task_getpgid.te test_task_getsched.te test_task_getsid.te \
+    test_task_setpgid.te test_task_setsched.te test_transition.te test_wait.te 
+endif
+
+ifeq (redhat-release-5, $(findstring redhat-release-5, $(REDHAT_RELEASE)))
+    TARGETS=test_global.te test_capable_file.te test_capable_net.te \
+    test_capable_sys.te test_dyntrace.te test_dyntrans.te test_entrypoint.te \
+    test_execshare.te test_exectrace.te test_execute_no_trans.te \
+    test_fdreceive.te test_file.te test_inherit.te test_ioctl.te test_ipc.te \
+    test_link.te test_mkdir.te test_open.te test_ptrace.te test_readlink.te \
+    test_relabel.te test_rename.te test_rxdir.te test_setattr.te test_setnice.te \
+    test_sigkill.te test_stat.te test_sysctl.te test_task_create.te \
+    test_task_getpgid.te test_task_getsched.te test_task_getsid.te \
+    test_task_setpgid.te test_task_setsched.te test_transition.te test_wait.te 
+endif
+
 load:
 	@if [ -d $(POLICYDEVEL) ]; then \
 		set -e; rm -f test_policy.te; for i in $(TARGETS); do cat $$i >> test_policy.te; done; \

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to