* [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-24 16:33 [selinux-testsuite RFC PATCH 0/4] selinux-testsuite patches Paul Moore
@ 2013-09-24 16:33 ` Paul Moore
2013-09-24 16:49 ` Serge E. Hallyn
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 2/4] test_policy: general Makefile cleanup Paul Moore
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Paul Moore @ 2013-09-24 16:33 UTC (permalink / raw)
To: serge; +Cc: selinux
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
policy/test_global.te | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/policy/test_global.te b/policy/test_global.te
index 3891f6e..49c85b1 100644
--- a/policy/test_global.te
+++ b/policy/test_global.te
@@ -5,6 +5,7 @@ policy_module(test_policy,1.0.0)
#
# Declarations
#
+
attribute testdomain;
gen_require(`
@@ -34,8 +35,8 @@ miscfiles_read_test_files(testdomain)
# Let the test domains set their current, exec and fscreate contexts.
allow testdomain self:process setcurrent;
-# domain_dyntrans_type(testdomain)
-selinux_get_fs_mount(testdomain)
+#domain_dyntrans_type(testdomain)
+#selinux_get_fs_mount(testdomain)
allow testdomain self:process setexec;
allow testdomain self:process setfscreate;
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013) Paul Moore
@ 2013-09-24 16:49 ` Serge E. Hallyn
2013-09-24 19:39 ` Paul Moore
0 siblings, 1 reply; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-24 16:49 UTC (permalink / raw)
To: Paul Moore; +Cc: serge, selinux
Quoting Paul Moore (pmoore@redhat.com):
> Signed-off-by: Paul Moore <pmoore@redhat.com>
Thanks, Paul! This break had been reported to me and I got as far
as tracking it to its cause, but I hadn't yet figured out what to
replace it by. I assume you're saying it's not strictly necessary :)
All the better.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
> policy/test_global.te | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/policy/test_global.te b/policy/test_global.te
> index 3891f6e..49c85b1 100644
> --- a/policy/test_global.te
> +++ b/policy/test_global.te
> @@ -5,6 +5,7 @@ policy_module(test_policy,1.0.0)
> #
> # Declarations
> #
> +
> attribute testdomain;
>
> gen_require(`
> @@ -34,8 +35,8 @@ miscfiles_read_test_files(testdomain)
>
> # Let the test domains set their current, exec and fscreate contexts.
> allow testdomain self:process setcurrent;
> -# domain_dyntrans_type(testdomain)
> -selinux_get_fs_mount(testdomain)
> +#domain_dyntrans_type(testdomain)
> +#selinux_get_fs_mount(testdomain)
> allow testdomain self:process setexec;
> allow testdomain self:process setfscreate;
>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-24 16:49 ` Serge E. Hallyn
@ 2013-09-24 19:39 ` Paul Moore
2013-09-25 21:31 ` Serge E. Hallyn
2013-09-26 18:48 ` Serge E. Hallyn
0 siblings, 2 replies; 15+ messages in thread
From: Paul Moore @ 2013-09-24 19:39 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: selinux
On Tuesday, September 24, 2013 04:49:25 PM Serge E. Hallyn wrote:
> Quoting Paul Moore (pmoore@redhat.com):
> > Signed-off-by: Paul Moore <pmoore@redhat.com>
>
> Thanks, Paul! This break had been reported to me and I got as far
> as tracking it to its cause, but I hadn't yet figured out what to
> replace it by.
No problem.
> I assume you're saying it's not strictly necessary :) All the better.
Well, I guess what I'm trying to say is that I'm not sure if this is the right
fix, but it does at least resolve the build problems I'm seeing. I have yet
to check to see if it works correctly.
> Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Ack? I thought you were the one maintaining the test suite?
> > ---
> >
> > policy/test_global.te | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/policy/test_global.te b/policy/test_global.te
> > index 3891f6e..49c85b1 100644
> > --- a/policy/test_global.te
> > +++ b/policy/test_global.te
> > @@ -5,6 +5,7 @@ policy_module(test_policy,1.0.0)
> >
> > #
> > # Declarations
> > #
> >
> > +
> >
> > attribute testdomain;
> >
> > gen_require(`
> >
> > @@ -34,8 +35,8 @@ miscfiles_read_test_files(testdomain)
> >
> > # Let the test domains set their current, exec and fscreate contexts.
> > allow testdomain self:process setcurrent;
> >
> > -# domain_dyntrans_type(testdomain)
> > -selinux_get_fs_mount(testdomain)
> > +#domain_dyntrans_type(testdomain)
> > +#selinux_get_fs_mount(testdomain)
> >
> > allow testdomain self:process setexec;
> > allow testdomain self:process setfscreate;
--
paul moore
security and virtualization @ redhat
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-24 19:39 ` Paul Moore
@ 2013-09-25 21:31 ` Serge E. Hallyn
2013-09-25 22:19 ` Paul Moore
2013-09-26 18:48 ` Serge E. Hallyn
1 sibling, 1 reply; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-25 21:31 UTC (permalink / raw)
To: Paul Moore; +Cc: Serge E. Hallyn, selinux
Quoting Paul Moore (pmoore@redhat.com):
> On Tuesday, September 24, 2013 04:49:25 PM Serge E. Hallyn wrote:
> > Quoting Paul Moore (pmoore@redhat.com):
> > > Signed-off-by: Paul Moore <pmoore@redhat.com>
> >
> > Thanks, Paul! This break had been reported to me and I got as far
> > as tracking it to its cause, but I hadn't yet figured out what to
> > replace it by.
>
> No problem.
>
> > I assume you're saying it's not strictly necessary :) All the better.
>
> Well, I guess what I'm trying to say is that I'm not sure if this is the right
> fix, but it does at least resolve the build problems I'm seeing. I have yet
> to check to see if it works correctly.
>
> > Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
>
> Ack? I thought you were the one maintaining the test suite?
Yes, that's me saying I'll apply that.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-25 21:31 ` Serge E. Hallyn
@ 2013-09-25 22:19 ` Paul Moore
2013-09-27 18:15 ` Serge E. Hallyn
0 siblings, 1 reply; 15+ messages in thread
From: Paul Moore @ 2013-09-25 22:19 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: selinux
On Wednesday, September 25, 2013 09:31:28 PM Serge E. Hallyn wrote:
> Quoting Paul Moore (pmoore@redhat.com):
> > On Tuesday, September 24, 2013 04:49:25 PM Serge E. Hallyn wrote:
> > > Quoting Paul Moore (pmoore@redhat.com):
> > > > Signed-off-by: Paul Moore <pmoore@redhat.com>
> > >
> > > Thanks, Paul! This break had been reported to me and I got as far
> > > as tracking it to its cause, but I hadn't yet figured out what to
> > > replace it by.
> >
> > No problem.
> >
> > > I assume you're saying it's not strictly necessary :) All the better.
> >
> > Well, I guess what I'm trying to say is that I'm not sure if this is the
> > right fix, but it does at least resolve the build problems I'm seeing. I
> > have yet to check to see if it works correctly.
> >
> > > Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> >
> > Ack? I thought you were the one maintaining the test suite?
>
> Yes, that's me saying I'll apply that.
Great, thanks.
--
paul moore
security and virtualization @ redhat
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-25 22:19 ` Paul Moore
@ 2013-09-27 18:15 ` Serge E. Hallyn
2013-09-27 18:27 ` Paul Moore
0 siblings, 1 reply; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-27 18:15 UTC (permalink / raw)
To: Paul Moore; +Cc: selinux
Quoting Paul Moore (pmoore@redhat.com):
> On Wednesday, September 25, 2013 09:31:28 PM Serge E. Hallyn wrote:
> > Quoting Paul Moore (pmoore@redhat.com):
> > > On Tuesday, September 24, 2013 04:49:25 PM Serge E. Hallyn wrote:
> > > > Quoting Paul Moore (pmoore@redhat.com):
> > > > > Signed-off-by: Paul Moore <pmoore@redhat.com>
> > > >
> > > > Thanks, Paul! This break had been reported to me and I got as far
> > > > as tracking it to its cause, but I hadn't yet figured out what to
> > > > replace it by.
> > >
> > > No problem.
> > >
> > > > I assume you're saying it's not strictly necessary :) All the better.
> > >
> > > Well, I guess what I'm trying to say is that I'm not sure if this is the
> > > right fix, but it does at least resolve the build problems I'm seeing. I
> > > have yet to check to see if it works correctly.
> > >
> > > > Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> > >
> > > Ack? I thought you were the one maintaining the test suite?
> >
> > Yes, that's me saying I'll apply that.
>
> Great, thanks.
Thanks, Paul, all tests passed (on f19) with your patches!
-serge
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-27 18:15 ` Serge E. Hallyn
@ 2013-09-27 18:27 ` Paul Moore
0 siblings, 0 replies; 15+ messages in thread
From: Paul Moore @ 2013-09-27 18:27 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: selinux
On Friday, September 27, 2013 06:15:30 PM Serge E. Hallyn wrote:
> Quoting Paul Moore (pmoore@redhat.com):
> > On Wednesday, September 25, 2013 09:31:28 PM Serge E. Hallyn wrote:
> > > Quoting Paul Moore (pmoore@redhat.com):
> > > > On Tuesday, September 24, 2013 04:49:25 PM Serge E. Hallyn wrote:
> > > > > Quoting Paul Moore (pmoore@redhat.com):
> > > > > > Signed-off-by: Paul Moore <pmoore@redhat.com>
> > > > >
> > > > > Thanks, Paul! This break had been reported to me and I got as far
> > > > > as tracking it to its cause, but I hadn't yet figured out what to
> > > > > replace it by.
> > > >
> > > > No problem.
> > > >
> > > > > I assume you're saying it's not strictly necessary :) All the
> > > > > better.
> > > >
> > > > Well, I guess what I'm trying to say is that I'm not sure if this is
> > > > the
> > > > right fix, but it does at least resolve the build problems I'm seeing.
> > > > I
> > > > have yet to check to see if it works correctly.
> > > >
> > > > > Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> > > >
> > > > Ack? I thought you were the one maintaining the test suite?
> > >
> > > Yes, that's me saying I'll apply that.
> >
> > Great, thanks.
>
> Thanks, Paul, all tests passed (on f19) with your patches!
Great, glad they worked for you too.
--
paul moore
security and virtualization @ redhat
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013)
2013-09-24 19:39 ` Paul Moore
2013-09-25 21:31 ` Serge E. Hallyn
@ 2013-09-26 18:48 ` Serge E. Hallyn
1 sibling, 0 replies; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-26 18:48 UTC (permalink / raw)
To: Paul Moore; +Cc: Serge E. Hallyn, selinux
Quoting Paul Moore (pmoore@redhat.com):
> On Tuesday, September 24, 2013 04:49:25 PM Serge E. Hallyn wrote:
> > Quoting Paul Moore (pmoore@redhat.com):
> > > Signed-off-by: Paul Moore <pmoore@redhat.com>
> >
> > Thanks, Paul! This break had been reported to me and I got as far
> > as tracking it to its cause, but I hadn't yet figured out what to
> > replace it by.
>
> No problem.
>
> > I assume you're saying it's not strictly necessary :) All the better.
>
> Well, I guess what I'm trying to say is that I'm not sure if this is the right
> fix, but it does at least resolve the build problems I'm seeing. I have yet
> to check to see if it works correctly.
(I'm hoping to work on that tomorrow, fwiw)
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [selinux-testsuite RFC PATCH 2/4] test_policy: general Makefile cleanup
2013-09-24 16:33 [selinux-testsuite RFC PATCH 0/4] selinux-testsuite patches Paul Moore
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013) Paul Moore
@ 2013-09-24 16:33 ` Paul Moore
2013-09-24 16:52 ` Serge E. Hallyn
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 3/4] test_policy: use RHEL instead of REDHAT in Makefile Paul Moore
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 4/4] test_policy: create a "build" target Paul Moore
3 siblings, 1 reply; 15+ messages in thread
From: Paul Moore @ 2013-09-24 16:33 UTC (permalink / raw)
To: serge; +Cc: selinux
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
policy/Makefile | 51 +++++++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/policy/Makefile b/policy/Makefile
index 6fb9578..5dbb655 100644
--- a/policy/Makefile
+++ b/policy/Makefile
@@ -1,36 +1,40 @@
-REDHAT_RELEASE=$(shell rpm -q redhat-release)
-REDHAT_VERS=$(shell echo $(REDHAT_RELEASE) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
-POLICYDEVEL = /usr/share/selinux/devel
+POLDEV = /usr/share/selinux/devel
SEMODULE = /usr/sbin/semodule
CHECKPOLICY = /usr/bin/checkpolicy
-VERS := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
-
-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
-
-VERS_GE_24 := $(shell [ $(VERS) -ge 24 ] && echo true )
-
-ifeq ($(VERS_GE_24),true)
-TARGETS+= test_bounds.te
+
+REDHAT_RELEASE=$(shell rpm -q redhat-release)
+REDHAT_VERS=$(shell echo $(REDHAT_RELEASE) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
+
+POL_VERS := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
+
+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
+
+ifeq ($(shell [ $(POL_VERS) -ge 24 ] && echo true),true)
+TARGETS += test_bounds.te
endif
all: $(TARGETS)
ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
$(MAKE) -C redhat/$(REDHAT_VERS) all
else
- @if [ -d $(POLICYDEVEL) ]; then \
+ @if [ -d $(POLDEV) ]; then \
mkdir -p test_policy; \
cp test_policy.if test_policy; \
- set -e; rm -f test_policy.te; cat $(TARGETS) > test_policy/test_policy.te; \
- cd test_policy && $(MAKE) -f $(POLICYDEVEL)/Makefile test_policy.pp; \
+ set -e; rm -f test_policy.te; \
+ cat $(TARGETS) > test_policy/test_policy.te; \
+ $(MAKE) -C test_policy -f $(POLDEV)/Makefile test_policy.pp; \
else \
echo "ERROR: You must have selinux-policy-devel installed."; \
fi
@@ -44,7 +48,7 @@ else
$(SEMODULE) -i test_policy/test_policy.pp
endif
-unload:
+unload:
ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
$(MAKE) -C redhat/$(REDHAT_VERS) unload
else
@@ -54,4 +58,3 @@ endif
clean:
rm -rf test_policy tmp
-
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 2/4] test_policy: general Makefile cleanup
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 2/4] test_policy: general Makefile cleanup Paul Moore
@ 2013-09-24 16:52 ` Serge E. Hallyn
0 siblings, 0 replies; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-24 16:52 UTC (permalink / raw)
To: Paul Moore; +Cc: serge, selinux
Quoting Paul Moore (pmoore@redhat.com):
> Signed-off-by: Paul Moore <pmoore@redhat.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
> policy/Makefile | 51 +++++++++++++++++++++++++++------------------------
> 1 file changed, 27 insertions(+), 24 deletions(-)
>
> diff --git a/policy/Makefile b/policy/Makefile
> index 6fb9578..5dbb655 100644
> --- a/policy/Makefile
> +++ b/policy/Makefile
> @@ -1,36 +1,40 @@
> -REDHAT_RELEASE=$(shell rpm -q redhat-release)
> -REDHAT_VERS=$(shell echo $(REDHAT_RELEASE) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
>
> -POLICYDEVEL = /usr/share/selinux/devel
> +POLDEV = /usr/share/selinux/devel
> SEMODULE = /usr/sbin/semodule
> CHECKPOLICY = /usr/bin/checkpolicy
> -VERS := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
> -
> -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
> -
> -VERS_GE_24 := $(shell [ $(VERS) -ge 24 ] && echo true )
> -
> -ifeq ($(VERS_GE_24),true)
> -TARGETS+= test_bounds.te
> +
> +REDHAT_RELEASE=$(shell rpm -q redhat-release)
> +REDHAT_VERS=$(shell echo $(REDHAT_RELEASE) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
> +
> +POL_VERS := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
> +
> +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
> +
> +ifeq ($(shell [ $(POL_VERS) -ge 24 ] && echo true),true)
> +TARGETS += test_bounds.te
> endif
>
> all: $(TARGETS)
> ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
> $(MAKE) -C redhat/$(REDHAT_VERS) all
> else
> - @if [ -d $(POLICYDEVEL) ]; then \
> + @if [ -d $(POLDEV) ]; then \
> mkdir -p test_policy; \
> cp test_policy.if test_policy; \
> - set -e; rm -f test_policy.te; cat $(TARGETS) > test_policy/test_policy.te; \
> - cd test_policy && $(MAKE) -f $(POLICYDEVEL)/Makefile test_policy.pp; \
> + set -e; rm -f test_policy.te; \
> + cat $(TARGETS) > test_policy/test_policy.te; \
> + $(MAKE) -C test_policy -f $(POLDEV)/Makefile test_policy.pp; \
> else \
> echo "ERROR: You must have selinux-policy-devel installed."; \
> fi
> @@ -44,7 +48,7 @@ else
> $(SEMODULE) -i test_policy/test_policy.pp
> endif
>
> -unload:
> +unload:
> ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
> $(MAKE) -C redhat/$(REDHAT_VERS) unload
> else
> @@ -54,4 +58,3 @@ endif
>
> clean:
> rm -rf test_policy tmp
> -
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [selinux-testsuite RFC PATCH 3/4] test_policy: use RHEL instead of REDHAT in Makefile
2013-09-24 16:33 [selinux-testsuite RFC PATCH 0/4] selinux-testsuite patches Paul Moore
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 1/4] test_policy: test_global.te fix for Fedora Rawhide (Sept 24th, 2013) Paul Moore
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 2/4] test_policy: general Makefile cleanup Paul Moore
@ 2013-09-24 16:33 ` Paul Moore
2013-09-24 16:53 ` Serge E. Hallyn
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 4/4] test_policy: create a "build" target Paul Moore
3 siblings, 1 reply; 15+ messages in thread
From: Paul Moore @ 2013-09-24 16:33 UTC (permalink / raw)
To: serge; +Cc: selinux
We also rework some of the if statements to make it easier to add
additional distributions, e.g. Fedora.
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
policy/Makefile | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/policy/Makefile b/policy/Makefile
index 5dbb655..8763143 100644
--- a/policy/Makefile
+++ b/policy/Makefile
@@ -3,8 +3,8 @@ POLDEV = /usr/share/selinux/devel
SEMODULE = /usr/sbin/semodule
CHECKPOLICY = /usr/bin/checkpolicy
-REDHAT_RELEASE=$(shell rpm -q redhat-release)
-REDHAT_VERS=$(shell echo $(REDHAT_RELEASE) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
+RHEL_REL=$(shell rpm -q redhat-release)
+RHEL_VERS=$(shell echo $(RHEL_REL) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
POL_VERS := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
@@ -26,9 +26,12 @@ TARGETS += test_bounds.te
endif
all: $(TARGETS)
-ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
- $(MAKE) -C redhat/$(REDHAT_VERS) all
-else
+ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
+ # RHEL specific policy build
+ $(MAKE) -C redhat/$(RHEL_VERS) all \
+ exit $$?
+endif
+ # General policy build
@if [ -d $(POLDEV) ]; then \
mkdir -p test_policy; \
cp test_policy.if test_policy; \
@@ -38,23 +41,26 @@ else
else \
echo "ERROR: You must have selinux-policy-devel installed."; \
fi
-endif
load: all
-ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
- $(MAKE) -C redhat/$(REDHAT_VERS) load
-else
+ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
+ # RHEL specific policy load
+ $(MAKE) -C redhat/$(RHEL_VERS) load \
+ exit $$?
+endif
+ # General policy load
/usr/sbin/setsebool allow_domain_fd_use=0
$(SEMODULE) -i test_policy/test_policy.pp
-endif
unload:
-ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
- $(MAKE) -C redhat/$(REDHAT_VERS) unload
-else
+ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
+ # RHEL specific policy unload
+ $(MAKE) -C redhat/$(RHEL_VERS) unload \
+ exit $$?
+endif
+ # General policy unload
/usr/sbin/setsebool allow_domain_fd_use=1
$(SEMODULE) -r test_policy
-endif
clean:
rm -rf test_policy tmp
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [selinux-testsuite RFC PATCH 3/4] test_policy: use RHEL instead of REDHAT in Makefile
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 3/4] test_policy: use RHEL instead of REDHAT in Makefile Paul Moore
@ 2013-09-24 16:53 ` Serge E. Hallyn
0 siblings, 0 replies; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-24 16:53 UTC (permalink / raw)
To: Paul Moore; +Cc: serge, selinux
Quoting Paul Moore (pmoore@redhat.com):
> We also rework some of the if statements to make it easier to add
> additional distributions, e.g. Fedora.
>
> Signed-off-by: Paul Moore <pmoore@redhat.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
> policy/Makefile | 34 ++++++++++++++++++++--------------
> 1 file changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/policy/Makefile b/policy/Makefile
> index 5dbb655..8763143 100644
> --- a/policy/Makefile
> +++ b/policy/Makefile
> @@ -3,8 +3,8 @@ POLDEV = /usr/share/selinux/devel
> SEMODULE = /usr/sbin/semodule
> CHECKPOLICY = /usr/bin/checkpolicy
>
> -REDHAT_RELEASE=$(shell rpm -q redhat-release)
> -REDHAT_VERS=$(shell echo $(REDHAT_RELEASE) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
> +RHEL_REL=$(shell rpm -q redhat-release)
> +RHEL_VERS=$(shell echo $(RHEL_REL) | cut -f3 -d"-" | sed -e "s/[^0-9]*//g")
>
> POL_VERS := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
>
> @@ -26,9 +26,12 @@ TARGETS += test_bounds.te
> endif
>
> all: $(TARGETS)
> -ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
> - $(MAKE) -C redhat/$(REDHAT_VERS) all
> -else
> +ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
> + # RHEL specific policy build
> + $(MAKE) -C redhat/$(RHEL_VERS) all \
> + exit $$?
> +endif
> + # General policy build
> @if [ -d $(POLDEV) ]; then \
> mkdir -p test_policy; \
> cp test_policy.if test_policy; \
> @@ -38,23 +41,26 @@ else
> else \
> echo "ERROR: You must have selinux-policy-devel installed."; \
> fi
> -endif
>
> load: all
> -ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
> - $(MAKE) -C redhat/$(REDHAT_VERS) load
> -else
> +ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
> + # RHEL specific policy load
> + $(MAKE) -C redhat/$(RHEL_VERS) load \
> + exit $$?
> +endif
> + # General policy load
> /usr/sbin/setsebool allow_domain_fd_use=0
> $(SEMODULE) -i test_policy/test_policy.pp
> -endif
>
> unload:
> -ifeq (x$(REDHAT_VERS),$(filter x$(REDHAT_VERS),x4 x5))
> - $(MAKE) -C redhat/$(REDHAT_VERS) unload
> -else
> +ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
> + # RHEL specific policy unload
> + $(MAKE) -C redhat/$(RHEL_VERS) unload \
> + exit $$?
> +endif
> + # General policy unload
> /usr/sbin/setsebool allow_domain_fd_use=1
> $(SEMODULE) -r test_policy
> -endif
>
> clean:
> rm -rf test_policy tmp
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [selinux-testsuite RFC PATCH 4/4] test_policy: create a "build" target
2013-09-24 16:33 [selinux-testsuite RFC PATCH 0/4] selinux-testsuite patches Paul Moore
` (2 preceding siblings ...)
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 3/4] test_policy: use RHEL instead of REDHAT in Makefile Paul Moore
@ 2013-09-24 16:33 ` Paul Moore
2013-09-24 16:53 ` Serge E. Hallyn
3 siblings, 1 reply; 15+ messages in thread
From: Paul Moore @ 2013-09-24 16:33 UTC (permalink / raw)
To: serge; +Cc: selinux
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
policy/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/policy/Makefile b/policy/Makefile
index 8763143..3a8a10d 100644
--- a/policy/Makefile
+++ b/policy/Makefile
@@ -25,7 +25,9 @@ ifeq ($(shell [ $(POL_VERS) -ge 24 ] && echo true),true)
TARGETS += test_bounds.te
endif
-all: $(TARGETS)
+all: build
+
+build: $(TARGETS)
ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
# RHEL specific policy build
$(MAKE) -C redhat/$(RHEL_VERS) all \
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [selinux-testsuite RFC PATCH 4/4] test_policy: create a "build" target
2013-09-24 16:33 ` [selinux-testsuite RFC PATCH 4/4] test_policy: create a "build" target Paul Moore
@ 2013-09-24 16:53 ` Serge E. Hallyn
0 siblings, 0 replies; 15+ messages in thread
From: Serge E. Hallyn @ 2013-09-24 16:53 UTC (permalink / raw)
To: Paul Moore; +Cc: serge, selinux
Quoting Paul Moore (pmoore@redhat.com):
> Signed-off-by: Paul Moore <pmoore@redhat.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
> policy/Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/policy/Makefile b/policy/Makefile
> index 8763143..3a8a10d 100644
> --- a/policy/Makefile
> +++ b/policy/Makefile
> @@ -25,7 +25,9 @@ ifeq ($(shell [ $(POL_VERS) -ge 24 ] && echo true),true)
> TARGETS += test_bounds.te
> endif
>
> -all: $(TARGETS)
> +all: build
> +
> +build: $(TARGETS)
> ifeq (x$(RHEL_VERS),$(filter x$(RHEL_VERS),x4 x5))
> # RHEL specific policy build
> $(MAKE) -C redhat/$(RHEL_VERS) all \
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 15+ messages in thread