Skip to contentSkip to conversation

2010-02-01 cvs make problem

LTP Mitani 3 participants 8 messages Feb 1, 2010 – Feb 2, 2010

lore
Share & tools
lore

Mitani

author
#0 lore raw

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.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) > test_policy.te
cat: /selinux/mls: No such file or directory
make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule: error(s) encountered while parsing configuration /usr/bin/checkmodule: loading policy configuration from tmp/test_policy.tmp make[6]: *** [tmp/test_policy.mod] Error 1
make[6]: Leaving directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
make[5]: *** [test_policy.pp] Error 2
[...]
------------

Similar failure occurred in 2010-01-29 cvs "make".

I got "strace" of "make" command. I think that "${LTPROOT}/testcases/ kernel/security/selinux-testsuite/refpolicy/tmptest_policy.tmp" may be related to this failure:
------------
[...]
20659 open("tmp/test_policy.tmp", O_RDONLY) = 3
20659 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf972518) = -1 ENOTTY (Inappropriate ioctl
for device)
20659 fstat64(3, {st_mode=S_IFREG|0644, st_size=2564625, ...}) = 0 20659 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f400
00
20659 read(3, "#line 1 \"/usr/share/selinux/deve"..., 8192) = 8192 20659 read(3, "\n\n\n\n\n\n\n\n\n#\n# Block device nodes "..., 8192) = 8192 20659 read(3, "################################"..., 8192) = 8192 20659 read(3, "der configuration file.\n## </sum"..., 8192) = 8192 [...]
20659 read(3, "1\n#line 52\n \t\n#line 52\n\t\n#line 5"..., 8192) = 8192 20659 read(3, "\n\tallow testdomain security_t:se"..., 8192) = 8192 20659 read(3, "optional\n#line 104\n\t\n#line 104\n\n"..., 8192) = 8192 20659 read(3, "_t testdomain;\n\nallow test_bound"..., 8192) = 8192 20659 write(2, "test_policy.te:129:", 19) = 19
20659 write(2, "ERROR 'syntax error' at token 't"..., 149) = 149 20659 write(2, "/usr/bin/checkmodule: error(s) "..., 72) = 72 [...]
------------

"${LTPROOT}/testcases/kernel/security/selinux-testsuite/refpolicy/ test_policy.te" is follows:
------------
[...]
allow test_bounds_unbound_t test_bounds_file_t : file { rw_file_perms };

# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; ...Line129
typebounds test_bounds_file_t test_bounds_file_red_t, test_bounds_file_blue_t;

# Allow the test_bounds_parent_t to dyntrans
allow test_bounds_parent_t test_bounds_child_t : process { dyntransition
};
allow test_bounds_parent_t test_bounds_unbound_t : process { dyntransition };
[...]
------------

"${LTPROOT}/testcases/kernel/security/selinux-testsuite/refpolicy/tmp test_policy.tmp" is follows:
------------
[...]
allow test_bounds_unbound_t test_bounds_file_t : file { { getattr read write append ioctl
lock } };
...Line93988

# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; ...Line93991
typebounds test_bounds_file_t test_bounds_file_red_t, test_bounds_file_blue_t;

# Allow the test_bounds_parent_t to dyntrans
allow test_bounds_parent_t test_bounds_child_t : process { dyntransition
};
allow test_bounds_parent_t test_bounds_unbound_t : process { dyntransition };
[...]
------------

In "test_policy.te", Line129's syntax is right, I think.

In "test_policy.tmp", Line93991 is same as "test_policy.te". But Line93988 is different.

I investigated like above, but I couldn't specify a cause after all. Do you have any good idea?

Thank you--

-Tomonori Mitani

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 116 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.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) > test_policy.te
cat: /selinux/mls: No such file or directory
make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule:  error(s) encountered while parsing configuration /usr/bin/checkmodule:  loading policy configuration from tmp/test_policy.tmp make[6]: *** [tmp/test_policy.mod] Error 1
make[6]: Leaving directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
make[5]: *** [test_policy.pp] Error 2
[...]
------------

Similar failure occurred in 2010-01-29 cvs "make".

I got "strace" of "make" command. I think that "${LTPROOT}/testcases/ kernel/security/selinux-testsuite/refpolicy/tmptest_policy.tmp" may be related to this failure:
------------
[...]
20659 open("tmp/test_policy.tmp", O_RDONLY) = 3
20659 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf972518) = -1 ENOTTY (Inappropriate ioctl
 for device)
