aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-12 16:21:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-12 16:21:00 -0400
commit7f85565a3f7194b966de71926471d69788b6b9c3 (patch)
tree95f93ab1d18dc1121cd5ec71309c7e6cb4dedc7b
parent680352bda57e3dbf21cddf6a5e23aff7e294fb31 (diff)
parent0c3014f22dec0e1d14c8298551bfb6434638bdd9 (diff)
Merge tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux updates from Paul Moore: "A relatively quiet period for SELinux, 11 patches with only two/three having any substantive changes. These noteworthy changes include another tweak to the NNP/nosuid handling, per-file labeling for cgroups, and an object class fix for AF_UNIX/SOCK_RAW sockets; the rest of the changes are minor tweaks or administrative updates (Stephen's email update explains the file explosion in the diffstat). Everything passes the selinux-testsuite" [ Also a couple of small patches from the security tree from Tetsuo Handa for Tomoyo and LSM cleanup. The separation of security policy updates wasn't all that clean - Linus ] * tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: constify nf_hook_ops selinux: allow per-file labeling for cgroupfs lsm_audit: update my email address selinux: update my email address MAINTAINERS: update the NetLabel and Labeled Networking information selinux: use GFP_NOWAIT in the AVC kmem_caches selinux: Generalize support for NNP/nosuid SELinux domain transitions selinux: genheaders should fail if too many permissions are defined selinux: update the selinux info in MAINTAINERS credits: update Paul Moore's info selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst LSM: Remove security_task_create() hook.
-rw-r--r--CREDITS8
-rw-r--r--Documentation/admin-guide/LSM/tomoyo.rst24
-rw-r--r--MAINTAINERS29
-rw-r--r--include/linux/lsm_audit.h2
-rw-r--r--include/linux/lsm_hooks.h7
-rw-r--r--include/linux/security.h6
-rw-r--r--kernel/fork.c4
-rw-r--r--scripts/selinux/genheaders/genheaders.c7
-rw-r--r--security/lsm_audit.c2
-rw-r--r--security/security.c5
-rw-r--r--security/selinux/avc.c16
-rw-r--r--security/selinux/hooks.c54
-rw-r--r--security/selinux/include/avc.h2
-rw-r--r--security/selinux/include/avc_ss.h2
-rw-r--r--security/selinux/include/classmap.h2
-rw-r--r--security/selinux/include/objsec.h2
-rw-r--r--security/selinux/include/security.h4
-rw-r--r--security/selinux/ss/avtab.c2
-rw-r--r--security/selinux/ss/avtab.h2
-rw-r--r--security/selinux/ss/constraint.h2
-rw-r--r--security/selinux/ss/context.h2
-rw-r--r--security/selinux/ss/ebitmap.c2
-rw-r--r--security/selinux/ss/ebitmap.h2
-rw-r--r--security/selinux/ss/hashtab.c2
-rw-r--r--security/selinux/ss/hashtab.h2
-rw-r--r--security/selinux/ss/mls.c2
-rw-r--r--security/selinux/ss/mls.h2
-rw-r--r--security/selinux/ss/mls_types.h2
-rw-r--r--security/selinux/ss/policydb.c2
-rw-r--r--security/selinux/ss/policydb.h2
-rw-r--r--security/selinux/ss/services.c9
-rw-r--r--security/selinux/ss/services.h2
-rw-r--r--security/selinux/ss/sidtab.c2
-rw-r--r--security/selinux/ss/sidtab.h2
-rw-r--r--security/selinux/ss/symtab.c2
-rw-r--r--security/selinux/ss/symtab.h2
36 files changed, 117 insertions, 104 deletions
diff --git a/CREDITS b/CREDITS
index 0d2d60de5a25..9fbd2c77b546 100644
--- a/CREDITS
+++ b/CREDITS
@@ -2606,11 +2606,9 @@ E: tmolina@cablespeed.com
2606D: bug fixes, documentation, minor hackery 2606D: bug fixes, documentation, minor hackery
2607 2607
2608N: Paul Moore 2608N: Paul Moore
2609E: paul.moore@hp.com 2609E: paul@paul-moore.com
2610D: NetLabel author 2610W: http://www.paul-moore.com
2611S: Hewlett-Packard 2611D: NetLabel, SELinux, audit
2612S: 110 Spit Brook Road
2613S: Nashua, NH 03062
2614 2612
2615N: James Morris 2613N: James Morris
2616E: jmorris@namei.org 2614E: jmorris@namei.org
diff --git a/Documentation/admin-guide/LSM/tomoyo.rst b/Documentation/admin-guide/LSM/tomoyo.rst
index a5947218fa64..e2d6b6e15082 100644
--- a/Documentation/admin-guide/LSM/tomoyo.rst
+++ b/Documentation/admin-guide/LSM/tomoyo.rst
@@ -9,8 +9,8 @@ TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel.
9 9
10LiveCD-based tutorials are available at 10LiveCD-based tutorials are available at
11 11
12http://tomoyo.sourceforge.jp/1.7/1st-step/ubuntu10.04-live/ 12http://tomoyo.sourceforge.jp/1.8/ubuntu12.04-live.html
13http://tomoyo.sourceforge.jp/1.7/1st-step/centos5-live/ 13http://tomoyo.sourceforge.jp/1.8/centos6-live.html
14 14
15Though these tutorials use non-LSM version of TOMOYO, they are useful for you 15Though these tutorials use non-LSM version of TOMOYO, they are useful for you
16to know what TOMOYO is. 16to know what TOMOYO is.
@@ -21,35 +21,35 @@ How to enable TOMOYO?
21Build the kernel with ``CONFIG_SECURITY_TOMOYO=y`` and pass ``security=tomoyo`` on 21Build the kernel with ``CONFIG_SECURITY_TOMOYO=y`` and pass ``security=tomoyo`` on
22kernel's command line. 22kernel's command line.
23 23
24Please see http://tomoyo.sourceforge.jp/2.3/ for details. 24Please see http://tomoyo.osdn.jp/2.5/ for details.
25 25
26Where is documentation? 26Where is documentation?
27======================= 27=======================
28 28
29User <-> Kernel interface documentation is available at 29User <-> Kernel interface documentation is available at
30http://tomoyo.sourceforge.jp/2.3/policy-reference.html . 30http://tomoyo.osdn.jp/2.5/policy-specification/index.html .
31 31
32Materials we prepared for seminars and symposiums are available at 32Materials we prepared for seminars and symposiums are available at
33http://sourceforge.jp/projects/tomoyo/docs/?category_id=532&language_id=1 . 33http://osdn.jp/projects/tomoyo/docs/?category_id=532&language_id=1 .
34Below lists are chosen from three aspects. 34Below lists are chosen from three aspects.
35 35
36What is TOMOYO? 36What is TOMOYO?
37 TOMOYO Linux Overview 37 TOMOYO Linux Overview
38 http://sourceforge.jp/projects/tomoyo/docs/lca2009-takeda.pdf 38 http://osdn.jp/projects/tomoyo/docs/lca2009-takeda.pdf
39 TOMOYO Linux: pragmatic and manageable security for Linux 39 TOMOYO Linux: pragmatic and manageable security for Linux
40 http://sourceforge.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf 40 http://osdn.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf
41 TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box 41 TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box
42 http://sourceforge.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf 42 http://osdn.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf
43 43
44What can TOMOYO do? 44What can TOMOYO do?
45 Deep inside TOMOYO Linux 45 Deep inside TOMOYO Linux
46 http://sourceforge.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf 46 http://osdn.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf
47 The role of "pathname based access control" in security. 47 The role of "pathname based access control" in security.
48 http://sourceforge.jp/projects/tomoyo/docs/lfj2008-bof.pdf 48 http://osdn.jp/projects/tomoyo/docs/lfj2008-bof.pdf
49 49
50History of TOMOYO? 50History of TOMOYO?
51 Realities of Mainlining 51 Realities of Mainlining
52 http://sourceforge.jp/projects/tomoyo/docs/lfj2008.pdf 52 http://osdn.jp/projects/tomoyo/docs/lfj2008.pdf
53 53
54What is future plan? 54What is future plan?
55==================== 55====================
@@ -60,6 +60,6 @@ multiple LSM modules at the same time. We feel sorry that you have to give up
60SELinux/SMACK/AppArmor etc. when you want to use TOMOYO. 60SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.
61 61
62We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM 62We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM
63version of TOMOYO, available at http://tomoyo.sourceforge.jp/1.7/ . 63version of TOMOYO, available at http://tomoyo.osdn.jp/1.8/ .
64LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning 64LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning
65to port non-LSM version's functionalities to LSM versions. 65to port non-LSM version's functionalities to LSM versions.
diff --git a/MAINTAINERS b/MAINTAINERS
index fbb269415f06..e57a4eaec077 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9298,15 +9298,6 @@ F: net/*/netfilter/
9298F: net/netfilter/ 9298F: net/netfilter/
9299F: net/bridge/br_netfilter*.c 9299F: net/bridge/br_netfilter*.c
9300 9300
9301NETLABEL
9302M: Paul Moore <paul@paul-moore.com>
9303W: http://netlabel.sf.net
9304L: netdev@vger.kernel.org
9305S: Maintained
9306F: Documentation/netlabel/
9307F: include/net/netlabel.h
9308F: net/netlabel/
9309
9310NETROM NETWORK LAYER 9301NETROM NETWORK LAYER
9311M: Ralf Baechle <ralf@linux-mips.org> 9302M: Ralf Baechle <ralf@linux-mips.org>
9312L: linux-hams@vger.kernel.org 9303L: linux-hams@vger.kernel.org
@@ -9434,10 +9425,23 @@ F: net/ipv6/
9434F: include/net/ip* 9425F: include/net/ip*
9435F: arch/x86/net/* 9426F: arch/x86/net/*
9436 9427
9437NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) 9428NETWORKING [LABELED] (NetLabel, Labeled IPsec, SECMARK)
9438M: Paul Moore <paul@paul-moore.com> 9429M: Paul Moore <paul@paul-moore.com>
9430W: https://github.com/netlabel
9439L: netdev@vger.kernel.org 9431L: netdev@vger.kernel.org
9432L: linux-security-module@vger.kernel.org
9440S: Maintained 9433S: Maintained
9434F: Documentation/netlabel/
9435F: include/net/calipso.h
9436F: include/net/cipso_ipv4.h
9437F: include/net/netlabel.h
9438F: include/uapi/linux/netfilter/xt_SECMARK.h
9439F: include/uapi/linux/netfilter/xt_CONNSECMARK.h
9440F: net/netlabel/
9441F: net/ipv4/cipso_ipv4.c
9442F: net/ipv6/calipso.c
9443F: net/netfilter/xt_CONNSECMARK.c
9444F: net/netfilter/xt_SECMARK.c
9441 9445
9442NETWORKING [TLS] 9446NETWORKING [TLS]
9443M: Ilya Lesokhin <ilyal@mellanox.com> 9447M: Ilya Lesokhin <ilyal@mellanox.com>
@@ -12023,8 +12027,9 @@ M: Paul Moore <paul@paul-moore.com>
12023M: Stephen Smalley <sds@tycho.nsa.gov> 12027M: Stephen Smalley <sds@tycho.nsa.gov>
12024M: Eric Paris <eparis@parisplace.org> 12028M: Eric Paris <eparis@parisplace.org>
12025L: selinux@tycho.nsa.gov (moderated for non-subscribers) 12029L: selinux@tycho.nsa.gov (moderated for non-subscribers)
12026W: http://selinuxproject.org 12030W: https://selinuxproject.org
12027T: git git://git.infradead.org/users/pcmoore/selinux 12031W: https://github.com/SELinuxProject
12032T: git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
12028S: Supported 12033S: Supported
12029F: include/linux/selinux* 12034F: include/linux/selinux*
12030F: security/selinux/ 12035F: security/selinux/
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h
index 22b5d4e687ce..d1c2901f1542 100644
--- a/include/linux/lsm_audit.h
+++ b/include/linux/lsm_audit.h
@@ -4,7 +4,7 @@
4 * 4 *
5 * Author : Etienne BASSET <etienne.basset@ensta.org> 5 * Author : Etienne BASSET <etienne.basset@ensta.org>
6 * 6 *
7 * All credits to : Stephen Smalley, <sds@epoch.ncsc.mil> 7 * All credits to : Stephen Smalley, <sds@tycho.nsa.gov>
8 * All BUGS to : Etienne BASSET <etienne.basset@ensta.org> 8 * All BUGS to : Etienne BASSET <etienne.basset@ensta.org>
9 */ 9 */
10#ifndef _LSM_COMMON_LOGGING_ 10#ifndef _LSM_COMMON_LOGGING_
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index d1c7bef25691..c9258124e417 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -528,11 +528,6 @@
528 * 528 *
529 * Security hooks for task operations. 529 * Security hooks for task operations.
530 * 530 *
531 * @task_create:
532 * Check permission before creating a child process. See the clone(2)
533 * manual page for definitions of the @clone_flags.
534 * @clone_flags contains the flags indicating what should be shared.
535 * Return 0 if permission is granted.
536 * @task_alloc: 531 * @task_alloc:
537 * @task task being allocated. 532 * @task task being allocated.
538 * @clone_flags contains the flags indicating what should be shared. 533 * @clone_flags contains the flags indicating what should be shared.
@@ -1505,7 +1500,6 @@ union security_list_options {
1505 int (*file_receive)(struct file *file); 1500 int (*file_receive)(struct file *file);
1506 int (*file_open)(struct file *file, const struct cred *cred); 1501 int (*file_open)(struct file *file, const struct cred *cred);
1507 1502
1508 int (*task_create)(unsigned long clone_flags);
1509 int (*task_alloc)(struct task_struct *task, unsigned long clone_flags); 1503 int (*task_alloc)(struct task_struct *task, unsigned long clone_flags);
1510 void (*task_free)(struct task_struct *task); 1504 void (*task_free)(struct task_struct *task);
1511 int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp); 1505 int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp);
@@ -1779,7 +1773,6 @@ struct security_hook_heads {
1779 struct list_head file_send_sigiotask; 1773 struct list_head file_send_sigiotask;
1780 struct list_head file_receive; 1774 struct list_head file_receive;
1781 struct list_head file_open; 1775 struct list_head file_open;
1782 struct list_head task_create;
1783 struct list_head task_alloc; 1776 struct list_head task_alloc;
1784 struct list_head task_free; 1777 struct list_head task_free;
1785 struct list_head cred_alloc_blank; 1778 struct list_head cred_alloc_blank;
diff --git a/include/linux/security.h b/include/linux/security.h
index 707b524874d8..ce6265960d6c 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -318,7 +318,6 @@ int security_file_send_sigiotask(struct task_struct *tsk,
318 struct fown_struct *fown, int sig); 318 struct fown_struct *fown, int sig);
319int security_file_receive(struct file *file); 319int security_file_receive(struct file *file);
320int security_file_open(struct file *file, const struct cred *cred); 320int security_file_open(struct file *file, const struct cred *cred);
321int security_task_create(unsigned long clone_flags);
322int security_task_alloc(struct task_struct *task, unsigned long clone_flags); 321int security_task_alloc(struct task_struct *task, unsigned long clone_flags);
323void security_task_free(struct task_struct *task); 322void security_task_free(struct task_struct *task);
324int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); 323int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
@@ -880,11 +879,6 @@ static inline int security_file_open(struct file *file,
880 return 0; 879 return 0;
881} 880}
882 881
883static inline int security_task_create(unsigned long clone_flags)
884{
885 return 0;
886}
887
888static inline int security_task_alloc(struct task_struct *task, 882static inline int security_task_alloc(struct task_struct *task,
889 unsigned long clone_flags) 883 unsigned long clone_flags)
890{ 884{
diff --git a/kernel/fork.c b/kernel/fork.c
index 6f1b0af00bda..10646182440f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1569,10 +1569,6 @@ static __latent_entropy struct task_struct *copy_process(
1569 return ERR_PTR(-EINVAL); 1569 return ERR_PTR(-EINVAL);
1570 } 1570 }
1571 1571
1572 retval = security_task_create(clone_flags);
1573 if (retval)
1574 goto fork_out;
1575
1576 retval = -ENOMEM; 1572 retval = -ENOMEM;
1577 p = dup_task_struct(current, node); 1573 p = dup_task_struct(current, node);
1578 if (!p) 1574 if (!p)
diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c
index 6a24569c3578..672b069dcfea 100644
--- a/scripts/selinux/genheaders/genheaders.c
+++ b/scripts/selinux/genheaders/genheaders.c
@@ -129,11 +129,16 @@ int main(int argc, char *argv[])
129 for (i = 0; secclass_map[i].name; i++) { 129 for (i = 0; secclass_map[i].name; i++) {
130 struct security_class_mapping *map = &secclass_map[i]; 130 struct security_class_mapping *map = &secclass_map[i];
131 for (j = 0; map->perms[j]; j++) { 131 for (j = 0; map->perms[j]; j++) {
132 if (j >= 32) {
133 fprintf(stderr, "Too many permissions to fit into an access vector at (%s, %s).\n",
134 map->name, map->perms[j]);
135 exit(5);
136 }
132 fprintf(fout, "#define %s__%s", map->name, 137 fprintf(fout, "#define %s__%s", map->name,
133 map->perms[j]); 138 map->perms[j]);
134 for (k = 0; k < max(1, 40 - strlen(map->name) - strlen(map->perms[j])); k++) 139 for (k = 0; k < max(1, 40 - strlen(map->name) - strlen(map->perms[j])); k++)
135 fprintf(fout, " "); 140 fprintf(fout, " ");
136 fprintf(fout, "0x%08xUL\n", (1<<j)); 141 fprintf(fout, "0x%08xU\n", (1<<j));
137 } 142 }
138 } 143 }
139 144
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 28d4c3a528ab..67703dbe29ea 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -2,7 +2,7 @@
2 * common LSM auditing functions 2 * common LSM auditing functions
3 * 3 *
4 * Based on code written for SELinux by : 4 * Based on code written for SELinux by :
5 * Stephen Smalley, <sds@epoch.ncsc.mil> 5 * Stephen Smalley, <sds@tycho.nsa.gov>
6 * James Morris <jmorris@redhat.com> 6 * James Morris <jmorris@redhat.com>
7 * Author : Etienne Basset, <etienne.basset@ensta.org> 7 * Author : Etienne Basset, <etienne.basset@ensta.org>
8 * 8 *
diff --git a/security/security.c b/security/security.c
index afc34f46c6c5..4bf0f571b4ef 100644
--- a/security/security.c
+++ b/security/security.c
@@ -974,11 +974,6 @@ int security_file_open(struct file *file, const struct cred *cred)
974 return fsnotify_perm(file, MAY_OPEN); 974 return fsnotify_perm(file, MAY_OPEN);
975} 975}
976 976
977int security_task_create(unsigned long clone_flags)
978{
979 return call_int_hook(task_create, 0, clone_flags);
980}
981
982int security_task_alloc(struct task_struct *task, unsigned long clone_flags) 977int security_task_alloc(struct task_struct *task, unsigned long clone_flags)
983{ 978{
984 return call_int_hook(task_alloc, 0, task, clone_flags); 979 return call_int_hook(task_alloc, 0, task, clone_flags);
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index 4b4293194aee..2380b8d72cec 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the kernel access vector cache (AVC). 2 * Implementation of the kernel access vector cache (AVC).
3 * 3 *
4 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Authors: Stephen Smalley, <sds@tycho.nsa.gov>
5 * James Morris <jmorris@redhat.com> 5 * James Morris <jmorris@redhat.com>
6 * 6 *
7 * Update: KaiGai, Kohei <kaigai@ak.jp.nec.com> 7 * Update: KaiGai, Kohei <kaigai@ak.jp.nec.com>
@@ -346,27 +346,26 @@ static struct avc_xperms_decision_node
346 struct avc_xperms_decision_node *xpd_node; 346 struct avc_xperms_decision_node *xpd_node;
347 struct extended_perms_decision *xpd; 347 struct extended_perms_decision *xpd;
348 348
349 xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, 349 xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, GFP_NOWAIT);
350 GFP_ATOMIC | __GFP_NOMEMALLOC);
351 if (!xpd_node) 350 if (!xpd_node)
352 return NULL; 351 return NULL;
353 352
354 xpd = &xpd_node->xpd; 353 xpd = &xpd_node->xpd;
355 if (which & XPERMS_ALLOWED) { 354 if (which & XPERMS_ALLOWED) {
356 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, 355 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep,
357 GFP_ATOMIC | __GFP_NOMEMALLOC); 356 GFP_NOWAIT);
358 if (!xpd->allowed) 357 if (!xpd->allowed)
359 goto error; 358 goto error;
360 } 359 }
361 if (which & XPERMS_AUDITALLOW) { 360 if (which & XPERMS_AUDITALLOW) {
362 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, 361 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep,
363 GFP_ATOMIC | __GFP_NOMEMALLOC); 362 GFP_NOWAIT);
364 if (!xpd->auditallow) 363 if (!xpd->auditallow)
365 goto error; 364 goto error;
366 } 365 }
367 if (which & XPERMS_DONTAUDIT) { 366 if (which & XPERMS_DONTAUDIT) {
368 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, 367 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep,
369 GFP_ATOMIC | __GFP_NOMEMALLOC); 368 GFP_NOWAIT);
370 if (!xpd->dontaudit) 369 if (!xpd->dontaudit)
371 goto error; 370 goto error;
372 } 371 }
@@ -394,8 +393,7 @@ static struct avc_xperms_node *avc_xperms_alloc(void)
394{ 393{
395 struct avc_xperms_node *xp_node; 394 struct avc_xperms_node *xp_node;
396 395
397 xp_node = kmem_cache_zalloc(avc_xperms_cachep, 396 xp_node = kmem_cache_zalloc(avc_xperms_cachep, GFP_NOWAIT);
398 GFP_ATOMIC|__GFP_NOMEMALLOC);
399 if (!xp_node) 397 if (!xp_node)
400 return xp_node; 398 return xp_node;
401 INIT_LIST_HEAD(&xp_node->xpd_head); 399 INIT_LIST_HEAD(&xp_node->xpd_head);
@@ -548,7 +546,7 @@ static struct avc_node *avc_alloc_node(void)
548{ 546{
549 struct avc_node *node; 547 struct avc_node *node;
550 548
551 node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC|__GFP_NOMEMALLOC); 549 node = kmem_cache_zalloc(avc_node_cachep, GFP_NOWAIT);
552 if (!node) 550 if (!node)
553 goto out; 551 goto out;
554 552
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index ad3b0f53ede0..f5d304736852 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * This file contains the SELinux hook function implementations. 4 * This file contains the SELinux hook function implementations.
5 * 5 *
6 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 6 * Authors: Stephen Smalley, <sds@tycho.nsa.gov>
7 * Chris Vance, <cvance@nai.com> 7 * Chris Vance, <cvance@nai.com>
8 * Wayne Salamon, <wsalamon@nai.com> 8 * Wayne Salamon, <wsalamon@nai.com>
9 * James Morris <jmorris@redhat.com> 9 * James Morris <jmorris@redhat.com>
@@ -815,7 +815,9 @@ static int selinux_set_mnt_opts(struct super_block *sb,
815 if (!strcmp(sb->s_type->name, "debugfs") || 815 if (!strcmp(sb->s_type->name, "debugfs") ||
816 !strcmp(sb->s_type->name, "tracefs") || 816 !strcmp(sb->s_type->name, "tracefs") ||
817 !strcmp(sb->s_type->name, "sysfs") || 817 !strcmp(sb->s_type->name, "sysfs") ||
818 !strcmp(sb->s_type->name, "pstore")) 818 !strcmp(sb->s_type->name, "pstore") ||
819 !strcmp(sb->s_type->name, "cgroup") ||
820 !strcmp(sb->s_type->name, "cgroup2"))
819 sbsec->flags |= SE_SBGENFS; 821 sbsec->flags |= SE_SBGENFS;
820 822
821 if (!sbsec->behavior) { 823 if (!sbsec->behavior) {
@@ -1303,6 +1305,7 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
1303 case SOCK_SEQPACKET: 1305 case SOCK_SEQPACKET:
1304 return SECCLASS_UNIX_STREAM_SOCKET; 1306 return SECCLASS_UNIX_STREAM_SOCKET;
1305 case SOCK_DGRAM: 1307 case SOCK_DGRAM:
1308 case SOCK_RAW:
1306 return SECCLASS_UNIX_DGRAM_SOCKET; 1309 return SECCLASS_UNIX_DGRAM_SOCKET;
1307 } 1310 }
1308 break; 1311 break;
@@ -2317,6 +2320,7 @@ static int check_nnp_nosuid(const struct linux_binprm *bprm,
2317 int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); 2320 int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS);
2318 int nosuid = !mnt_may_suid(bprm->file->f_path.mnt); 2321 int nosuid = !mnt_may_suid(bprm->file->f_path.mnt);
2319 int rc; 2322 int rc;
2323 u32 av;
2320 2324
2321 if (!nnp && !nosuid) 2325 if (!nnp && !nosuid)
2322 return 0; /* neither NNP nor nosuid */ 2326 return 0; /* neither NNP nor nosuid */
@@ -2325,24 +2329,40 @@ static int check_nnp_nosuid(const struct linux_binprm *bprm,
2325 return 0; /* No change in credentials */ 2329 return 0; /* No change in credentials */
2326 2330
2327 /* 2331 /*
2328 * The only transitions we permit under NNP or nosuid 2332 * If the policy enables the nnp_nosuid_transition policy capability,
2329 * are transitions to bounded SIDs, i.e. SIDs that are 2333 * then we permit transitions under NNP or nosuid if the
2330 * guaranteed to only be allowed a subset of the permissions 2334 * policy allows the corresponding permission between
2331 * of the current SID. 2335 * the old and new contexts.
2332 */ 2336 */
2333 rc = security_bounded_transition(old_tsec->sid, new_tsec->sid); 2337 if (selinux_policycap_nnp_nosuid_transition) {
2334 if (rc) { 2338 av = 0;
2335 /*
2336 * On failure, preserve the errno values for NNP vs nosuid.
2337 * NNP: Operation not permitted for caller.
2338 * nosuid: Permission denied to file.
2339 */
2340 if (nnp) 2339 if (nnp)
2341 return -EPERM; 2340 av |= PROCESS2__NNP_TRANSITION;
2342 else 2341 if (nosuid)
2343 return -EACCES; 2342 av |= PROCESS2__NOSUID_TRANSITION;
2343 rc = avc_has_perm(old_tsec->sid, new_tsec->sid,
2344 SECCLASS_PROCESS2, av, NULL);
2345 if (!rc)
2346 return 0;
2344 } 2347 }
2345 return 0; 2348
2349 /*
2350 * We also permit NNP or nosuid transitions to bounded SIDs,
2351 * i.e. SIDs that are guaranteed to only be allowed a subset
2352 * of the permissions of the current SID.
2353 */
2354 rc = security_bounded_transition(old_tsec->sid, new_tsec->sid);
2355 if (!rc)
2356 return 0;
2357
2358 /*
2359 * On failure, preserve the errno values for NNP vs nosuid.
2360 * NNP: Operation not permitted for caller.
2361 * nosuid: Permission denied to file.
2362 */
2363 if (nnp)
2364 return -EPERM;
2365 return -EACCES;
2346} 2366}
2347 2367
2348static int selinux_bprm_set_creds(struct linux_binprm *bprm) 2368static int selinux_bprm_set_creds(struct linux_binprm *bprm)
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h
index 0999df03af8b..a5004e9de11a 100644
--- a/security/selinux/include/avc.h
+++ b/security/selinux/include/avc.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Access vector cache interface for object managers. 2 * Access vector cache interface for object managers.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6#ifndef _SELINUX_AVC_H_ 6#ifndef _SELINUX_AVC_H_
7#define _SELINUX_AVC_H_ 7#define _SELINUX_AVC_H_
diff --git a/security/selinux/include/avc_ss.h b/security/selinux/include/avc_ss.h
index d5c328452df0..37d57dadd476 100644
--- a/security/selinux/include/avc_ss.h
+++ b/security/selinux/include/avc_ss.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Access vector cache interface for the security server. 2 * Access vector cache interface for the security server.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6#ifndef _SELINUX_AVC_SS_H_ 6#ifndef _SELINUX_AVC_SS_H_
7#define _SELINUX_AVC_SS_H_ 7#define _SELINUX_AVC_SS_H_
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
index b9fe3434b036..35ffb29a69cb 100644
--- a/security/selinux/include/classmap.h
+++ b/security/selinux/include/classmap.h
@@ -48,6 +48,8 @@ struct security_class_mapping secclass_map[] = {
48 "setrlimit", "rlimitinh", "dyntransition", "setcurrent", 48 "setrlimit", "rlimitinh", "dyntransition", "setcurrent",
49 "execmem", "execstack", "execheap", "setkeycreate", 49 "execmem", "execstack", "execheap", "setkeycreate",
50 "setsockcreate", "getrlimit", NULL } }, 50 "setsockcreate", "getrlimit", NULL } },
51 { "process2",
52 { "nnp_transition", "nosuid_transition", NULL } },
51 { "system", 53 { "system",
52 { "ipc_info", "syslog_read", "syslog_mod", 54 { "ipc_info", "syslog_read", "syslog_mod",
53 "syslog_console", "module_request", "module_load", NULL } }, 55 "syslog_console", "module_request", "module_load", NULL } },
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h
index 6ebc61e370ff..1649cd18eb0b 100644
--- a/security/selinux/include/objsec.h
+++ b/security/selinux/include/objsec.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * This file contains the SELinux security data structures for kernel objects. 4 * This file contains the SELinux security data structures for kernel objects.
5 * 5 *
6 * Author(s): Stephen Smalley, <sds@epoch.ncsc.mil> 6 * Author(s): Stephen Smalley, <sds@tycho.nsa.gov>
7 * Chris Vance, <cvance@nai.com> 7 * Chris Vance, <cvance@nai.com>
8 * Wayne Salamon, <wsalamon@nai.com> 8 * Wayne Salamon, <wsalamon@nai.com>
9 * James Morris <jmorris@redhat.com> 9 * James Morris <jmorris@redhat.com>
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
index e91f08c16c0b..28dfb2f93e4d 100644
--- a/security/selinux/include/security.h
+++ b/security/selinux/include/security.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Security server interface. 2 * Security server interface.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 * 5 *
6 */ 6 */
7 7
@@ -73,6 +73,7 @@ enum {
73 POLICYDB_CAPABILITY_EXTSOCKCLASS, 73 POLICYDB_CAPABILITY_EXTSOCKCLASS,
74 POLICYDB_CAPABILITY_ALWAYSNETWORK, 74 POLICYDB_CAPABILITY_ALWAYSNETWORK,
75 POLICYDB_CAPABILITY_CGROUPSECLABEL, 75 POLICYDB_CAPABILITY_CGROUPSECLABEL,
76 POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION,
76 __POLICYDB_CAPABILITY_MAX 77 __POLICYDB_CAPABILITY_MAX
77}; 78};
78#define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1) 79#define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1)
@@ -84,6 +85,7 @@ extern int selinux_policycap_openperm;
84extern int selinux_policycap_extsockclass; 85extern int selinux_policycap_extsockclass;
85extern int selinux_policycap_alwaysnetwork; 86extern int selinux_policycap_alwaysnetwork;
86extern int selinux_policycap_cgroupseclabel; 87extern int selinux_policycap_cgroupseclabel;
88extern int selinux_policycap_nnp_nosuid_transition;
87 89
88/* 90/*
89 * type_datum properties 91 * type_datum properties
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index 3628d3a868b6..2c3c7d010d8a 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the access vector table type. 2 * Implementation of the access vector table type.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6 6
7/* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> 7/* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com>
diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h
index d946c9dc3c9c..725853cadc42 100644
--- a/security/selinux/ss/avtab.h
+++ b/security/selinux/ss/avtab.h
@@ -5,7 +5,7 @@
5 * table is used to represent the type enforcement 5 * table is used to represent the type enforcement
6 * tables. 6 * tables.
7 * 7 *
8 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 8 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
9 */ 9 */
10 10
11/* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> 11/* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com>
diff --git a/security/selinux/ss/constraint.h b/security/selinux/ss/constraint.h
index 96fd947c494b..33ae2aec4f36 100644
--- a/security/selinux/ss/constraint.h
+++ b/security/selinux/ss/constraint.h
@@ -10,7 +10,7 @@
10 * process from labeling an object with a different user 10 * process from labeling an object with a different user
11 * identity. 11 * identity.
12 * 12 *
13 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 13 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
14 */ 14 */
15#ifndef _SS_CONSTRAINT_H_ 15#ifndef _SS_CONSTRAINT_H_
16#define _SS_CONSTRAINT_H_ 16#define _SS_CONSTRAINT_H_
diff --git a/security/selinux/ss/context.h b/security/selinux/ss/context.h
index 212e3479a0d9..a2c0f37c42ae 100644
--- a/security/selinux/ss/context.h
+++ b/security/selinux/ss/context.h
@@ -10,7 +10,7 @@
10 * security server and can be changed without affecting 10 * security server and can be changed without affecting
11 * clients of the security server. 11 * clients of the security server.
12 * 12 *
13 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 13 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
14 */ 14 */
15#ifndef _SS_CONTEXT_H_ 15#ifndef _SS_CONTEXT_H_
16#define _SS_CONTEXT_H_ 16#define _SS_CONTEXT_H_
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
index ad38299164c3..fc28149a4f2e 100644
--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the extensible bitmap type. 2 * Implementation of the extensible bitmap type.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6/* 6/*
7 * Updated: Hewlett-Packard <paul@paul-moore.com> 7 * Updated: Hewlett-Packard <paul@paul-moore.com>
diff --git a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h
index 6d5a9ac4251f..da1325dda550 100644
--- a/security/selinux/ss/ebitmap.h
+++ b/security/selinux/ss/ebitmap.h
@@ -9,7 +9,7 @@
9 * an explicitly specified starting bit position within 9 * an explicitly specified starting bit position within
10 * the total bitmap. 10 * the total bitmap.
11 * 11 *
12 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 12 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
13 */ 13 */
14#ifndef _SS_EBITMAP_H_ 14#ifndef _SS_EBITMAP_H_
15#define _SS_EBITMAP_H_ 15#define _SS_EBITMAP_H_
diff --git a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c
index 3858706a29fb..686c3917064c 100644
--- a/security/selinux/ss/hashtab.c
+++ b/security/selinux/ss/hashtab.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the hash table type. 2 * Implementation of the hash table type.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/slab.h> 7#include <linux/slab.h>
diff --git a/security/selinux/ss/hashtab.h b/security/selinux/ss/hashtab.h
index 953872cd84ab..009fb5e06172 100644
--- a/security/selinux/ss/hashtab.h
+++ b/security/selinux/ss/hashtab.h
@@ -5,7 +5,7 @@
5 * functions for hash computation and key comparison are 5 * functions for hash computation and key comparison are
6 * provided by the creator of the table. 6 * provided by the creator of the table.
7 * 7 *
8 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 8 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
9 */ 9 */
10#ifndef _SS_HASHTAB_H_ 10#ifndef _SS_HASHTAB_H_
11#define _SS_HASHTAB_H_ 11#define _SS_HASHTAB_H_
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
index e1088842232c..d9dc34f4fade 100644
--- a/security/selinux/ss/mls.c
+++ b/security/selinux/ss/mls.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the multi-level security (MLS) policy. 2 * Implementation of the multi-level security (MLS) policy.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6/* 6/*
7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> 7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
diff --git a/security/selinux/ss/mls.h b/security/selinux/ss/mls.h
index e4369e3e6366..0f0a1d65b2ce 100644
--- a/security/selinux/ss/mls.h
+++ b/security/selinux/ss/mls.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Multi-level security (MLS) policy operations. 2 * Multi-level security (MLS) policy operations.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6/* 6/*
7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> 7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
diff --git a/security/selinux/ss/mls_types.h b/security/selinux/ss/mls_types.h
index e93648774137..47f3702cd596 100644
--- a/security/selinux/ss/mls_types.h
+++ b/security/selinux/ss/mls_types.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Type definitions for the multi-level security (MLS) policy. 2 * Type definitions for the multi-level security (MLS) policy.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6/* 6/*
7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> 7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index aa6500abb178..6e8c8056d7ad 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the policy database. 2 * Implementation of the policy database.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6 6
7/* 7/*
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h
index 5d23eed35fa7..215f8f30ac5a 100644
--- a/security/selinux/ss/policydb.h
+++ b/security/selinux/ss/policydb.h
@@ -2,7 +2,7 @@
2 * A policy database (policydb) specifies the 2 * A policy database (policydb) specifies the
3 * configuration data for the security policy. 3 * configuration data for the security policy.
4 * 4 *
5 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 5 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
6 */ 6 */
7 7
8/* 8/*
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 2f02fa67ec2e..e4a1c0dc561a 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the security services. 2 * Implementation of the security services.
3 * 3 *
4 * Authors : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Authors : Stephen Smalley, <sds@tycho.nsa.gov>
5 * James Morris <jmorris@redhat.com> 5 * James Morris <jmorris@redhat.com>
6 * 6 *
7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> 7 * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
@@ -76,7 +76,8 @@ char *selinux_policycap_names[__POLICYDB_CAPABILITY_MAX] = {
76 "open_perms", 76 "open_perms",
77 "extended_socket_class", 77 "extended_socket_class",
78 "always_check_network", 78 "always_check_network",
79 "cgroup_seclabel" 79 "cgroup_seclabel",
80 "nnp_nosuid_transition"
80}; 81};
81 82
82int selinux_policycap_netpeer; 83int selinux_policycap_netpeer;
@@ -84,6 +85,7 @@ int selinux_policycap_openperm;
84int selinux_policycap_extsockclass; 85int selinux_policycap_extsockclass;
85int selinux_policycap_alwaysnetwork; 86int selinux_policycap_alwaysnetwork;
86int selinux_policycap_cgroupseclabel; 87int selinux_policycap_cgroupseclabel;
88int selinux_policycap_nnp_nosuid_transition;
87 89
88static DEFINE_RWLOCK(policy_rwlock); 90static DEFINE_RWLOCK(policy_rwlock);
89 91
@@ -2009,6 +2011,9 @@ static void security_load_policycaps(void)
2009 selinux_policycap_cgroupseclabel = 2011 selinux_policycap_cgroupseclabel =
2010 ebitmap_get_bit(&policydb.policycaps, 2012 ebitmap_get_bit(&policydb.policycaps,
2011 POLICYDB_CAPABILITY_CGROUPSECLABEL); 2013 POLICYDB_CAPABILITY_CGROUPSECLABEL);
2014 selinux_policycap_nnp_nosuid_transition =
2015 ebitmap_get_bit(&policydb.policycaps,
2016 POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION);
2012 2017
2013 for (i = 0; i < ARRAY_SIZE(selinux_policycap_names); i++) 2018 for (i = 0; i < ARRAY_SIZE(selinux_policycap_names); i++)
2014 pr_info("SELinux: policy capability %s=%d\n", 2019 pr_info("SELinux: policy capability %s=%d\n",
diff --git a/security/selinux/ss/services.h b/security/selinux/ss/services.h
index 6abcd8729ec3..3d9fa9556b4f 100644
--- a/security/selinux/ss/services.h
+++ b/security/selinux/ss/services.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the security services. 2 * Implementation of the security services.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6#ifndef _SS_SERVICES_H_ 6#ifndef _SS_SERVICES_H_
7#define _SS_SERVICES_H_ 7#define _SS_SERVICES_H_
diff --git a/security/selinux/ss/sidtab.c b/security/selinux/ss/sidtab.c
index c5f436b15d19..6ae08efc5ae7 100644
--- a/security/selinux/ss/sidtab.c
+++ b/security/selinux/ss/sidtab.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the SID table type. 2 * Implementation of the SID table type.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/slab.h> 7#include <linux/slab.h>
diff --git a/security/selinux/ss/sidtab.h b/security/selinux/ss/sidtab.h
index 84dc154d9389..de5d0ea583d2 100644
--- a/security/selinux/ss/sidtab.h
+++ b/security/selinux/ss/sidtab.h
@@ -2,7 +2,7 @@
2 * A security identifier table (sidtab) is a hash table 2 * A security identifier table (sidtab) is a hash table
3 * of security context structures indexed by SID value. 3 * of security context structures indexed by SID value.
4 * 4 *
5 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 5 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
6 */ 6 */
7#ifndef _SS_SIDTAB_H_ 7#ifndef _SS_SIDTAB_H_
8#define _SS_SIDTAB_H_ 8#define _SS_SIDTAB_H_
diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c
index 160326ee99e5..d1a6745849a7 100644
--- a/security/selinux/ss/symtab.c
+++ b/security/selinux/ss/symtab.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the symbol table type. 2 * Implementation of the symbol table type.
3 * 3 *
4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
5 */ 5 */
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/string.h> 7#include <linux/string.h>
diff --git a/security/selinux/ss/symtab.h b/security/selinux/ss/symtab.h
index ca422b42fbc0..0bc12d587d3a 100644
--- a/security/selinux/ss/symtab.h
+++ b/security/selinux/ss/symtab.h
@@ -4,7 +4,7 @@
4 * is arbitrary. The symbol table type is implemented 4 * is arbitrary. The symbol table type is implemented
5 * using the hash table type (hashtab). 5 * using the hash table type (hashtab).
6 * 6 *
7 * Author : Stephen Smalley, <sds@epoch.ncsc.mil> 7 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
8 */ 8 */
9#ifndef _SS_SYMTAB_H_ 9#ifndef _SS_SYMTAB_H_
10#define _SS_SYMTAB_H_ 10#define _SS_SYMTAB_H_