On Tue, 2008-06-10 at 10:36 -0400, Stephen Smalley wrote:
> Fix a bug in the sigiotask test and enable the test_fdreceive policy to build
> against the latest refpolicy headers.
>
> Signed-off-by: Stephen Smalley <[EMAIL PROTECTED]>
Thanks Stephen for the patch. The same has been applied.
Regards--
Subrata
>
> ---
>
> testcases/kernel/security/selinux-testsuite/refpolicy/test_fdreceive.te |
> 6 +++---
> testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c |
> 3 ++-
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> Index:
> ltp/testcases/kernel/security/selinux-testsuite/refpolicy/test_fdreceive.te
> ===================================================================
> RCS file:
> /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/refpolicy/test_fdreceive.te,v
> retrieving revision 1.2
> diff -u -r1.2 test_fdreceive.te
> ---
> ltp/testcases/kernel/security/selinux-testsuite/refpolicy/test_fdreceive.te
> 27 Mar 2006 16:55:48 -0000 1.2
> +++
> ltp/testcases/kernel/security/selinux-testsuite/refpolicy/test_fdreceive.te
> 10 Jun 2008 14:31:54 -0000
> @@ -40,7 +40,7 @@
> # Grant the necessary permissions for the server domain.
> ## Create the Unix domain socket file.
> allow test_fdreceive_server_t test_file_t:dir rw_dir_perms;
> -allow test_fdreceive_server_t test_file_t:sock_file create_file_perms;
> +allow test_fdreceive_server_t test_file_t:sock_file create_sock_file_perms;
> ## Use fds created by the client domain.
> allow test_fdreceive_server_t test_fdreceive_client_t:fd use;
> ## Access the test file.
> @@ -51,7 +51,7 @@
> allow test_fdreceive_client_t test_fdreceive_file_t:file rw_file_perms;
> allow test_fdreceive_client_t test_fdreceive_file2_t:file rw_file_perms;
> ## Access the Unix domain socket file.
> -allow test_fdreceive_client_t test_file_t:sock_file rw_file_perms;
> +allow test_fdreceive_client_t test_file_t:sock_file rw_sock_file_perms;
> ## Connect to the server domain.
> allow test_fdreceive_client_t test_fdreceive_server_t:unix_stream_socket
> connectto;
>
> @@ -60,6 +60,6 @@
> allow test_fdreceive_client2_t test_fdreceive_file_t:file rw_file_perms;
> allow test_fdreceive_client2_t test_fdreceive_file2_t:file rw_file_perms;
> ## Access the Unix domain socket file.
> -allow test_fdreceive_client2_t test_file_t:sock_file rw_file_perms;
> +allow test_fdreceive_client2_t test_file_t:sock_file rw_sock_file_perms;
> ## Connect to the server domain.
> allow test_fdreceive_client2_t test_fdreceive_server_t:unix_stream_socket
> connectto;
> Index:
> ltp/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
> ===================================================================
> RCS file:
> /cvsroot/ltp/ltp/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c,v
> retrieving revision 1.1
> diff -u -r1.1 selinux_sigiotask.c
> ---
> ltp/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
> 20 Apr 2005 16:09:09 -0000 1.1
> +++
> ltp/testcases/kernel/security/selinux-testsuite/tests/file/selinux_sigiotask.c
> 10 Jun 2008 14:31:54 -0000
> @@ -9,6 +9,7 @@
> */
>
> #define _GNU_SOURCE 3
> +#include <string.h>
> #include<stdio.h>
> #include<stdlib.h>
> #include<sys/types.h>
> @@ -52,7 +53,7 @@
> */
> if( pid == 0 ) {
> /* Create the path to the executable the child will run */
> - sprintf(ex_name, "%s/selinux_wait_io", dirname(argv[0]));
> + sprintf(ex_name, "%s/selinux_wait_io", dirname(strdup(argv[0])));
> printf("ex_name is %s\n", ex_name);
> if( execl(ex_name, (char *) 0) < 0 ) {
> perror("selinux_sigiotask:execl");
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list