Commit | Line | Data |
---|---|---|
1ccea77e | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
d15c345f PM |
2 | /* |
3 | * NetLabel NETLINK Interface | |
4 | * | |
5 | * This file defines the NETLINK interface for the NetLabel system. The | |
6 | * NetLabel system manages static and dynamic label mappings for network | |
7 | * protocols such as CIPSO and RIPSO. | |
8 | * | |
82c21bfa | 9 | * Author: Paul Moore <paul@paul-moore.com> |
d15c345f PM |
10 | */ |
11 | ||
12 | /* | |
13 | * (c) Copyright Hewlett-Packard Development Company, L.P., 2006 | |
d15c345f PM |
14 | */ |
15 | ||
16 | #ifndef _NETLABEL_USER_H | |
17 | #define _NETLABEL_USER_H | |
18 | ||
7a0e1d60 | 19 | #include <linux/types.h> |
d15c345f PM |
20 | #include <linux/skbuff.h> |
21 | #include <linux/capability.h> | |
32f50cde | 22 | #include <linux/audit.h> |
7a0e1d60 | 23 | #include <net/netlink.h> |
d15c345f | 24 | #include <net/genetlink.h> |
7a0e1d60 | 25 | #include <net/netlabel.h> |
d15c345f PM |
26 | |
27 | /* NetLabel NETLINK helper functions */ | |
28 | ||
95d4e6be PM |
29 | /** |
30 | * netlbl_netlink_auditinfo - Fetch the audit information from a NETLINK msg | |
95d4e6be PM |
31 | * @audit_info: NetLabel audit information |
32 | */ | |
f7e0318a | 33 | static inline void netlbl_netlink_auditinfo(struct netlbl_audit *audit_info) |
95d4e6be | 34 | { |
6326948f | 35 | security_current_getsecid_subj(&audit_info->secid); |
c53fa1ed PM |
36 | audit_info->loginuid = audit_get_loginuid(current); |
37 | audit_info->sessionid = audit_get_sessionid(current); | |
95d4e6be PM |
38 | } |
39 | ||
d15c345f PM |
40 | /* NetLabel NETLINK I/O functions */ |
41 | ||
42 | int netlbl_netlink_init(void); | |
d15c345f | 43 | |
32f50cde PM |
44 | /* NetLabel Audit Functions */ |
45 | ||
95d4e6be PM |
46 | struct audit_buffer *netlbl_audit_start_common(int type, |
47 | struct netlbl_audit *audit_info); | |
32f50cde | 48 | |
d15c345f | 49 | #endif |