All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] SELinux testsuite compilation fixes
@ 2015-06-04 16:15 Paul Moore
  2015-06-04 16:15 ` [PATCH 1/3] selinux-testsuite: fix some compile warnings in tests/nnp Paul Moore
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paul Moore @ 2015-06-04 16:15 UTC (permalink / raw)
  To: selinux

A few compilation fixes found using today's Rawhide.

---

Paul Moore (3):
      selinux-testsuite: fix some compile warnings in tests/nnp
      selinux-testsuite: fix compile warnings in tests/setnice
      selinux-testsuite: fix compile warnings in tests/execshare


 tests/execshare/parent.c |    3 +++
 tests/nnp/execnnp.c      |    5 +++++
 tests/setnice/parent.c   |    2 ++
 3 files changed, 10 insertions(+)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] selinux-testsuite: fix some compile warnings in tests/nnp
  2015-06-04 16:15 [PATCH 0/3] SELinux testsuite compilation fixes Paul Moore
@ 2015-06-04 16:15 ` Paul Moore
  2015-06-04 16:15 ` [PATCH 2/3] selinux-testsuite: fix compile warnings in tests/setnice Paul Moore
  2015-06-04 16:15 ` [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare Paul Moore
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Moore @ 2015-06-04 16:15 UTC (permalink / raw)
  To: selinux

Correct the following:

make[2]: Entering directory '/root/sources/selinux-testsuite/tests/nnp'
cc     execnnp.c  -lselinux -o execnnp
execnnp.c: In function 'main':
execnnp.c:27:9: warning: implicit declaration of function 'strverscmp'
        (strverscmp(uts.release, "3.18") < 0));
         ^
execnnp.c:47:8: warning: implicit declaration of function 'wait'
  pid = wait(&status);

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 tests/nnp/execnnp.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/nnp/execnnp.c b/tests/nnp/execnnp.c
index a5a80cf..2563909 100644
--- a/tests/nnp/execnnp.c
+++ b/tests/nnp/execnnp.c
@@ -1,3 +1,6 @@
+
+#define _GNU_SOURCE
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -5,6 +8,8 @@
 #include <unistd.h>
 #include <sys/utsname.h>
 #include <sys/prctl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 
 int main(int argc, char **argv)
 {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] selinux-testsuite: fix compile warnings in tests/setnice
  2015-06-04 16:15 [PATCH 0/3] SELinux testsuite compilation fixes Paul Moore
  2015-06-04 16:15 ` [PATCH 1/3] selinux-testsuite: fix some compile warnings in tests/nnp Paul Moore
@ 2015-06-04 16:15 ` Paul Moore
  2015-06-04 16:15 ` [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare Paul Moore
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Moore @ 2015-06-04 16:15 UTC (permalink / raw)
  To: selinux

Correct the following:

make[2]: Entering directory '/root/sources/selinux-testsuite/tests/setnice'
cc     parent.c  -lselinux -o parent
parent.c: In function 'main':
parent.c:92:9: warning: implicit declaration of function 'setpriority'
   rc =  setpriority(0,pid,10);
         ^

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 tests/setnice/parent.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/setnice/parent.c b/tests/setnice/parent.c
index d5a2533..6d3c855 100644
--- a/tests/setnice/parent.c
+++ b/tests/setnice/parent.c
@@ -3,6 +3,8 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/resource.h>
 #include <signal.h>
 #include <selinux/selinux.h>
 #include <selinux/context.h>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare
  2015-06-04 16:15 [PATCH 0/3] SELinux testsuite compilation fixes Paul Moore
  2015-06-04 16:15 ` [PATCH 1/3] selinux-testsuite: fix some compile warnings in tests/nnp Paul Moore
  2015-06-04 16:15 ` [PATCH 2/3] selinux-testsuite: fix compile warnings in tests/setnice Paul Moore
@ 2015-06-04 16:15 ` Paul Moore
  2015-06-04 16:29   ` Stephen Smalley
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Moore @ 2015-06-04 16:15 UTC (permalink / raw)
  To: selinux

Correct the following:

make[2]: Entering directory '/root/sources/selinux-testsuite/tests/execshare'
cc     parent.c  -lselinux -o parent
parent.c: In function 'main':
parent.c:83:8: warning: implicit declaration of function 'clone'
  pid = clone(clone_fn, clone_stack, cloneflags | SIGCHLD, argv);
        ^

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 tests/execshare/parent.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/execshare/parent.c b/tests/execshare/parent.c
index 86f6ae9..343c35f 100644
--- a/tests/execshare/parent.c
+++ b/tests/execshare/parent.c
@@ -1,3 +1,6 @@
+
+#define _GNU_SOURCE
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare
  2015-06-04 16:15 ` [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare Paul Moore
@ 2015-06-04 16:29   ` Stephen Smalley
  2015-06-04 19:26     ` Paul Moore
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Smalley @ 2015-06-04 16:29 UTC (permalink / raw)
  To: Paul Moore, selinux

On 06/04/2015 12:15 PM, Paul Moore wrote:
> Correct the following:
> 
> make[2]: Entering directory '/root/sources/selinux-testsuite/tests/execshare'
> cc     parent.c  -lselinux -o parent
> parent.c: In function 'main':
> parent.c:83:8: warning: implicit declaration of function 'clone'
>   pid = clone(clone_fn, clone_stack, cloneflags | SIGCHLD, argv);
>         ^
> 
> Signed-off-by: Paul Moore <paul@paul-moore.com>

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

Although maybe we should just add -D_GNU_SOURCE to CFLAGS in the
tests/Makefile...

> ---
>  tests/execshare/parent.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/execshare/parent.c b/tests/execshare/parent.c
> index 86f6ae9..343c35f 100644
> --- a/tests/execshare/parent.c
> +++ b/tests/execshare/parent.c
> @@ -1,3 +1,6 @@
> +
> +#define _GNU_SOURCE
> +
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <unistd.h>
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare
  2015-06-04 16:29   ` Stephen Smalley
@ 2015-06-04 19:26     ` Paul Moore
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Moore @ 2015-06-04 19:26 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: selinux

On Thu, Jun 4, 2015 at 12:29 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On 06/04/2015 12:15 PM, Paul Moore wrote:
>> Correct the following:
>>
>> make[2]: Entering directory '/root/sources/selinux-testsuite/tests/execshare'
>> cc     parent.c  -lselinux -o parent
>> parent.c: In function 'main':
>> parent.c:83:8: warning: implicit declaration of function 'clone'
>>   pid = clone(clone_fn, clone_stack, cloneflags | SIGCHLD, argv);
>>         ^
>>
>> Signed-off-by: Paul Moore <paul@paul-moore.com>
>
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
>
> Although maybe we should just add -D_GNU_SOURCE to CFLAGS in the
> tests/Makefile...

Good point, v2 shortly.

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-04 19:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 16:15 [PATCH 0/3] SELinux testsuite compilation fixes Paul Moore
2015-06-04 16:15 ` [PATCH 1/3] selinux-testsuite: fix some compile warnings in tests/nnp Paul Moore
2015-06-04 16:15 ` [PATCH 2/3] selinux-testsuite: fix compile warnings in tests/setnice Paul Moore
2015-06-04 16:15 ` [PATCH 3/3] selinux-testsuite: fix compile warnings in tests/execshare Paul Moore
2015-06-04 16:29   ` Stephen Smalley
2015-06-04 19:26     ` Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.