linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SELINUX: Fix build error.
@ 2010-08-06 19:37 Ralf Baechle
  2010-08-06 19:47 ` Eric Paris
  0 siblings, 1 reply; 2+ messages in thread
From: Ralf Baechle @ 2010-08-06 19:37 UTC (permalink / raw)
  To: Stephen Smalley, James Morris, Eric Paris; +Cc: linux-kernel

[...]
  CC      security/selinux/hooks.o
/home/ralf/src/linux/linux-mips/security/selinux/hooks.c: In function ‘selinux_inode_permission’:
/home/ralf/src/linux/linux-mips/security/selinux/hooks.c:2644:38: error: ‘FILE__AUDIT_ACCESS’ undeclared (first use in this function)
/home/ralf/src/linux/linux-mips/security/selinux/hooks.c:2644:38: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [security/selinux/hooks.o] Error 1
make[3]: *** [security/selinux] Error 2
make[2]: *** [security] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

This is cause by a stale security/selinux/av_permissions.h in the $(src)
directory which will override a more recent version in $(obj) that is it
appears to strike only when building with a separate object directory.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 security/selinux/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/selinux/Makefile b/security/selinux/Makefile
index f013982..58d80f3 100644
--- a/security/selinux/Makefile
+++ b/security/selinux/Makefile
@@ -25,6 +25,6 @@ $(obj)/avc.o: $(obj)/flask.h
 quiet_cmd_flask = GEN     $(obj)/flask.h $(obj)/av_permissions.h
       cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
 
-targets += flask.h
+targets += flask.h av_permissions.h
 $(obj)/flask.h: $(src)/include/classmap.h FORCE
 	$(call if_changed,flask)

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

* Re: [PATCH] SELINUX: Fix build error.
  2010-08-06 19:37 [PATCH] SELINUX: Fix build error Ralf Baechle
@ 2010-08-06 19:47 ` Eric Paris
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Paris @ 2010-08-06 19:47 UTC (permalink / raw)
  To: torvalds
  Cc: Stephen Smalley, James Morris, Eric Paris, linux-kernel,
	Ralf Baechle, selinux

On Fri, 2010-08-06 at 20:37 +0100, Ralf Baechle wrote:
> [...]
>   CC      security/selinux/hooks.o
> /home/ralf/src/linux/linux-mips/security/selinux/hooks.c: In function ‘selinux_inode_permission’:
> /home/ralf/src/linux/linux-mips/security/selinux/hooks.c:2644:38: error: ‘FILE__AUDIT_ACCESS’ undeclared (first use in this function)
> /home/ralf/src/linux/linux-mips/security/selinux/hooks.c:2644:38: note: each undeclared identifier is reported only once for each function it appears in
> make[4]: *** [security/selinux/hooks.o] Error 1
> make[3]: *** [security/selinux] Error 2
> make[2]: *** [security] Error 2
> make[1]: *** [sub-make] Error 2
> make: *** [all] Error 2
> 
> This is cause by a stale security/selinux/av_permissions.h in the $(src)
> directory which will override a more recent version in $(obj) that is it
> appears to strike only when building with a separate object directory.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Acked-by: Eric Paris <eparis@redhat.com>

Ralf is at least the second person I've seen who had this problem since
the security tree merge.  The problem was not introduced in this merge,
it's just this merge was the first time I added new things to that file,
so it's the first time anyone would have noticed.  Introduced in
8753f6bec352392 but not really a problem until b782e0a68d17894d9a.

It's easily worked around deleting all of of the automagically generated
av_permissions.h files and letting them be regenerated but hardly anyone
would realize they need to delete files by hand (make clean, git clean,
etc won't delete it)

I think James is traveling for a bit so I'm putting it out there for a
faster track to inclusion.

-Eric

>  security/selinux/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/security/selinux/Makefile b/security/selinux/Makefile
> index f013982..58d80f3 100644
> --- a/security/selinux/Makefile
> +++ b/security/selinux/Makefile
> @@ -25,6 +25,6 @@ $(obj)/avc.o: $(obj)/flask.h
>  quiet_cmd_flask = GEN     $(obj)/flask.h $(obj)/av_permissions.h
>        cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
>  
> -targets += flask.h
> +targets += flask.h av_permissions.h
>  $(obj)/flask.h: $(src)/include/classmap.h FORCE
>  	$(call if_changed,flask)



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

end of thread, other threads:[~2010-08-06 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 19:37 [PATCH] SELINUX: Fix build error Ralf Baechle
2010-08-06 19:47 ` Eric Paris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).