Skip to content

Commit 4ad37de

Browse files
cgzonespcmoore
authored andcommitted
selinux: include necessary headers in headers
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> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 1d4e803 commit 4ad37de

6 files changed

Lines changed: 12 additions & 1 deletion

File tree

security/selinux/include/audit.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#ifndef _SELINUX_AUDIT_H
1313
#define _SELINUX_AUDIT_H
1414

15+
#include <linux/audit.h>
16+
#include <linux/types.h>
17+
1518
/**
1619
* selinux_audit_rule_init - alloc/init an selinux audit rule structure.
1720
* @field: the field this rule refers to

security/selinux/include/avc_ss.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef _SELINUX_AVC_SS_H_
88
#define _SELINUX_AVC_SS_H_
99

10-
#include "flask.h"
10+
#include <linux/types.h>
1111

1212
struct selinux_avc;
1313
int avc_ss_reset(struct selinux_avc *avc, u32 seqno);

security/selinux/include/ibpkey.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#ifndef _SELINUX_IB_PKEY_H
1515
#define _SELINUX_IB_PKEY_H
1616

17+
#include <linux/types.h>
18+
1719
#ifdef CONFIG_SECURITY_INFINIBAND
1820
void sel_ib_pkey_flush(void);
1921
int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);

security/selinux/include/netnode.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef _SELINUX_NETNODE_H
1818
#define _SELINUX_NETNODE_H
1919

20+
#include <linux/types.h>
21+
2022
void sel_netnode_flush(void);
2123

2224
int sel_netnode_sid(void *addr, u16 family, u32 *sid);

security/selinux/include/netport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#ifndef _SELINUX_NETPORT_H
1717
#define _SELINUX_NETPORT_H
1818

19+
#include <linux/types.h>
20+
1921
void sel_netport_flush(void);
2022

2123
int sel_netport_sid(u8 protocol, u16 pnum, u32 *sid);

security/selinux/include/xfrm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#ifndef _SELINUX_XFRM_H_
99
#define _SELINUX_XFRM_H_
1010

11+
#include <linux/lsm_audit.h>
1112
#include <net/flow.h>
13+
#include <net/xfrm.h>
1214

1315
int selinux_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp,
1416
struct xfrm_user_sec_ctx *uctx,

0 commit comments

Comments
 (0)