20659 fstat64(3, {st_mode=S_IFREG|0644, st_size=2564625, ...}) = 0 20659 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f400
00
20659 read(3, "#line 1 \"/usr/share/selinux/deve"..., 8192) = 8192 20659 read(3, "\n\n\n\n\n\n\n\n\n#\n# Block device nodes "..., 8192) = 8192 20659 read(3, "################################"..., 8192) = 8192 20659 read(3, "der configuration file.\n## </sum"..., 8192) = 8192 [...]
20659 read(3, "1\n#line 52\n \t\n#line 52\n\t\n#line 5"..., 8192) = 8192 20659 read(3, "\n\tallow testdomain security_t:se"..., 8192) = 8192 20659 read(3, "optional\n#line 104\n\t\n#line 104\n\n"..., 8192) = 8192 20659 read(3, "_t testdomain;\n\nallow test_bound"..., 8192) = 8192 20659 write(2, "test_policy.te:129:", 19) = 19
20659 write(2, "ERROR 'syntax error' at token 't"..., 149) = 149 20659 write(2, "/usr/bin/checkmodule:  error(s) "..., 72) = 72 [...]
------------

"${LTPROOT}/testcases/kernel/security/selinux-testsuite/refpolicy/ test_policy.te" is follows:
------------
[...]
allow test_bounds_unbound_t test_bounds_file_t : file { rw_file_perms };

# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t;            ...Line129 typebounds test_bounds_file_t test_bounds_file_red_t, test_bounds_file_blue_t;

# Allow the test_bounds_parent_t to dyntrans
allow test_bounds_parent_t test_bounds_child_t   : process { dyntransition };
allow test_bounds_parent_t test_bounds_unbound_t : process { dyntransition };
[...]
------------

"${LTPROOT}/testcases/kernel/security/selinux-testsuite/refpolicy/tmp test_policy.tmp" is follows:
------------
[...]
allow test_bounds_unbound_t test_bounds_file_t : file { { getattr read write append ioctl
lock } };
...Line93988

# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t;            ...Line93991 typebounds test_bounds_file_t test_bounds_file_red_t, test_bounds_file_blue_t;

# Allow the test_bounds_parent_t to dyntrans
allow test_bounds_parent_t test_bounds_child_t   : process { dyntransition };
allow test_bounds_parent_t test_bounds_unbound_t : process { dyntransition };
[...]
------------

Quoted 8 lines

In "test_policy.te", Line129's syntax is right, I think.

In "test_policy.tmp", Line93991 is same as "test_policy.te". But Line93988 is different.

I investigated like above, but I couldn't specify a cause after all. Do you have any good idea?

I'll just yank selinux-testsuite from the default build because apparently the default selinux policies don't work on RHEL.

Please work with Stephen to resolve the issue as I have no idea what the issue is that these these messages are trying to convey...

Thanks,
-Garrett

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

Quoted 9 lines
Quoted 9 lines

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.te

Hmm...this indicates that your Makefile rewrite still isn't working properly on RHEL5, where it is supposed to use the files under refpolicy/policy_files/redhat-5 instead of generic.

Quoted 10 lines
Quoted 10 lines

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) > test_policy.te
cat: /selinux/mls: No such file or directory

And this suggests that the tester does not have SELinux enabled in his kernel. You shouldn't enable the SELinux testsuite unless SELinux is enabled in the kernel. You can test with something akin to:
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then
<run selinux testsuite>
fi

Quoted 9 lines
Quoted 9 lines

make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule: error(s) encountered while parsing configuration /usr/bin/checkmodule: loading policy configuration from tmp/test_policy.tmp

And apparently your Makefile logic to exclude test_bounds.te if CHECKPOLICYVERS is not 24 isn't working either, although it wouldn't try if it was using the right subdirectory.

Signature · 14 lines
Stephen Smalley
National Security Agency


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#3 lore raw
Quoted 51 lines · Stephen Smalley
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

Quoted 9 lines
Quoted 9 lines

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.te

Hmm...this indicates that your Makefile rewrite still isn't working properly on RHEL5, where it is supposed to use the files under refpolicy/policy_files/redhat-5 instead of generic.

Quoted 10 lines
Quoted 10 lines

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) > test_policy.te
cat: /selinux/mls: No such file or directory

And this suggests that the tester does not have SELinux enabled in his kernel.  You shouldn't enable the SELinux testsuite unless SELinux is enabled in the kernel.  You can test with something akin to:
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then <run selinux testsuite>
fi

