diff options
Diffstat (limited to 'security/apparmor/include/net.h')
-rw-r--r-- | security/apparmor/include/net.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h new file mode 100644 index 00000000000..3c7d5993ccf --- /dev/null +++ b/security/apparmor/include/net.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * AppArmor security module | ||
3 | * | ||
4 | * This file contains AppArmor network mediation definitions. | ||
5 | * | ||
6 | * Copyright (C) 1998-2008 Novell/SUSE | ||
7 | * Copyright 2009-2010 Canonical Ltd. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License as | ||
11 | * published by the Free Software Foundation, version 2 of the | ||
12 | * License. | ||
13 | */ | ||
14 | |||
15 | #ifndef __AA_NET_H | ||
16 | #define __AA_NET_H | ||
17 | |||
18 | #include <net/sock.h> | ||
19 | |||
20 | /* struct aa_net - network confinement data | ||
21 | * @allowed: basic network families permissions | ||
22 | * @audit_network: which network permissions to force audit | ||
23 | * @quiet_network: which network permissions to quiet rejects | ||
24 | */ | ||
25 | struct aa_net { | ||
26 | u16 allow[AF_MAX]; | ||
27 | u16 audit[AF_MAX]; | ||
28 | u16 quiet[AF_MAX]; | ||
29 | }; | ||
30 | |||
31 | extern int aa_net_perm(int op, struct aa_profile *profile, u16 family, | ||
32 | int type, int protocol, struct sock *sk); | ||
33 | extern int aa_revalidate_sk(int op, struct sock *sk); | ||
34 | |||
35 | static inline void aa_free_net_rules(struct aa_net *new) | ||
36 | { | ||
37 | /* NOP */ | ||
38 | } | ||
39 | |||
40 | #endif /* __AA_NET_H */ | ||