On Mon, Jan 11, 2010 at 11:55 AM, Stephen Smalley <[email protected]> wrote:
> On Mon, 2010-01-11 at 13:50 -0600, Serge E. Hallyn wrote:
>> Quoting Stephen Smalley ([email protected]):
>> > On Fri, 2010-01-08 at 23:27 -0800, Garrett Cooper wrote:
>> > > On Fri, Jan 8, 2010 at 2:08 PM, Garrett Cooper <[email protected]> 
>> > > wrote:
>> > > > On Fri, Jan 8, 2010 at 2:00 PM, Stephen Smalley <[email protected]> 
>> > > > wrote:
>> > > >> On Fri, 2010-01-08 at 13:38 -0800, Garrett Cooper wrote:
>> > > >>> On Fri, Jan 8, 2010 at 10:50 AM, Stephen Smalley 
>> > > >>> <[email protected]> wrote:
>> > > >>> > On Fri, 2010-01-08 at 13:47 -0500, Stephen Smalley wrote:
>> > > >>> >> On Fri, 2010-01-08 at 10:20 -0800, Garrett Cooper wrote:
>> > > >>> >> >     Thanks for the feedback and details Stephen.
>> > > >>> >> >     Would you be kind enough to try out the version from CVS to 
>> > > >>> >> > see
>> > > >>> >> > whether or not it resolves your issue? You'll also need to 
>> > > >>> >> > update
>> > > >>> >> > $LTPROOT/scripts in order to use the new version as I added a 
>> > > >>> >> > distro
>> > > >>> >> > detection script which opens up /etc/redhat-release (for 
>> > > >>> >> > redhat) as
>> > > >>> >> > opposed to using rpm to query the release.
>> > > >>> >> > Thanks,
>> > > >>> >> > -Garrett
>> > > >>> >>
>> > > >>> >> The attempt to make the test policy immediately dies with:
>> > > >>> >> detect_distro.sh: ERROR: Bad release file: /etc/redhat-release
>> > > >>> >
>> > > >>> > I should note that I'm running it on Fedora, so I wouldn't expect 
>> > > >>> > that
>> > > >>> > file to exist.  But the script needs to handle it gracefully; we 
>> > > >>> > just
>> > > >>> > use the generic test policy files in that situation.
>> > > >>>
>> > > >>>     What does /etc/redhat-release look like (feel free to reply to 
>> > > >>> me off-list)?
>> > > >>
>> > > >> On RHEL5, it can look like one of the following:
>> > > >> Red Hat Enterprise Linux Server release 5 (Tikanga)
>> > > >> Red Hat Enterprise Linux Server release 5.x (Tikanga)
>> > > >> Red Hat Enterprise Linux Client release 5 (Tikanga)
>> > > >> Red Hat Enterprise Linux Client release 5.x (Tikanga)
>> > > >
>> > > > Interesting. They switched over to more of the Fedora-style branding, 
>> > > > maybe?.
>> > > >
>> > > > [garrc...@halflife ~]$ cat /etc/redhat-release
>> > > > Red Hat Enterprise Linux AS release 4 (Nahant Update 6)
>> > >
>> > > Could you try again please :)?
>> >
>> > Fails with:
>> > cp: cannot stat
>> > `/home/sds/ltp/testcases/kernel/security/selinux-testsuite/refpolicy/policy_files/generic/test_policy.*':
>> >  No such file or directory
>>
>> You ran /home/sds/ltp/testscripts/test_selinux.sh, right?
>>
>> I think we are supposed to actually be running
>> /opt/ltp/testscripts/test_selinux.sh.  So then the first question for
>> Garrett is how should we deduce /home/sds/ltp as $LTP_SRCDIR from a
>> testscript?  Or should the policy sources be copied into /opt?
>
> Ok, but regardless:  the refpolicy Makefile is still broken.

    Yes, it is (I don't have access to that package I think on my
version of Fedora...). Please try the attached patch and let me know
how it goes [the comments aren't as important as the `set -e' and
`$(TEST_POLICY_DIR)/' removal on the cp(1) call].
Thanks,
-Garrett

Index: Makefile
===================================================================
RCS file: 
/cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/refpolicy/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile    8 Jan 2010 09:39:20 -0000       1.12
+++ Makefile    12 Jan 2010 08:40:23 -0000
@@ -69,15 +69,17 @@

 TEST_POLICY_DIR                := $(TEST_POLICY_DIR)/generic

-POLICY_FILES           := test_global.te $(filter-out
test_global.te,$(notdir $(wildcard $(TEST_POLICY_DIR)/*.te)))
+# This is being done to preserve precedence; test_global.te must come first.
+POLICY_FILES           := test_global.te \
+                          $(filter-out test_global.te,$(notdir
$(wildcard $(TEST_POLICY_DIR)/*.te)))

 ifneq ($(CHECKPOLICY_VERS),24)
 POLICY_FILES           := $(filter-out test_bounds.te,$(POLICY_FILES))
 endif

 load:
-       @if [ -d "$(POLICY_DEVEL_DIR)" ]; then \
-           cp -p $(TEST_POLICY_DIR)/test_policy.* $(POLICY_DEVEL_DIR); \
+       @set -e; if [ -d "$(POLICY_DEVEL_DIR)" ]; then \
+           cp -p test_policy.* $(POLICY_DEVEL_DIR); \
            $(MAKE) -C $(POLICY_DEVEL_DIR) clean; \
            $(MAKE) -C $(POLICY_DEVEL_DIR) test_policy.pp; \
            $(SEMODULE) -i $(POLICY_DEVEL_DIR)/test_policy.pp; \

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to