Quoted 9 lines
Quoted 9 lines

make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule:  error(s) encountered while parsing configuration /usr/bin/checkmodule:  loading policy configuration from tmp/test_policy.tmp

Quoted 3 lines

And apparently your Makefile logic to exclude test_bounds.te if CHECKPOLICYVERS is not 24 isn't working either, although it wouldn't try if it was using the right subdirectory.

Mitani-san -- could you do the following please?

1. cat out your /etc/issue file.
2. Provide the output for $srcdir/scripts/detect_distro.sh

Thanks!
-Garrett

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 52 lines · Garrett Cooper
Quoted 51 lines · Stephen Smalley
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

Quoted 9 lines
Quoted 9 lines

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.te

Hmm...this indicates that your Makefile rewrite still isn't working properly on RHEL5, where it is supposed to use the files under refpolicy/policy_files/redhat-5 instead of generic.

Quoted 10 lines
Quoted 10 lines

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) > test_policy.te
cat: /selinux/mls: No such file or directory

And this suggests that the tester does not have SELinux enabled in his kernel. You shouldn't enable the SELinux testsuite unless SELinux is enabled in the kernel. You can test with something akin to:
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then
<run selinux testsuite>
fi

Quoted 9 lines
Quoted 9 lines

make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule: error(s) encountered while parsing configuration /usr/bin/checkmodule: loading policy configuration from tmp/test_policy.tmp

Quoted 8 lines
Quoted 3 lines

And apparently your Makefile logic to exclude test_bounds.te if CHECKPOLICYVERS is not 24 isn't working either, although it wouldn't try if it was using the right subdirectory.

Mitani-san -- could you do the following please?

1. cat out your /etc/issue file.
2. Provide the output for $srcdir/scripts/detect_distro.sh

Doesn't seem to be stripping the minor version.

$ ./scripts/detect_distro.sh 
redhat-5.4
$ ./scripts/detect_distro.sh  -m
redhat-5.4

Also, the filter-out test_bounds.te has to come after the definition of POLICY_FILES.

Signature · 14 lines
Stephen Smalley
National Security Agency


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#5 lore raw
Quoted 59 lines · Stephen Smalley
Quoted 58 lines · Garrett Cooper
Quoted 51 lines · Stephen Smalley
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

Quoted 9 lines
Quoted 9 lines

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.te

Hmm...this indicates that your Makefile rewrite still isn't working properly on RHEL5, where it is supposed to use the files under refpolicy/policy_files/redhat-5 instead of generic.

Quoted 10 lines
Quoted 10 lines

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) > test_policy.te
cat: /selinux/mls: No such file or directory

And this suggests that the tester does not have SELinux enabled in his kernel.  You shouldn't enable the SELinux testsuite unless SELinux is enabled in the kernel.  You can test with something akin to:
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then <run selinux testsuite>
fi

Quoted 9 lines
Quoted 9 lines

make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule:  error(s) encountered while parsing configuration /usr/bin/checkmodule:  loading policy configuration from tmp/test_policy.tmp

Quoted 3 lines

And apparently your Makefile logic to exclude test_bounds.te if CHECKPOLICYVERS is not 24 isn't working either, although it wouldn't try if it was using the right subdirectory.

Mitani-san -- could you do the following please?

Quoted 8 lines
Quoted 2 lines

1. cat out your /etc/issue file.
2. Provide the output for $srcdir/scripts/detect_distro.sh

Doesn't seem to be stripping the minor version.

$ ./scripts/detect_distro.sh
redhat-5.4
$ ./scripts/detect_distro.sh  -m
redhat-5.4

Ok -- what's the input (/etc/issue)?

Quoted 1 line

Also, the filter-out test_bounds.te has to come after the definition of POLICY_FILES.

Ok...
-Garrett

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw
Quoted 63 lines · Garrett Cooper
Quoted 62 lines · Stephen Smalley
Quoted 60 lines · Garrett Cooper
Quoted 51 lines · Stephen Smalley
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

Quoted 9 lines
Quoted 9 lines

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.te

Hmm...this indicates that your Makefile rewrite still isn't working properly on RHEL5, where it is supposed to use the files under refpolicy/policy_files/redhat-5 instead of generic.

Quoted 10 lines
Quoted 10 lines

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) > test_policy.te
cat: /selinux/mls: No such file or directory

