linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selinux: include necessary headers in headers
@ 2022-05-02 14:15 Christian Göttsche
  2022-05-03 18:12 ` Paul Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Göttsche @ 2022-05-02 14:15 UTC (permalink / raw)
  To: selinux
  Cc: Paul Moore, Stephen Smalley, Eric Paris, Zhongjun Tan, linux-kernel

Include header files required for struct or typedef declarations in
header files.  This is for example helpful when working with an IDE, which
needs to resolve those symbols.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 security/selinux/include/audit.h   | 3 +++
 security/selinux/include/avc_ss.h  | 2 +-
 security/selinux/include/ibpkey.h  | 2 ++
 security/selinux/include/netnode.h | 2 ++
 security/selinux/include/netport.h | 2 ++
 security/selinux/include/xfrm.h    | 2 ++
 6 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/security/selinux/include/audit.h b/security/selinux/include/audit.h
index 073a3d34a0d2..be42d7dc2c0c 100644
--- a/security/selinux/include/audit.h
+++ b/security/selinux/include/audit.h
@@ -12,6 +12,9 @@
 #ifndef _SELINUX_AUDIT_H
 #define _SELINUX_AUDIT_H
 
+#include <linux/audit.h>
+#include <linux/types.h>
+
 /**
  *	selinux_audit_rule_init - alloc/init an selinux audit rule structure.
  *	@field: the field this rule refers to
diff --git a/security/selinux/include/avc_ss.h b/security/selinux/include/avc_ss.h
index 88c384c5c09e..66a87559b788 100644
--- a/security/selinux/include/avc_ss.h
+++ b/security/selinux/include/avc_ss.h
@@ -7,7 +7,7 @@
 #ifndef _SELINUX_AVC_SS_H_
 #define _SELINUX_AVC_SS_H_
 
-#include "flask.h"
+#include <linux/types.h>
 
 struct selinux_avc;
 int avc_ss_reset(struct selinux_avc *avc, u32 seqno);
diff --git a/security/selinux/include/ibpkey.h b/security/selinux/include/ibpkey.h
index e6ac1d23320b..c992f83b0aae 100644
--- a/security/selinux/include/ibpkey.h
+++ b/security/selinux/include/ibpkey.h
@@ -14,6 +14,8 @@
 #ifndef _SELINUX_IB_PKEY_H
 #define _SELINUX_IB_PKEY_H
 
+#include <linux/types.h>
+
 #ifdef CONFIG_SECURITY_INFINIBAND
 void sel_ib_pkey_flush(void);
 int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);
diff --git a/security/selinux/include/netnode.h b/security/selinux/include/netnode.h
index e3f784a85840..9b8b655a8cd3 100644
--- a/security/selinux/include/netnode.h
+++ b/security/selinux/include/netnode.h
@@ -17,6 +17,8 @@
 #ifndef _SELINUX_NETNODE_H
 #define _SELINUX_NETNODE_H
 
+#include <linux/types.h>
+
 void sel_netnode_flush(void);
 
 int sel_netnode_sid(void *addr, u16 family, u32 *sid);
diff --git a/security/selinux/include/netport.h b/security/selinux/include/netport.h
index 31bc16e29cd1..9096a8289948 100644
--- a/security/selinux/include/netport.h
+++ b/security/selinux/include/netport.h
@@ -16,6 +16,8 @@
 #ifndef _SELINUX_NETPORT_H
 #define _SELINUX_NETPORT_H
 
+#include <linux/types.h>
+
 void sel_netport_flush(void);
 
 int sel_netport_sid(u8 protocol, u16 pnum, u32 *sid);
diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h
index 74159400eeee..c75839860200 100644
--- a/security/selinux/include/xfrm.h
+++ b/security/selinux/include/xfrm.h
@@ -8,7 +8,9 @@
 #ifndef _SELINUX_XFRM_H_
 #define _SELINUX_XFRM_H_
 
+#include <linux/lsm_audit.h>
 #include <net/flow.h>
+#include <net/xfrm.h>
 
 int selinux_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp,
 			      struct xfrm_user_sec_ctx *uctx,
-- 
2.36.0


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

* Re: [PATCH] selinux: include necessary headers in headers
  2022-05-02 14:15 [PATCH] selinux: include necessary headers in headers Christian Göttsche
@ 2022-05-03 18:12 ` Paul Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2022-05-03 18:12 UTC (permalink / raw)
  To: Christian Göttsche
  Cc: selinux, Stephen Smalley, Eric Paris, Zhongjun Tan, linux-kernel

On Mon, May 2, 2022 at 10:15 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Include header files required for struct or typedef declarations in
> header files.  This is for example helpful when working with an IDE, which
> needs to resolve those symbols.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> ---
>  security/selinux/include/audit.h   | 3 +++
>  security/selinux/include/avc_ss.h  | 2 +-
>  security/selinux/include/ibpkey.h  | 2 ++
>  security/selinux/include/netnode.h | 2 ++
>  security/selinux/include/netport.h | 2 ++
>  security/selinux/include/xfrm.h    | 2 ++
>  6 files changed, 12 insertions(+), 1 deletion(-)

Merged into selinux/next, thanks.

-- 
paul-moore.com

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

end of thread, other threads:[~2022-05-03 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 14:15 [PATCH] selinux: include necessary headers in headers Christian Göttsche
2022-05-03 18:12 ` Paul Moore

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).