And this suggests that the tester does not have SELinux enabled in his kernel. You shouldn't enable the SELinux testsuite unless SELinux is enabled in the kernel. You can test with something akin to:
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then
<run selinux testsuite>
fi

Quoted 9 lines
Quoted 9 lines

make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule: error(s) encountered while parsing configuration /usr/bin/checkmodule: loading policy configuration from tmp/test_policy.tmp

Quoted 3 lines

And apparently your Makefile logic to exclude test_bounds.te if CHECKPOLICYVERS is not 24 isn't working either, although it wouldn't try if it was using the right subdirectory.

Mitani-san -- could you do the following please?

1. cat out your /etc/issue file.
2. Provide the output for $srcdir/scripts/detect_distro.sh

Quoted 7 lines
Quoted 5 lines

Doesn't seem to be stripping the minor version.

$ ./scripts/detect_distro.sh
redhat-5.4
$ ./scripts/detect_distro.sh  -m
redhat-5.4

Ok -- what's the input (/etc/issue)?

Do you mean /etc/redhat-release?
Red Hat Enterprise Linux Client release 5.4 (Tikanga)

Maybe it would be more portable to use lsb_release(1)

# lsb_release -i
Distributor ID:	RedHatEnterpriseClient
# lsb_release -d
Description:	Red Hat Enterprise Linux Client release 5.4 (Tikanga)
# lsb_release -r
Release:	5.4
Signature · 14 lines
Stephen Smalley
National Security Agency


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#7 lore raw
Quoted 70 lines · Stephen Smalley
Quoted 69 lines · Garrett Cooper
Quoted 67 lines · Stephen Smalley
Quoted 52 lines · Garrett Cooper
Quoted 51 lines · Stephen Smalley
Quoted 7 lines · Garrett Cooper
Quoted 6 lines · Mitani

Hi,

I tried to build 2010-02-01 cvs in RHEL5.4 system. (Archecture : x86 and x86_64)

Quoted 9 lines
Quoted 9 lines

"make" failed with following message:
------------
[...]
make[5]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
(cd "/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy/policy_files/generic" && cat test_global.te test_bounds.te

Hmm...this indicates that your Makefile rewrite still isn't working properly on RHEL5, where it is supposed to use the files under refpolicy/policy_files/redhat-5 instead of generic.

Quoted 10 lines
Quoted 10 lines

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) > test_policy.te
cat: /selinux/mls: No such file or directory

And this suggests that the tester does not have SELinux enabled in his kernel.  You shouldn't enable the SELinux testsuite unless SELinux is enabled in the kernel.  You can test with something akin to:
if [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then <run selinux testsuite>
fi

Quoted 9 lines
Quoted 9 lines

make[6]: Entering directory `/home/LTP/ltp-2010-02-01/testcases/kernel/security/selinux-testsuite/refpol icy'
Compiling targeted test_policy module
test_policy.te:129:ERROR 'syntax error' at token 'typebounds' on line 93991:
# Definition of boundary relationship
typebounds test_bounds_parent_t test_bounds_child_t; /usr/bin/checkmodule:  error(s) encountered while parsing configuration /usr/bin/checkmodule:  loading policy configuration from tmp/test_policy.tmp

Quoted 8 lines
Quoted 3 lines

And apparently your Makefile logic to exclude test_bounds.te if CHECKPOLICYVERS is not 24 isn't working either, although it wouldn't try if it was using the right subdirectory.

Mitani-san -- could you do the following please?

1. cat out your /etc/issue file.
2. Provide the output for $srcdir/scripts/detect_distro.sh

Doesn't seem to be stripping the minor version.

$ ./scripts/detect_distro.sh
redhat-5.4
$ ./scripts/detect_distro.sh  -m
redhat-5.4
Quoted 4 lines
Quoted 1 line

Ok -- what's the input (/etc/issue)?

Do you mean /etc/redhat-release?
Red Hat Enterprise Linux Client release 5.4 (Tikanga)

Yes... thanks!

Quoted 8 lines

Maybe it would be more portable to use lsb_release(1)

# lsb_release -i
Distributor ID: RedHatEnterpriseClient
# lsb_release -d
Description:    Red Hat Enterprise Linux Client release 5.4 (Tikanga)
# lsb_release -r
Release:        5.4

Err... if this was a script and you could use it in cross-compilation scenarios, yes -- I would agree . Otherwise, it's pretty much useless. Thanks,
-Garrett

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list