Skip to contentSkip to conversation

Security: Rename SELinux to NSALinux

PATCH In review Pali Rohár 3 participants 4 messages Apr 1, 2016

Subsystems (38)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Security: Rename SELinux to NSALinux

This patch helps NSA agents, so they will know easily which part of Linux kernel code and also which config options must be enabled for their "customer" kernel builds.

Patch also protects people aware of NSA activities, so they will know which part of kernel code comes from NSA and which should they disable or drop.

---
 CREDITS                                            |    2 +-
 Documentation/ABI/testing/ima_policy               |    4 +-
 Documentation/CodingStyle                          |    2 +-
 Documentation/DocBook/lsm.tmpl                     |    6 +-
 Documentation/RCU/RTFP.txt                         |    8 +-
 Documentation/cgroup-v1/cgroups.txt                |    2 +-
 Documentation/filesystems/caching/backend-api.txt  |    2 +-
 Documentation/filesystems/caching/cachefiles.txt   |   16 +-
 Documentation/filesystems/cifs/TODO                |    2 +-
 Documentation/filesystems/orangefs.txt             |    2 +-
 Documentation/filesystems/proc.txt                 |    2 +-
 Documentation/kernel-parameters.txt                |   20 +-
 Documentation/networking/secid.txt                 |    2 +-
 Documentation/security/00-INDEX                    |    4 +-
 Documentation/security/LSM.txt                     |    2 +-
 .../security/{SELinux.txt => NSALinux.txt}         |   18 +-
 Documentation/security/credentials.txt             |    4 +-
 Documentation/security/keys.txt                    |   12 +-
 Documentation/security/tomoyo.txt                  |    2 +-
 Documentation/zh_CN/CodingStyle                    |    2 +-
 MAINTAINERS                                        |    8 +-
 arch/mips/configs/bigsur_defconfig                 |    6 +-
 arch/mips/configs/loongson3_defconfig              |    6 +-
 arch/mips/configs/nlm_xlp_defconfig                |    8 +-
 arch/mips/configs/nlm_xlr_defconfig                |    8 +-
 arch/powerpc/configs/c2k_defconfig                 |    6 +-
 arch/powerpc/configs/ppc6xx_defconfig              |    6 +-
 arch/s390/configs/default_defconfig                |    8 +-
 arch/s390/configs/gcov_defconfig                   |    8 +-
 arch/s390/configs/performance_defconfig            |    8 +-
 arch/tile/configs/tilegx_defconfig                 |    6 +-
 arch/tile/configs/tilepro_defconfig                |    6 +-
 arch/x86/configs/i386_defconfig                    |    6 +-
 arch/x86/configs/x86_64_defconfig                  |    6 +-
 arch/xtensa/configs/iss_defconfig                  |    2 +-
 drivers/staging/lustre/lustre/llite/xattr.c        |   14 +-
 fs/9p/Kconfig                                      |    2 +-
 fs/btrfs/inode.c                                   |    8 +-
 fs/btrfs/super.c                                   |    2 +-
 fs/ext2/Kconfig                                    |    2 +-
 fs/ext4/Kconfig                                    |    2 +-
 fs/ext4/namei.c                                    |    2 +-
 fs/f2fs/Kconfig                                    |    2 +-
 fs/gfs2/inode.c                                    |    2 +-
 fs/jffs2/Kconfig                                   |    2 +-
 fs/jfs/Kconfig                                     |    2 +-
 fs/nfs/super.c                                     |    8 +-
 fs/nfsd/Kconfig                                    |    4 +-
 fs/reiserfs/Kconfig                                |    2 +-
 fs/reiserfs/xattr_security.c                       |    2 +-
 fs/xfs/xfs_iops.c                                  |    2 +-
 include/linux/cred.h                               |    2 +-
 include/linux/lsm_audit.h                          |    6 +-
 include/linux/lsm_hooks.h                          |    8 +-
 include/linux/{selinux.h => nsalinux.h}            |   20 +-
 include/net/netlabel.h                             |    2 +-
 include/uapi/linux/Kbuild                          |    2 +-
 include/uapi/linux/audit.h                         |    2 +-
 include/uapi/linux/magic.h                         |    2 +-
 include/uapi/linux/netfilter/xt_SECMARK.h          |    2 +-
 include/uapi/linux/netfilter_ipv4.h                |    4 +-
 include/uapi/linux/netfilter_ipv6.h                |    4 +-
 include/uapi/linux/netlink.h                       |    2 +-
 .../{selinux_netlink.h => nsalinux_netlink.h}      |   10 +-
 include/uapi/linux/pfkeyv2.h                       |    2 +-
 include/uapi/linux/prctl.h                         |    2 +-
 include/uapi/linux/xattr.h                         |    4 +-
 include/uapi/linux/xfrm.h                          |    4 +-
 init/Kconfig                                       |    2 +-
 kernel/audit.c                                     |    6 +-
 kernel/audit.h                                     |    2 +-
 kernel/cred.c                                      |    4 +-
 lib/Kconfig.debug                                  |    2 +-
 lib/is_single_threaded.c                           |    2 +-
 mm/shmem.c                                         |    2 +-
 net/netlabel/netlabel_domainhash.c                 |    2 +-
 scripts/Makefile                                   |    2 +-
 scripts/{selinux => nsalinux}/Makefile             |    0
 scripts/nsalinux/README                            |    2 +
 .../{selinux => nsalinux}/genheaders/.gitignore    |    0
 scripts/{selinux => nsalinux}/genheaders/Makefile  |    2 +-
 .../{selinux => nsalinux}/genheaders/genheaders.c  |    4 +-
 scripts/{selinux => nsalinux}/install_policy.sh    |   42 +-
 scripts/{selinux => nsalinux}/mdp/.gitignore       |    0
 scripts/{selinux => nsalinux}/mdp/Makefile         |    2 +-
 scripts/{selinux => nsalinux}/mdp/dbus_contexts    |    4 +-
 scripts/{selinux => nsalinux}/mdp/mdp.c            |    0
 scripts/selinux/README                             |    2 -
 security/Kconfig                                   |   14 +-
 security/Makefile                                  |    4 +-
 security/integrity/evm/Kconfig                     |    2 +-
 security/integrity/evm/evm_main.c                  |    4 +-
 security/integrity/ima/Kconfig                     |    2 +-
 security/integrity/ima/ima_policy.c                |    4 +-
 security/lsm_audit.c                               |    2 +-
 security/{selinux => nsalinux}/.gitignore          |    0
 security/{selinux => nsalinux}/Kconfig             |  108 +-
 security/{selinux => nsalinux}/Makefile            |   16 +-
 security/{selinux => nsalinux}/avc.c               |   34 +-
 security/{selinux => nsalinux}/exports.c           |   10 +-
 security/{selinux => nsalinux}/hooks.c             | 1222 ++++++++++----------
 security/{selinux => nsalinux}/include/audit.h     |   30 +-
 security/{selinux => nsalinux}/include/avc.h       |   18 +-
 security/{selinux => nsalinux}/include/avc_ss.h    |    6 +-
 security/{selinux => nsalinux}/include/classmap.h  |    2 +-
 .../{selinux => nsalinux}/include/conditional.h    |    6 +-
 .../include/initial_sid_to_string.h                |    0
 security/{selinux => nsalinux}/include/netif.h     |    6 +-
 security/{selinux => nsalinux}/include/netlabel.h  |   56 +-
 security/{selinux => nsalinux}/include/netnode.h   |    6 +-
 security/{selinux => nsalinux}/include/netport.h   |    6 +-
 security/{selinux => nsalinux}/include/objsec.h    |   12 +-
 security/{selinux => nsalinux}/include/security.h  |   40 +-
 security/{selinux => nsalinux}/include/xfrm.h      |   56 +-
 security/{selinux => nsalinux}/netif.c             |    6 +-
 security/{selinux => nsalinux}/netlabel.c          |   78 +-
 security/{selinux => nsalinux}/netlink.c           |   10 +-
 security/{selinux => nsalinux}/netnode.c           |    8 +-
 security/{selinux => nsalinux}/netport.c           |    8 +-
 security/{selinux => nsalinux}/nlmsgtab.c          |    2 +-
 .../{selinux/selinuxfs.c => nsalinux/nsalinuxfs.c} |   90 +-
 security/{selinux => nsalinux}/ss/avtab.c          |   50 +-
 security/{selinux => nsalinux}/ss/avtab.h          |    0
 security/{selinux => nsalinux}/ss/conditional.c    |   16 +-
 security/{selinux => nsalinux}/ss/conditional.h    |    0
 security/{selinux => nsalinux}/ss/constraint.h     |    0
 security/{selinux => nsalinux}/ss/context.h        |    0
 security/{selinux => nsalinux}/ss/ebitmap.c        |   18 +-
 security/{selinux => nsalinux}/ss/ebitmap.h        |    0
 security/{selinux => nsalinux}/ss/hashtab.c        |    0
 security/{selinux => nsalinux}/ss/hashtab.h        |    0
 security/{selinux => nsalinux}/ss/mls.c            |    2 +-
 security/{selinux => nsalinux}/ss/mls.h            |    0
 security/{selinux => nsalinux}/ss/mls_types.h      |    0
 security/{selinux => nsalinux}/ss/policydb.c       |   76 +-
 security/{selinux => nsalinux}/ss/policydb.h       |    2 +-
 security/{selinux => nsalinux}/ss/services.c       |  180 +--
 security/{selinux => nsalinux}/ss/services.h       |    0
 security/{selinux => nsalinux}/ss/sidtab.c         |    2 +-
 security/{selinux => nsalinux}/ss/sidtab.h         |    0
 security/{selinux => nsalinux}/ss/status.c         |   66 +-
 security/{selinux => nsalinux}/ss/symtab.c         |    0
 security/{selinux => nsalinux}/ss/symtab.h         |    0
 security/{selinux => nsalinux}/xfrm.c              |  108 +-
 security/security.c                                |    6 +-
 security/smack/smack_lsm.c                         |    6 +-
 security/smack/smack_netfilter.c                   |    4 +-
 security/smack/smackfs.c                           |    2 +-
 .../testing/selftests/rcutorture/bin/functions.sh  |    2 +-
 tools/usb/usbip/README                             |    2 +-
 150 files changed, 1420 insertions(+), 1420 deletions(-)
 rename Documentation/security/{SELinux.txt => NSALinux.txt} (58%)
 rename include/linux/{selinux.h => nsalinux.h} (60%)
 rename include/uapi/linux/{selinux_netlink.h => nsalinux_netlink.h} (84%)
 rename scripts/{selinux => nsalinux}/Makefile (100%)
 create mode 100644 scripts/nsalinux/README
 rename scripts/{selinux => nsalinux}/genheaders/.gitignore (100%)
 rename scripts/{selinux => nsalinux}/genheaders/Makefile (52%)
 rename scripts/{selinux => nsalinux}/genheaders/genheaders.c (95%)
 rename scripts/{selinux => nsalinux}/install_policy.sh (45%)
 rename scripts/{selinux => nsalinux}/mdp/.gitignore (100%)
 rename scripts/{selinux => nsalinux}/mdp/Makefile (63%)
 rename scripts/{selinux => nsalinux}/mdp/dbus_contexts (86%)
 rename scripts/{selinux => nsalinux}/mdp/mdp.c (100%)
 delete mode 100644 scripts/selinux/README
 rename security/{selinux => nsalinux}/.gitignore (100%)
 rename security/{selinux => nsalinux}/Kconfig (47%)
 rename security/{selinux => nsalinux}/Makefile (41%)
 rename security/{selinux => nsalinux}/avc.c (97%)
 rename security/{selinux => nsalinux}/exports.c (74%)
 rename security/{selinux => nsalinux}/hooks.c (78%)
 rename security/{selinux => nsalinux}/include/audit.h (62%)
 rename security/{selinux => nsalinux}/include/avc.h (94%)
 rename security/{selinux => nsalinux}/include/avc_ss.h (84%)
 rename security/{selinux => nsalinux}/include/classmap.h (99%)
 rename security/{selinux => nsalinux}/include/conditional.h (85%)
 rename security/{selinux => nsalinux}/include/initial_sid_to_string.h (100%)
 rename security/{selinux => nsalinux}/include/netif.h (89%)
 rename security/{selinux => nsalinux}/include/netlabel.h (53%)
 rename security/{selinux => nsalinux}/include/netnode.h (87%)
 rename security/{selinux => nsalinux}/include/netport.h (86%)
 rename security/{selinux => nsalinux}/include/objsec.h (92%)
 rename security/{selinux => nsalinux}/include/security.h (88%)
 rename security/{selinux => nsalinux}/include/xfrm.h (37%)
 rename security/{selinux => nsalinux}/netif.c (98%)
 rename security/{selinux => nsalinux}/netlabel.c (81%)
 rename security/{selinux => nsalinux}/netlink.c (89%)
 rename security/{selinux => nsalinux}/netnode.c (97%)
 rename security/{selinux => nsalinux}/netport.c (96%)
 rename security/{selinux => nsalinux}/nlmsgtab.c (99%)
 rename security/{selinux/selinuxfs.c => nsalinux/nsalinuxfs.c} (95%)
 rename security/{selinux => nsalinux}/ss/avtab.c (90%)
 rename security/{selinux => nsalinux}/ss/avtab.h (100%)
 rename security/{selinux => nsalinux}/ss/conditional.c (95%)
 rename security/{selinux => nsalinux}/ss/conditional.h (100%)
 rename security/{selinux => nsalinux}/ss/constraint.h (100%)
 rename security/{selinux => nsalinux}/ss/context.h (100%)
 rename security/{selinux => nsalinux}/ss/ebitmap.c (94%)
 rename security/{selinux => nsalinux}/ss/ebitmap.h (100%)
 rename security/{selinux => nsalinux}/ss/hashtab.c (100%)
 rename security/{selinux => nsalinux}/ss/hashtab.h (100%)
 rename security/{selinux => nsalinux}/ss/mls.c (99%)
 rename security/{selinux => nsalinux}/ss/mls.h (100%)
 rename security/{selinux => nsalinux}/ss/mls_types.h (100%)
 rename security/{selinux => nsalinux}/ss/policydb.c (96%)
 rename security/{selinux => nsalinux}/ss/policydb.h (99%)
 rename security/{selinux => nsalinux}/ss/services.c (94%)
 rename security/{selinux => nsalinux}/ss/services.h (100%)
 rename security/{selinux => nsalinux}/ss/sidtab.c (98%)
 rename security/{selinux => nsalinux}/ss/sidtab.h (100%)
 rename security/{selinux => nsalinux}/ss/status.c (58%)
 rename security/{selinux => nsalinux}/ss/symtab.c (100%)
 rename security/{selinux => nsalinux}/ss/symtab.h (100%)
 rename security/{selinux => nsalinux}/xfrm.c (75%)
CREDITS +1 -1
index 4312cd0..f5f19d6 100644
@@ -2600,7 +2600,7 @@ S: Nashua, NH 03062
 N: James Morris
 E: [email protected]
 W: http://namei.org/
-D: Netfilter, Linux Security Modules (LSM), SELinux, IPSec,
+D: Netfilter, Linux Security Modules (LSM), NSALinux, IPSec,
 D: Crypto API, general networking, miscellaneous.
 S: PO Box 707
 S: Spit Junction NSW 2088
Documentation/ABI/testing/ima_policy +2 -2
index bb0f9a1..bd88a08 100644
@@ -62,7 +62,7 @@ Description:
 			# SECURITYFS_MAGIC
 			dont_measure fsmagic=0x73636673
 			dont_appraise fsmagic=0x73636673
-			# SELINUX_MAGIC
+			# NSALINUX_MAGIC
 			dont_measure fsmagic=0xf97cff8c
 			dont_appraise fsmagic=0xf97cff8c
 			# CGROUP_SUPER_MAGIC
@@ -86,7 +86,7 @@ Description:
 
 		Examples of LSM specific definitions:
 
-		SELinux:
+		NSALinux:
 			dont_measure obj_type=var_log_t
 			dont_appraise obj_type=var_log_t
 			dont_measure obj_type=auditd_log_t
Documentation/CodingStyle +1 -1
index 9a70ddd..205a615 100644
@@ -564,7 +564,7 @@ config AUDIT
 	depends on NET
 	help
 	  Enable auditing infrastructure that can be used with another
-	  kernel subsystem, such as SELinux (which requires this for
+	  kernel subsystem, such as NSALinux (which requires this for
 	  logging of avc messages output).  Does not do system-call
 	  auditing without CONFIG_AUDITSYSCALL.
 
Documentation/DocBook/lsm.tmpl +3 -3
index fe7664c..487ec94 100644
@@ -37,8 +37,8 @@
 
 <para>
 In March 2001, the National Security Agency (NSA) gave a presentation
-about Security-Enhanced Linux (SELinux) at the 2.5 Linux Kernel
-Summit.  SELinux is an implementation of flexible and fine-grained
+about Security-Enhanced Linux (NSALinux) at the 2.5 Linux Kernel
+Summit.  NSALinux is an implementation of flexible and fine-grained
 nondiscretionary access controls in the Linux kernel, originally
 implemented as its own particular kernel patch.  Several other
 security projects (e.g. RSBAC, Medusa) have also developed flexible
@@ -64,7 +64,7 @@ module.
 <para>
 The Linux Security Modules (LSM) project was started by WireX to
 develop such a framework.  LSM is a joint development effort by
-several security projects, including Immunix, SELinux, SGI and Janus,
+several security projects, including Immunix, NSALinux, SGI and Janus,
 and several individuals, including Greg Kroah-Hartman and James
 Morris, to develop a Linux kernel patch that implements this
 framework.  The patch is currently tracking the 2.4 series and is
Documentation/RCU/RTFP.txt +4 -4
index 370ca00..c93b1fd 100644
@@ -145,7 +145,7 @@ Hugh Dickins [Dickins02a] and an implementation by Mingming Cao
 different CPUs [McKenney04b], a dissertation describing use of RCU in a
 number of operating-system kernels [PaulEdwardMcKenneyPhD], a paper
 describing how to make RCU safe for soft-realtime applications [Sarma04c],
-and a paper describing SELinux performance with RCU [JamesMorris04b].
+and a paper describing NSALinux performance with RCU [JamesMorris04b].
 
 2005 brought further adaptation of RCU to realtime use, permitting
 preemption of RCU realtime critical sections [PaulMcKenney05a,
@@ -1195,7 +1195,7 @@ Oregon Health and Sciences University"
 
 @unpublished{JamesMorris04a
 ,Author="James Morris"
-,Title="{[PATCH 2/3] SELinux} scalability - convert {AVC} to {RCU}"
+,Title="{[PATCH 2/3] NSALinux} scalability - convert {AVC} to {RCU}"
 ,day="15"
 ,month="November"
 ,year="2004"
@@ -1209,14 +1209,14 @@ Oregon Health and Sciences University"
 
 @unpublished{JamesMorris04b
 ,Author="James Morris"
-,Title="Recent Developments in {SELinux} Kernel Performance"
+,Title="Recent Developments in {NSALinux} Kernel Performance"
 ,month="December"
 ,year="2004"
 ,note="Available:
 \url{http://www.livejournal.com/users/james_morris/2153.html}
 [Viewed December 10, 2004]"
 ,annotation={
-	RCU helps SELinux performance.  ;-)  Made LWN.
+	RCU helps NSALinux performance.  ;-)  Made LWN.
 }
 }
 
Documentation/cgroup-v1/cgroups.txt +1 -1
index 947e6fe..531dbc4 100644
@@ -664,7 +664,7 @@ using kernel memory and it's advised to keep the usage at minimum.  This
 is the reason why user defined extended attributes are not supported, since
 any user can do it and there's no limit in the value size.
 
-The current known users for this feature are SELinux to limit cgroup usage
+The current known users for this feature are NSALinux to limit cgroup usage
 in containers and systemd for assorted meta data like main PID in a cgroup
 (systemd creates a cgroup per service).
 
Documentation/filesystems/caching/backend-api.txt +1 -1
index c0bd567..f539884 100644
@@ -84,7 +84,7 @@ The cache methods are executed one of two contexts:
 In either case, this may not be an appropriate context in which to access the
 cache.
 
-The calling process's fsuid, fsgid and SELinux security identities may need to
+The calling process's fsuid, fsgid and NSALinux security identities may need to
 be masqueraded for the duration of the cache driver's access to the cache.
 This is left to the cache to handle; FS-Cache makes no effort in this regard.
 
Documentation/filesystems/caching/cachefiles.txt +8 -8
index 748a1ae..164659a 100644
@@ -18,7 +18,7 @@ Contents:
 
  (*) Cache structure.
 
- (*) Security model and SELinux.
+ (*) Security model and NSALinux.
 
  (*) A note on security.
 
@@ -308,11 +308,11 @@ any file of an incorrect type (such as a FIFO file or a device file).
 
 
 ==========================
-SECURITY MODEL AND SELINUX
+SECURITY MODEL AND NSALINUX
 ==========================
 
 CacheFiles is implemented to deal properly with the LSM security features of
-the Linux kernel and the SELinux facility.
+the Linux kernel and the NSALinux facility.
 
 One of the problems that CacheFiles faces is that it is generally acting on
 behalf of a process, and running in that process's context, and that includes a
@@ -345,7 +345,7 @@ When the CacheFiles module is asked to bind to its cache, it:
 
 	cachefiles_kernel_t
 
-     SELinux transitions the daemon's security ID to the module's security ID
+     NSALinux transitions the daemon's security ID to the module's security ID
      based on a rule of this form in the policy.
 
 	type_transition <daemon's-ID> kernel_t : process <module's-ID>;
@@ -381,10 +381,10 @@ They are built and installed directly by the RPM.
 If a non-RPM based system is being used, then copy the above files to their own
 directory and run:
 
-	make -f /usr/share/selinux/devel/Makefile
+	make -f /usr/share/nsalinux/devel/Makefile
 	semodule -i cachefilesd.pp
 
-You will need checkpolicy and selinux-policy-devel installed prior to the
+You will need checkpolicy and nsalinux-policy-devel installed prior to the
 build.
 
 
@@ -394,7 +394,7 @@ an auxiliary policy must be installed to label the alternate location of the
 cache.
 
 For instructions on how to add an auxiliary policy to enable the cache to be
-located elsewhere when SELinux is in enforcing mode, please see:
+located elsewhere when NSALinux is in enforcing mode, please see:
 
 	/usr/share/doc/cachefilesd-*/move-cache.txt
 
@@ -440,7 +440,7 @@ may be overridden.  This is not seen externally, and is used whan a process
 acts upon another object, for example SIGKILLing another process or opening a
 file.
 
-LSM hooks exist that allow SELinux (or Smack or whatever) to reject a request
+LSM hooks exist that allow NSALinux (or Smack or whatever) to reject a request
 for CacheFiles to run in a context of a specific security label, or to create
 files and directories with another security label.
 
Documentation/filesystems/cifs/TODO +1 -1
index 066ffdd..ddc407b 100644
@@ -45,7 +45,7 @@ j) Add GUI tool to configure /proc/fs/cifs settings and for display of
 the CIFS statistics (started)
 
 k) implement support for security and trusted categories of xattrs
-(requires minor protocol extension) to enable better support for SELINUX
+(requires minor protocol extension) to enable better support for NSALINUX
 
 l) Implement O_DIRECT flag on open (already supported on mount)
 
Documentation/filesystems/orangefs.txt +1 -1
index e1a0056..33d4666 100644
@@ -82,7 +82,7 @@ prove things are working with:
 
 /opt/osf/bin/pvfs2-ls /mymountpoint
 
-You might not want to enforce selinux, it doesn't seem to matter by
+You might not want to enforce nsalinux, it doesn't seem to matter by
 linux 3.11...
 
 If stuff seems to be working, turn on the client core:
Documentation/filesystems/proc.txt +1 -1
index 7f5607a..12ec0ef 100644
@@ -1850,7 +1850,7 @@ the process is maintaining.  Example output:
      | lr-------- 1 root root 64 Jan 27 11:24 333c81f000-333c820000 -> /usr/lib64/ld-2.18.so
      | lr-------- 1 root root 64 Jan 27 11:24 333c820000-333c821000 -> /usr/lib64/ld-2.18.so
      | ...
-     | lr-------- 1 root root 64 Jan 27 11:24 35d0421000-35d0422000 -> /usr/lib64/libselinux.so.1
+     | lr-------- 1 root root 64 Jan 27 11:24 35d0421000-35d0422000 -> /usr/lib64/libnsalinux.so.1
      | lr-------- 1 root root 64 Jan 27 11:24 400000-41a000 -> /usr/bin/ls
 
 The name of a link represents the virtual memory bounds of a mapping, i.e.
Documentation/kernel-parameters.txt +10 -10
index ecc74fa..5dfde04 100644
@@ -107,7 +107,7 @@ parameter is applicable:
 			A lot of drivers have their options described inside
 			the Documentation/scsi/ sub-directory.
 	SECURITY Different security models are enabled.
-	SELINUX SELinux support is enabled.
+	NSALINUX NSALinux support is enabled.
 	APPARMOR AppArmor support is enabled.
 	SERIAL	Serial support is enabled.
 	SH	SuperH architecture is enabled.
@@ -624,15 +624,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			nosocket -- Disable socket memory accounting.
 			nokmem -- Disable kernel memory accounting.
 
-	checkreqprot	[SELINUX] Set initial checkreqprot flag value.
+	checkreqprot	[NSALINUX] Set initial checkreqprot flag value.
 			Format: { "0" | "1" }
-			See security/selinux/Kconfig help text.
+			See security/nsalinux/Kconfig help text.
 			0 -- check protection applied by kernel (includes
 				any implied execute protection).
 			1 -- check protection requested by application.
 			Default value is set via a kernel config option.
 			Value can be changed at runtime via
-				/selinux/checkreqprot.
+				/nsalinux/checkreqprot.
 
 	cio_ignore=	[S390]
 			See Documentation/s390/CommonIO for details.
@@ -1193,13 +1193,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			(in particular on some ATI chipsets).
 			The kernel tries to set a reasonable default.
 
-	enforcing	[SELINUX] Set initial enforcing status.
+	enforcing	[NSALINUX] Set initial enforcing status.
 			Format: {"0" | "1"}
-			See security/selinux/Kconfig help text.
+			See security/nsalinux/Kconfig help text.
 			0 -- permissive (log only, no denials).
 			1 -- enforcing (deny and log).
 			Default value is 0.
-			Value can be changed at runtime via /selinux/enforce.
+			Value can be changed at runtime via /nsalinux/enforce.
 
 	erst_disable	[ACPI]
 			Disable Error Record Serialization Table (ERST)
@@ -3604,13 +3604,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			loaded. An invalid security module name will be treated
 			as if no module has been chosen.
 
-	selinux=	[SELINUX] Disable or enable SELinux at boot time.
+	nsalinux=	[NSALINUX] Disable or enable NSALinux at boot time.
 			Format: { "0" | "1" }
-			See security/selinux/Kconfig help text.
+			See security/nsalinux/Kconfig help text.
 			0 -- disable.
 			1 -- enable.
 			Default value is set via kernel config option.
-			If enabled at boot time, /selinux/disable can be used
+			If enabled at boot time, /nsalinux/disable can be used
 			later to disable prior to initial policy load.
 
 	apparmor=	[APPARMOR] Disable or enable AppArmor at boot time
Documentation/networking/secid.txt +1 -1
index 95ea067..e7186ac 100644
@@ -1,6 +1,6 @@
 flowi structure:
 
-The secid member in the flow structure is used in LSMs (e.g. SELinux) to indicate
+The secid member in the flow structure is used in LSMs (e.g. NSALinux) to indicate
 the label of the flow. This label of the flow is currently used in selecting
 matching labeled xfrm(s).
 
Documentation/security/00-INDEX +2 -2
index 45c82fd..4715b2a 100644
@@ -2,8 +2,8 @@
 	- this file.
 LSM.txt
 	- description of the Linux Security Module framework.
-SELinux.txt
-	- how to get started with the SELinux security enhancement.
+NSALinux.txt
+	- how to get started with the NSALinux security enhancement.
 Smack.txt
 	- documentation on the Smack Linux Security Module.
 Yama.txt
Documentation/security/LSM.txt +1 -1
index 3db7e67..9a146c8 100644
@@ -11,7 +11,7 @@ LSMs were built into a given kernel.
 
 The primary users of the LSM interface are Mandatory Access Control
 (MAC) extensions which provide a comprehensive security policy. Examples
-include SELinux, Smack, Tomoyo, and AppArmor. In addition to the larger
+include NSALinux, Smack, Tomoyo, and AppArmor. In addition to the larger
 MAC extensions, other extensions can be built using the LSM to provide
 specific changes to system operation when these tweaks are not available
 in the core functionality of Linux itself.
Documentation/security/NSALinux.txt renamed from Documentation/security/SELinux.txt +9 -9
similarity index 58%
rename from Documentation/security/SELinux.txt
rename to Documentation/security/NSALinux.txt
index 07eae00..f90df63 100644
@@ -1,27 +1,27 @@
-If you want to use SELinux, chances are you will want
+If you want to use NSALinux, chances are you will want
 to use the distro-provided policies, or install the
 latest reference policy release from
 	http://oss.tresys.com/projects/refpolicy
 
 However, if you want to install a dummy policy for
 testing, you can do using 'mdp' provided under
-scripts/selinux.  Note that this requires the selinux
+scripts/nsalinux.  Note that this requires the nsalinux
 userspace to be installed - in particular you will
 need checkpolicy to compile a kernel, and setfiles and
 fixfiles to label the filesystem.
 
-	1. Compile the kernel with selinux enabled.
+	1. Compile the kernel with nsalinux enabled.
 	2. Type 'make' to compile mdp.
 	3. Make sure that you are not running with
-	   SELinux enabled and a real policy.  If
-	   you are, reboot with selinux disabled
+	   NSALinux enabled and a real policy.  If
+	   you are, reboot with nsalinux disabled
 	   before continuing.
 	4. Run install_policy.sh:
-		cd scripts/selinux
+		cd scripts/nsalinux
 		sh install_policy.sh
 
 Step 4 will create a new dummy policy valid for your
-kernel, with a single selinux user, role, and type.
-It will compile the policy, will set your SELINUXTYPE to
-dummy in /etc/selinux/config, install the compiled policy
+kernel, with a single nsalinux user, role, and type.
+It will compile the policy, will set your NSALINUXTYPE to
+dummy in /etc/nsalinux/config, install the compiled policy
 as 'dummy', and relabel your filesystem.
Documentation/security/credentials.txt +2 -2
index 8625705..f34a111 100644
@@ -131,9 +131,9 @@ object acts upon another:
 
 	 The system as a whole may have one or more sets of rules that get
 	 applied to all subjects and objects, regardless of their source.
-	 SELinux and Smack are examples of this.
+	 NSALinux and Smack are examples of this.
 
-	 In the case of SELinux and Smack, each object is given a label as part
+	 In the case of NSALinux and Smack, each object is given a label as part
 	 of its credentials.  When an action is requested, they take the
 	 subject label, the object label and the action and look for a rule
 	 that says that this action is either granted or denied.
Documentation/security/keys.txt +6 -6
index 8c18387..aec82ae 100644
@@ -19,7 +19,7 @@ This document has the following sections:
 	- Key overview
 	- Key service overview
 	- Key access permissions
-	- SELinux support
+	- NSALinux support
 	- New procfs files
 	- Userspace system call interface
 	- Kernel services
@@ -250,18 +250,18 @@ the key or having the sysadmin capability is sufficient.
 
 
 ===============
-SELINUX SUPPORT
+NSALINUX SUPPORT
 ===============
 
-The security class "key" has been added to SELinux so that mandatory access
+The security class "key" has been added to NSALinux so that mandatory access
 controls can be applied to keys created within various contexts.  This support
 is preliminary, and is likely to change quite significantly in the near future.
-Currently, all of the basic permissions explained above are provided in SELinux
-as well; SELinux is simply invoked after all basic permission checks have been
+Currently, all of the basic permissions explained above are provided in NSALinux
+as well; NSALinux is simply invoked after all basic permission checks have been
 performed.
 
 The value of the file /proc/self/attr/keycreate influences the labeling of
-newly-created keys.  If the contents of that file correspond to an SELinux
+newly-created keys.  If the contents of that file correspond to an NSALinux
 security context, then the key will be assigned that context.  Otherwise, the
 key will be assigned the current context of the task that invoked the key
 creation request.  Tasks must be granted explicit permission to assign a
Documentation/security/tomoyo.txt +1 -1
index 200a2d3..b2fa581 100644
@@ -47,7 +47,7 @@ History of TOMOYO?
 We believe that inode based security and name based security are complementary
 and both should be used together. But unfortunately, so far, we cannot enable
 multiple LSM modules at the same time. We feel sorry that you have to give up
-SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.
+NSALinux/SMACK/AppArmor etc. when you want to use TOMOYO.
 
 We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM
 version of TOMOYO, available at http://tomoyo.sourceforge.jp/1.7/ .
Documentation/zh_CN/CodingStyle +1 -1
index 654afd7..9bf7a13 100644
@@ -458,7 +458,7 @@ config AUDIT
 	depends on NET
 	help
 	  Enable auditing infrastructure that can be used with another
-	  kernel subsystem, such as SELinux (which requires this for
+	  kernel subsystem, such as NSALinux (which requires this for
 	  logging of avc messages output).  Does not do system-call
 	  auditing without CONFIG_AUDITSYSCALL.
 
MAINTAINERS +4 -4
index 378ebff..c9034dc 100644
@@ -9939,7 +9939,7 @@ SECURITY CONTACT
 M:	Security Officers <[email protected]>
 S:	Supported
 
-SELINUX SECURITY MODULE
+NSALINUX SECURITY MODULE
 M:	Paul Moore <[email protected]>
 M:	Stephen Smalley <[email protected]>
 M:	Eric Paris <[email protected]>
@@ -9947,9 +9947,9 @@ L:	[email protected] (moderated for non-subscribers)
 W:	http://selinuxproject.org
 T:	git git://git.infradead.org/users/pcmoore/selinux
 S:	Supported
-F:	include/linux/selinux*
-F:	security/selinux/
-F:	scripts/selinux/
+F:	include/linux/nsalinux*
+F:	security/nsalinux/
+F:	scripts/nsalinux/
 
 APPARMOR SECURITY MODULE
 M:	John Johansen <[email protected]>
arch/mips/configs/bigsur_defconfig +3 -3
index e070dac..806c845 100644
@@ -250,9 +250,9 @@ CONFIG_KEYS=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_DEFAULT_SECURITY_DAC=y
 CONFIG_CRYPTO_NULL=y
 CONFIG_CRYPTO_CCM=m
arch/mips/configs/loongson3_defconfig +3 -3
index f8bf915..e635154 100644
@@ -342,9 +342,9 @@ CONFIG_SECURITY=y
 CONFIG_SECURITYFS=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_PATH=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_DEFAULT_SECURITY_DAC=y
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_HMAC=y
arch/mips/configs/nlm_xlp_defconfig +4 -4
index b3d1d37..b721b11 100644
@@ -569,10 +569,10 @@ CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_KGDB=y
 CONFIG_SECURITY=y
 CONFIG_LSM_MMAP_MIN_ADDR=0
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_SECURITY_SMACK=y
 CONFIG_SECURITY_TOMOYO=y
 CONFIG_CRYPTO_NULL=m
arch/mips/configs/nlm_xlr_defconfig +4 -4
index 3d8016d..b92d94e 100644
@@ -530,10 +530,10 @@ CONFIG_KGDB=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_LSM_MMAP_MIN_ADDR=0
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_SECURITY_SMACK=y
 CONFIG_SECURITY_TOMOYO=y
 CONFIG_CRYPTO_NULL=m
arch/powerpc/configs/c2k_defconfig +3 -3
index 340685c..a170128 100644
@@ -389,9 +389,9 @@ CONFIG_BOOTX_TEXT=y
 CONFIG_PPC_EARLY_DEBUG=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_MICHAEL_MIC=m
arch/powerpc/configs/ppc6xx_defconfig +3 -3
index 99ccbeba..3022dfd 100644
@@ -1178,9 +1178,9 @@ CONFIG_PPC_EARLY_DEBUG=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_TEST=m
 CONFIG_CRYPTO_GCM=m
 CONFIG_CRYPTO_CTS=m
arch/s390/configs/default_defconfig +4 -4
index 0ac42cc..77ecee8 100644
@@ -612,10 +612,10 @@ CONFIG_S390_PTDUMP=y
 CONFIG_ENCRYPTED_KEYS=m
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_IMA=y
 CONFIG_IMA_APPRAISE=y
 CONFIG_CRYPTO_USER=m
arch/s390/configs/gcov_defconfig +4 -4
index a31dcd5..8c4a965 100644
@@ -558,10 +558,10 @@ CONFIG_S390_PTDUMP=y
 CONFIG_ENCRYPTED_KEYS=m
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_IMA=y
 CONFIG_IMA_APPRAISE=y
 CONFIG_CRYPTO_USER=m
arch/s390/configs/performance_defconfig +4 -4
index 7b73bf3..836480e 100644
@@ -555,10 +555,10 @@ CONFIG_S390_PTDUMP=y
 CONFIG_ENCRYPTED_KEYS=m
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_IMA=y
 CONFIG_IMA_APPRAISE=y
 CONFIG_CRYPTO_USER=m
arch/tile/configs/tilegx_defconfig +3 -3
index 3f3dfb8..fb9aef2 100644
@@ -378,9 +378,9 @@ CONFIG_SECURITY=y
 CONFIG_SECURITYFS=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_PCRYPT=m
 CONFIG_CRYPTO_CRYPTD=m
 CONFIG_CRYPTO_TEST=m
arch/tile/configs/tilepro_defconfig +3 -3
index ef9e27e..87134a8 100644
@@ -490,9 +490,9 @@ CONFIG_SECURITY=y
 CONFIG_SECURITYFS=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_PCRYPT=m
 CONFIG_CRYPTO_CRYPTD=m
 CONFIG_CRYPTO_TEST=m
arch/x86/configs/i386_defconfig +3 -3
index 265901a..0dd4d06d 100644
@@ -305,8 +305,8 @@ CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_OPTIMIZE_INLINING=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_AES_586=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/x86/configs/x86_64_defconfig +3 -3
index 4f404a6..fdf65ba 100644
@@ -302,7 +302,7 @@ CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_OPTIMIZE_INLINING=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/xtensa/configs/iss_defconfig +1 -1
index 44c6764..55a55dd 100644
@@ -643,7 +643,7 @@ CONFIG_RCU_CPU_STALL_DETECTOR=y
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITYFS is not set
-# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_NSALINUX is not set
 # CONFIG_DEFAULT_SECURITY_SMACK is not set
 # CONFIG_DEFAULT_SECURITY_TOMOYO is not set
 CONFIG_DEFAULT_SECURITY_DAC=y
drivers/staging/lustre/lustre/llite/xattr.c +7 -7
index b68dcc9..5eed334 100644
@@ -37,7 +37,7 @@
 #include <linux/fs.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
@@ -138,9 +138,9 @@ int ll_setxattr_common(struct inode *inode, const char *name,
 	     strcmp(name, "security.capability") == 0))
 		return 0;
 
-	/* LU-549:  Disable security.selinux when selinux is disabled */
-	if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled() &&
-	    strcmp(name, "security.selinux") == 0)
+	/* LU-549:  Disable security.nsalinux when nsalinux is disabled */
+	if (xattr_type == XATTR_SECURITY_T && !nsalinux_is_enabled() &&
+	    strcmp(name, "security.nsalinux") == 0)
 		return -EOPNOTSUPP;
 
 #ifdef CONFIG_FS_POSIX_ACL
@@ -314,9 +314,9 @@ int ll_getxattr_common(struct inode *inode, const char *name,
 	     strcmp(name, "security.capability") == 0))
 		return -ENODATA;
 
-	/* LU-549:  Disable security.selinux when selinux is disabled */
-	if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled() &&
-	    strcmp(name, "security.selinux") == 0)
+	/* LU-549:  Disable security.nsalinux when nsalinux is disabled */
+	if (xattr_type == XATTR_SECURITY_T && !nsalinux_is_enabled() &&
+	    strcmp(name, "security.nsalinux") == 0)
 		return -EOPNOTSUPP;
 
 #ifdef CONFIG_FS_POSIX_ACL
fs/9p/Kconfig +1 -1
index 6489e1f..e64308b 100644
@@ -38,7 +38,7 @@ config 9P_FS_SECURITY
         depends on 9P_FS
         help
           Security labels support alternative access control models
-          implemented by security modules like SELinux.  This option
+          implemented by security modules like NSALinux.  This option
           enables an extended attribute handler for file security
           labels in the 9P filesystem.
 
fs/btrfs/inode.c +4 -4
index 41a5688..6568a52 100644
@@ -6351,7 +6351,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
 	/*
 	 * 2 for inode item and ref
 	 * 2 for dir items
-	 * 1 for xattr if selinux is on
+	 * 1 for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 5);
 	if (IS_ERR(trans))
@@ -6422,7 +6422,7 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
 	/*
 	 * 2 for inode item and ref
 	 * 2 for dir items
-	 * 1 for xattr if selinux is on
+	 * 1 for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 5);
 	if (IS_ERR(trans))
@@ -6570,7 +6570,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 	/*
 	 * 2 items for inode and ref
 	 * 2 items for dir items
-	 * 1 for xattr if selinux is on
+	 * 1 for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 5);
 	if (IS_ERR(trans))
@@ -9799,7 +9799,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
 	 * 2 items for dir items
 	 * 1 item for updating parent inode item
 	 * 1 item for the inline extent item
-	 * 1 item for xattr if selinux is on
+	 * 1 item for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 7);
 	if (IS_ERR(trans))
fs/btrfs/super.c +1 -1
index 00b8f37..42342af 100644
@@ -1488,7 +1488,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info,
 		memcpy(&fs_info->security_opts, sec_opts, sizeof(*sec_opts));
 	} else {
 		/*
-		 * Since SELinux(the only one supports security_mnt_opts) does
+		 * Since NSALinux(the only one supports security_mnt_opts) does
 		 * NOT support changing context during remount/mount same sb,
 		 * This must be the same or part of the same security options,
 		 * just free it.
fs/ext2/Kconfig +1 -1
index c634874..9a93197 100644
@@ -36,7 +36,7 @@ config EXT2_FS_SECURITY
 	depends on EXT2_FS_XATTR
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the ext2 filesystem.
 
fs/ext4/Kconfig +1 -1
index b46e9fc..ea62e4d 100644
@@ -91,7 +91,7 @@ config EXT4_FS_SECURITY
 	depends on EXT4_FS
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the ext4 filesystem.
 
fs/ext4/namei.c +1 -1
index 48e4b89..1251922 100644
@@ -3106,7 +3106,7 @@ static int ext4_symlink(struct inode *dir,
 		 * For non-fast symlinks, we just allocate inode and put it on
 		 * orphan list in the first transaction => we need bitmap,
 		 * group descriptor, sb, inode block, quota blocks, and
-		 * possibly selinux xattr blocks.
+		 * possibly nsalinux xattr blocks.
 		 */
 		credits = 4 + EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) +
 			  EXT4_XATTR_TRANS_BLOCKS;
fs/f2fs/Kconfig +1 -1
index 1f8982a..5827963 100644
@@ -59,7 +59,7 @@ config F2FS_FS_SECURITY
 	depends on F2FS_FS_XATTR
 	help
 	  Security labels provide an access control facility to support Linux
-	  Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
+	  Security Models (LSMs) accepted by AppArmor, NSALinux, Smack and TOMOYO
 	  Linux. This option enables an extended attribute handler for file
 	  security labels in the f2fs filesystem, so that it requires enabling
 	  the extended attribute support in advance.
fs/gfs2/inode.c +1 -1
index bb30f9a..72c968a 100644
@@ -1976,7 +1976,7 @@ static ssize_t gfs2_getxattr(struct dentry *dentry, const char *name,
 	struct gfs2_holder gh;
 	int ret;
 
-	/* For selinux during lookup */
+	/* For nsalinux during lookup */
 	if (gfs2_glock_is_locked_by_me(ip->i_gl))
 		return generic_getxattr(dentry, name, data, size);
 
fs/jffs2/Kconfig +1 -1
index d8bb6c4..a870943 100644
@@ -93,7 +93,7 @@ config JFFS2_FS_SECURITY
 	default y
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the jffs2 filesystem.
 
fs/jfs/Kconfig +1 -1
index 57cef19..964e159 100644
@@ -26,7 +26,7 @@ config JFS_SECURITY
 	depends on JFS_FS
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the jfs filesystem.
 
fs/nfs/super.c +4 -4
index f126828..2b21fe3 100644
@@ -2040,14 +2040,14 @@ static int nfs23_validate_mount_data(void *options,
 					NFS_MOUNT_LOCAL_FCNTL);
 		/*
 		 * The legacy version 6 binary mount data from userspace has a
-		 * field used only to transport selinux information into the
+		 * field used only to transport nsalinux information into the
 		 * the kernel.  To continue to support that functionality we
-		 * have a touch of selinux knowledge here in the NFS code. The
+		 * have a touch of nsalinux knowledge here in the NFS code. The
 		 * userspace code converted context=blah to just blah so we are
-		 * converting back to the full string selinux understands.
+		 * converting back to the full string nsalinux understands.
 		 */
 		if (data->context[0]){
-#ifdef CONFIG_SECURITY_SELINUX
+#ifdef CONFIG_SECURITY_NSALINUX
 			int rc;
 			char *opts_str = kmalloc(sizeof(data->context) + 8, GFP_KERNEL);
 			if (!opts_str)
fs/nfsd/Kconfig +2 -2
index c9f583d..7c70f71 100644
@@ -118,10 +118,10 @@ config NFSD_V4_SECURITY_LABEL
 
 	Say Y here if you want enable fine-grained security label attribute
 	support for NFS version 4.  Security labels allow security modules like
-	SELinux and Smack to label files to facilitate enforcement of their policies.
+	NSALinux and Smack to label files to facilitate enforcement of their policies.
 	Without this an NFSv4 mount will have the same label on each file.
 
-	If you do not wish to enable fine-grained security labels SELinux or
+	If you do not wish to enable fine-grained security labels NSALinux or
 	Smack policies on NFSv4 files, say N.
 
 config NFSD_FAULT_INJECTION
fs/reiserfs/Kconfig +1 -1
index 7cd4666..ae9c5ef 100644
@@ -80,7 +80,7 @@ config REISERFS_FS_SECURITY
 	depends on REISERFS_FS_XATTR
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the ReiserFS filesystem.
 
fs/reiserfs/xattr_security.c +1 -1
index ab0217d..51a9e31 100644
@@ -51,7 +51,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode,
 
 	sec->name = NULL;
 
-	/* Don't add selinux attributes on xattrs - they'll never get used */
+	/* Don't add nsalinux attributes on xattrs - they'll never get used */
 	if (IS_PRIVATE(dir))
 		return 0;
 
fs/xfs/xfs_iops.c +1 -1
index fb7dc61..36d6a6a 100644
@@ -78,7 +78,7 @@ xfs_initxattrs(
 }
 
 /*
- * Hook in SELinux.  This is not quite correct yet, what we really need
+ * Hook in NSALinux.  This is not quite correct yet, what we really need
  * here (as we do for default ACLs) is a mechanism by which creation of
  * these attrs can be journalled at inode creation time (along with the
  * inode, of course, such that log replay can't cause these to be lost).
include/linux/cred.h +1 -1
index 257db64..2e81331 100644
@@ -15,7 +15,7 @@
 #include <linux/capability.h>
 #include <linux/init.h>
 #include <linux/key.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 #include <linux/atomic.h>
 #include <linux/uidgid.h>
 
include/linux/lsm_audit.h +3 -3
index ffb9c9d..d9c85ec 100644
@@ -1,6 +1,6 @@
 /*
  * Common LSM logging functions
- * Heavily borrowed from selinux/avc.h
+ * Heavily borrowed from nsalinux/avc.h
  *
  * Author : Etienne BASSET  <[email protected]>
  *
@@ -81,8 +81,8 @@ struct common_audit_data {
 #ifdef CONFIG_SECURITY_SMACK
 		struct smack_audit_data *smack_audit_data;
 #endif
-#ifdef CONFIG_SECURITY_SELINUX
-		struct selinux_audit_data *selinux_audit_data;
+#ifdef CONFIG_SECURITY_NSALINUX
+		struct nsalinux_audit_data *nsalinux_audit_data;
 #endif
 #ifdef CONFIG_SECURITY_APPARMOR
 		struct apparmor_audit_data *apparmor_audit_data;
include/linux/lsm_hooks.h +4 -4
index cdee11c..045f794 100644
@@ -179,7 +179,7 @@
  *	@inode contains the inode structure of the newly created inode.
  *	@dir contains the inode structure of the parent directory.
  *	@qstr contains the last path component of the new object
- *	@name will be set to the allocated name suffix (e.g. selinux).
+ *	@name will be set to the allocated name suffix (e.g. nsalinux).
  *	@value will be set to the allocated attribute value.
  *	@len will be set to the length of the value.
  *	Returns 0 if @name and @value have been successfully set,
@@ -1863,7 +1863,7 @@ static inline void security_add_hooks(struct security_hook_list *hooks,
 		list_add_tail_rcu(&hooks[i].list, hooks[i].head);
 }
 
-#ifdef CONFIG_SECURITY_SELINUX_DISABLE
+#ifdef CONFIG_SECURITY_NSALINUX_DISABLE
 /*
  * Assuring the safety of deleting a security module is up to
  * the security module involved. This may entail ordering the
@@ -1874,7 +1874,7 @@ static inline void security_add_hooks(struct security_hook_list *hooks,
  * The name of the configuration option reflects the only module
  * that currently uses the mechanism. Any developer who thinks
  * disabling their module is a good idea needs to be at least as
- * careful as the SELinux team.
+ * careful as the NSALinux team.
  */
 static inline void security_delete_hooks(struct security_hook_list *hooks,
 						int count)
@@ -1884,7 +1884,7 @@ static inline void security_delete_hooks(struct security_hook_list *hooks,
 	for (i = 0; i < count; i++)
 		list_del_rcu(&hooks[i].list);
 }
-#endif /* CONFIG_SECURITY_SELINUX_DISABLE */
+#endif /* CONFIG_SECURITY_NSALINUX_DISABLE */
 
 extern int __init security_module_enable(const char *module);
 extern void __init capability_add_hooks(void);
include/linux/nsalinux.h renamed from include/linux/selinux.h +10 -10
similarity index 60%
rename from include/linux/selinux.h
rename to include/linux/nsalinux.h
index 44f4596..f5a100f 100644
@@ -1,5 +1,5 @@
 /*
- * SELinux services exported to the rest of the kernel.
+ * NSALinux services exported to the rest of the kernel.
  *
  * Author: James Morris <[email protected]>
  *
@@ -11,25 +11,25 @@
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
  */
-#ifndef _LINUX_SELINUX_H
-#define _LINUX_SELINUX_H
+#ifndef _LINUX_NSALINUX_H
+#define _LINUX_NSALINUX_H
 
-struct selinux_audit_rule;
+struct nsalinux_audit_rule;
 struct audit_context;
 struct kern_ipc_perm;
 
-#ifdef CONFIG_SECURITY_SELINUX
+#ifdef CONFIG_SECURITY_NSALINUX
 
 /**
- * selinux_is_enabled - is SELinux enabled?
+ * nsalinux_is_enabled - is NSALinux enabled?
  */
-bool selinux_is_enabled(void);
+bool nsalinux_is_enabled(void);
 #else
 
-static inline bool selinux_is_enabled(void)
+static inline bool nsalinux_is_enabled(void)
 {
 	return false;
 }
-#endif	/* CONFIG_SECURITY_SELINUX */
+#endif	/* CONFIG_SECURITY_NSALINUX */
 
-#endif /* _LINUX_SELINUX_H */
+#endif /* _LINUX_NSALINUX_H */
include/net/netlabel.h +1 -1
index 7b5a300..b201ac2 100644
@@ -148,7 +148,7 @@ struct netlbl_lsm_cache {
  * This structure is used to represent category bitmaps.  Due to the large
  * number of categories supported by most labeling protocols it is not
  * practical to transfer a full bitmap internally so NetLabel adopts a sparse
- * bitmap structure modeled after SELinux's ebitmap structure.
+ * bitmap structure modeled after NSALinux's ebitmap structure.
  * The catmap bitmap field MUST be a power of two in length and large
  * enough to hold at least 240 bits.  Special care (i.e. check the code!)
  * should be used when changing these values as the LSM implementation
include/uapi/linux/Kbuild +1 -1
index b71fd0b..c8204a6 100644
@@ -368,7 +368,7 @@ header-y += sctp.h
 header-y += sdla.h
 header-y += seccomp.h
 header-y += securebits.h
-header-y += selinux_netlink.h
+header-y += nsalinux_netlink.h
 header-y += sem.h
 header-y += serial_core.h
 header-y += serial.h
include/uapi/linux/audit.h +1 -1
index d820aa9..a5307cf 100644
@@ -113,7 +113,7 @@
 #define AUDIT_REPLACE		1329	/* Replace auditd if this packet unanswerd */
 
 #define AUDIT_AVC		1400	/* SE Linux avc denial or grant */
-#define AUDIT_SELINUX_ERR	1401	/* Internal SE Linux Errors */
+#define AUDIT_NSALINUX_ERR	1401	/* Internal SE Linux Errors */
 #define AUDIT_AVC_PATH		1402	/* dentry, vfsmount pair from avc */
 #define AUDIT_MAC_POLICY_LOAD	1403	/* Policy file load */
 #define AUDIT_MAC_STATUS	1404	/* Changed enforcing,permissive,off */
include/uapi/linux/magic.h +1 -1
index 0de181a..c2c341e 100644
@@ -10,7 +10,7 @@
 #define CRAMFS_MAGIC_WEND	0x453dcd28	/* magic number with the wrong endianess */
 #define DEBUGFS_MAGIC          0x64626720
 #define SECURITYFS_MAGIC	0x73636673
-#define SELINUX_MAGIC		0xf97cff8c
+#define NSALINUX_MAGIC		0xf97cff8c
 #define SMACK_MAGIC		0x43415d53	/* "SMAC" */
 #define RAMFS_MAGIC		0x858458f6	/* some random number */
 #define TMPFS_MAGIC		0x01021994
include/uapi/linux/netfilter/xt_SECMARK.h +1 -1
index 989092b..8636d3d 100644
@@ -10,7 +10,7 @@
  * 'mode' refers to the specific security subsystem which the
  * packets are being marked for.
  */
-#define SECMARK_MODE_SEL	0x01		/* SELinux */
+#define SECMARK_MODE_SEL	0x01		/* NSALinux */
 #define SECMARK_SECCTX_MAX	256
 
 struct xt_secmark_target_info {
include/uapi/linux/netfilter_ipv4.h +2 -2
index 91ddd1f..a986795 100644
@@ -58,14 +58,14 @@ enum nf_ip_hook_priorities {
 	NF_IP_PRI_FIRST = INT_MIN,
 	NF_IP_PRI_CONNTRACK_DEFRAG = -400,
 	NF_IP_PRI_RAW = -300,
-	NF_IP_PRI_SELINUX_FIRST = -225,
+	NF_IP_PRI_NSALINUX_FIRST = -225,
 	NF_IP_PRI_CONNTRACK = -200,
 	NF_IP_PRI_MANGLE = -150,
 	NF_IP_PRI_NAT_DST = -100,
 	NF_IP_PRI_FILTER = 0,
 	NF_IP_PRI_SECURITY = 50,
 	NF_IP_PRI_NAT_SRC = 100,
-	NF_IP_PRI_SELINUX_LAST = 225,
+	NF_IP_PRI_NSALINUX_LAST = 225,
 	NF_IP_PRI_CONNTRACK_HELPER = 300,
 	NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
 	NF_IP_PRI_LAST = INT_MAX,
include/uapi/linux/netfilter_ipv6.h +2 -2
index 12497c6..22c2c00 100644
@@ -63,14 +63,14 @@ enum nf_ip6_hook_priorities {
 	NF_IP6_PRI_FIRST = INT_MIN,
 	NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
 	NF_IP6_PRI_RAW = -300,
-	NF_IP6_PRI_SELINUX_FIRST = -225,
+	NF_IP6_PRI_NSALINUX_FIRST = -225,
 	NF_IP6_PRI_CONNTRACK = -200,
 	NF_IP6_PRI_MANGLE = -150,
 	NF_IP6_PRI_NAT_DST = -100,
 	NF_IP6_PRI_FILTER = 0,
 	NF_IP6_PRI_SECURITY = 50,
 	NF_IP6_PRI_NAT_SRC = 100,
-	NF_IP6_PRI_SELINUX_LAST = 225,
+	NF_IP6_PRI_NSALINUX_LAST = 225,
 	NF_IP6_PRI_CONNTRACK_HELPER = 300,
 	NF_IP6_PRI_LAST = INT_MAX,
 };
include/uapi/linux/netlink.h +1 -1
index 0dba4e4..9160cbe 100644
@@ -12,7 +12,7 @@
 #define NETLINK_SOCK_DIAG	4	/* socket monitoring				*/
 #define NETLINK_NFLOG		5	/* netfilter/iptables ULOG */
 #define NETLINK_XFRM		6	/* ipsec */
-#define NETLINK_SELINUX		7	/* SELinux event notifications */
+#define NETLINK_NSALINUX		7	/* NSALinux event notifications */
 #define NETLINK_ISCSI		8	/* Open-iSCSI */
 #define NETLINK_AUDIT		9	/* auditing */
 #define NETLINK_FIB_LOOKUP	10	
include/uapi/linux/nsalinux_netlink.h renamed from include/uapi/linux/selinux_netlink.h +5 -5
similarity index 84%
rename from include/uapi/linux/selinux_netlink.h
rename to include/uapi/linux/nsalinux_netlink.h
index d239797..e5baa6b 100644
@@ -1,5 +1,5 @@
 /*
- * Netlink event notifications for SELinux.
+ * Netlink event notifications for NSALinux.
  *
  * Author: James Morris <[email protected]>
  *
@@ -9,8 +9,8 @@
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
  */
-#ifndef _LINUX_SELINUX_NETLINK_H
-#define _LINUX_SELINUX_NETLINK_H
+#ifndef _LINUX_NSALINUX_NETLINK_H
+#define _LINUX_NSALINUX_NETLINK_H
 
 #include <linux/types.h>
 
@@ -29,7 +29,7 @@ enum {
 #define SELNL_GRP_ALL		0xffffffff
 #endif
 
-enum selinux_nlgroups {
+enum nsalinux_nlgroups {
 	SELNLGRP_NONE,
 #define SELNLGRP_NONE	SELNLGRP_NONE
 	SELNLGRP_AVC,
@@ -47,4 +47,4 @@ struct selnl_msg_policyload {
 	__u32	seqno;
 };
 
-#endif /* _LINUX_SELINUX_NETLINK_H */
+#endif /* _LINUX_NSALINUX_NETLINK_H */
include/uapi/linux/pfkeyv2.h +1 -1
index ada7f01..7b95e12 100644
@@ -220,7 +220,7 @@ struct sadb_x_nat_t_port {
 struct sadb_x_sec_ctx {
 	__u16	sadb_x_sec_len;
 	__u16	sadb_x_sec_exttype;
-	__u8		sadb_x_ctx_alg;  /* LSMs: e.g., selinux == 1 */
+	__u8		sadb_x_ctx_alg;  /* LSMs: e.g., nsalinux == 1 */
 	__u8		sadb_x_ctx_doi;
 	__u16	sadb_x_ctx_len;
 } __attribute__((packed));
include/uapi/linux/prctl.h +1 -1
index a8d0759..8b434ba 100644
@@ -166,7 +166,7 @@ struct prctl_mm_map {
  * capset, etc.) will still work.  Drop those privileges if you want them gone.
  *
  * Changing LSM security domain is considered a new privilege.  So, for example,
- * asking selinux for a specific new context (e.g. with runcon) will result
+ * asking nsalinux for a specific new context (e.g. with runcon) will result
  * in execve returning -EPERM.
  *
  * See Documentation/prctl/no_new_privs.txt for more details.
include/uapi/linux/xattr.h +2 -2
index 1590c49..993c8b8 100644
@@ -49,8 +49,8 @@
 #define XATTR_IMA_SUFFIX "ima"
 #define XATTR_NAME_IMA XATTR_SECURITY_PREFIX XATTR_IMA_SUFFIX
 
-#define XATTR_SELINUX_SUFFIX "selinux"
-#define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX
+#define XATTR_NSALINUX_SUFFIX "nsalinux"
+#define XATTR_NAME_NSALINUX XATTR_SECURITY_PREFIX XATTR_NSALINUX_SUFFIX
 
 #define XATTR_SMACK_SUFFIX "SMACK64"
 #define XATTR_SMACK_IPIN "SMACK64IPIN"
include/uapi/linux/xfrm.h +2 -2
index 2cd9e60..9ed9bcd 100644
@@ -41,7 +41,7 @@ struct xfrm_sec_ctx {
 
 /* Security Context Algorithms */
 #define XFRM_SC_ALG_RESERVED 0
-#define XFRM_SC_ALG_SELINUX 1
+#define XFRM_SC_ALG_NSALINUX 1
 
 /* Selector, used as selector both on policy rules (SPD) and SAs. */
 
@@ -227,7 +227,7 @@ enum {
 struct xfrm_user_sec_ctx {
 	__u16			len;
 	__u16			exttype;
-	__u8			ctx_alg;  /* LSMs: e.g., selinux == 1 */
+	__u8			ctx_alg;  /* LSMs: e.g., nsalinux == 1 */
 	__u8			ctx_doi;
 	__u16			ctx_len;
 };
init/Kconfig +1 -1
index e0d2616..8025b4a 100644
@@ -298,7 +298,7 @@ config AUDIT
 	depends on NET
 	help
 	  Enable auditing infrastructure that can be used with another
-	  kernel subsystem, such as SELinux (which requires this for
+	  kernel subsystem, such as NSALinux (which requires this for
 	  logging of avc messages output).  System call auditing is included
 	  on architectures which support it.
 
kernel/audit.c +3 -3
index 678c3f0..4ea612b 100644
@@ -1,5 +1,5 @@
 /* audit.c -- Auditing support
- * Gateway between the kernel (e.g., selinux) and the user-space audit daemon.
+ * Gateway between the kernel (e.g., nsalinux) and the user-space audit daemon.
  * System-call specific features have moved to auditsc.c
  *
  * Copyright 2003-2007 Red Hat Inc., Durham, North Carolina.
@@ -2034,12 +2034,12 @@ void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
 
 #ifdef CONFIG_SECURITY
 /**
- * audit_log_secctx - Converts and logs SELinux context
+ * audit_log_secctx - Converts and logs NSALinux context
  * @ab: audit_buffer
  * @secid: security number
  *
  * This is a helper function that calls security_secid_to_secctx to convert
- * secid to secctx and then adds the (converted) SELinux context to the audit
+ * secid to secctx and then adds the (converted) NSALinux context to the audit
  * log by calling audit_log_format, thus also preventing leak of internal secid
  * to userspace. If secid cannot be converted audit_panic is called.
  */
kernel/audit.h +1 -1
index cbbe6bb..fef7b9c 100644
@@ -250,7 +250,7 @@ struct audit_net {
 	struct sock *nlsk;
 };
 
-extern int selinux_audit_rule_update(void);
+extern int nsalinux_audit_rule_update(void);
 
 extern struct mutex audit_filter_mutex;
 extern int audit_del_rule(struct audit_entry *);
kernel/cred.c +2 -2
index 0c0cd8a..fb1a50b 100644
@@ -701,12 +701,12 @@ bool creds_are_invalid(const struct cred *cred)
 {
 	if (cred->magic != CRED_MAGIC)
 		return true;
-#ifdef CONFIG_SECURITY_SELINUX
+#ifdef CONFIG_SECURITY_NSALINUX
 	/*
 	 * cred->security == NULL if security_cred_alloc_blank() or
 	 * security_prepare_creds() returned an error.
 	 */
-	if (selinux_is_enabled() && cred->security) {
+	if (nsalinux_is_enabled() && cred->security) {
 		if ((unsigned long) cred->security < PAGE_SIZE)
 			return true;
 		if ((*(u32 *)cred->security & 0xffffff00) ==
lib/Kconfig.debug +1 -1
index 1e9a607..a6a005d 100644
@@ -1246,7 +1246,7 @@ config DEBUG_CREDENTIALS
 	  see that this number never exceeds the usage count of the cred
 	  struct.
 
-	  Furthermore, if SELinux is enabled, this also checks that the
+	  Furthermore, if NSALinux is enabled, this also checks that the
 	  security pointer in the cred struct is never seen to be invalid.
 
 	  If unsure, say N.
lib/is_single_threaded.c +1 -1
index 391fd23..4a918e9 100644
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells ([email protected])
- * - Derived from security/selinux/hooks.c
+ * - Derived from security/nsalinux/hooks.c
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public Licence
mm/shmem.c +1 -1
index 9428c51..01641f3 100644
@@ -3456,7 +3456,7 @@ int shmem_zero_setup(struct vm_area_struct *vma)
 
 	/*
 	 * Cloning a new file under mmap_sem leads to a lock ordering conflict
-	 * between XFS directory reading and selinux: since this file is only
+	 * between XFS directory reading and nsalinux: since this file is only
 	 * accessible to the user through its mapping, use S_PRIVATE flag to
 	 * bypass file security, in the same way as shmem_kernel_file_setup().
 	 */
net/netlabel/netlabel_domainhash.c +1 -1
index ada6742..0c6fa19 100644
@@ -119,7 +119,7 @@ static u32 netlbl_domhsh_hash(const char *key)
 	u32 len;
 
 	/* This is taken (with slight modification) from
-	 * security/selinux/ss/symtab.c:symhash() */
+	 * security/nsalinux/ss/symtab.c:symhash() */
 
 	for (iter = 0, val = 0, len = strlen(key); iter < len; iter++)
 		val = (val << 4 | (val >> (8 * sizeof(u32) - 4))) ^ key[iter];
scripts/Makefile +1 -1
index 822ab4a..0fd8fc6 100644
@@ -42,7 +42,7 @@ build_check-lc_ctype: $(obj)/check-lc_ctype
 
 subdir-$(CONFIG_MODVERSIONS) += genksyms
 subdir-y                     += mod
-subdir-$(CONFIG_SECURITY_SELINUX) += selinux
+subdir-$(CONFIG_SECURITY_NSALINUX) += nsalinux
 subdir-$(CONFIG_DTC)         += dtc
 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
 
scripts/nsalinux/Makefile renamed from scripts/selinux/Makefile +0 -0
similarity index 100%
rename from scripts/selinux/Makefile
rename to scripts/nsalinux/Makefile
scripts/nsalinux/README new file +2 -0
new file mode 100644
index 0000000..dd501d3
@@ -0,0 +1,2 @@
+Please see Documentation/security/NSALinux.txt for information on
+installing a dummy NSALinux policy.
scripts/nsalinux/genheaders/.gitignore renamed from scripts/selinux/genheaders/.gitignore +0 -0
similarity index 100%
rename from scripts/selinux/genheaders/.gitignore
rename to scripts/nsalinux/genheaders/.gitignore
scripts/nsalinux/genheaders/Makefile renamed from scripts/selinux/genheaders/Makefile +1 -1
similarity index 52%
rename from scripts/selinux/genheaders/Makefile
rename to scripts/nsalinux/genheaders/Makefile
index 1d1ac51..2a99775 100644
@@ -1,4 +1,4 @@
 hostprogs-y	:= genheaders
-HOST_EXTRACFLAGS += -Isecurity/selinux/include
+HOST_EXTRACFLAGS += -Isecurity/nsalinux/include
 
 always		:= $(hostprogs-y)
scripts/nsalinux/genheaders/genheaders.c renamed from scripts/selinux/genheaders/genheaders.c +2 -2
similarity index 95%
rename from scripts/selinux/genheaders/genheaders.c
rename to scripts/nsalinux/genheaders/genheaders.c
index 539855f..7210769 100644
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
 		initial_sid_to_string[i] = stoupperx(initial_sid_to_string[i]);
 
 	fprintf(fout, "/* This file is automatically generated.  Do not edit. */\n");
-	fprintf(fout, "#ifndef _SELINUX_FLASK_H_\n#define _SELINUX_FLASK_H_\n\n");
+	fprintf(fout, "#ifndef _NSALINUX_FLASK_H_\n#define _NSALINUX_FLASK_H_\n\n");
 
 	for (i = 0; secclass_map[i].name; i++) {
 		struct security_class_mapping *map = &secclass_map[i];
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
 	}
 
 	fprintf(fout, "/* This file is automatically generated.  Do not edit. */\n");
-	fprintf(fout, "#ifndef _SELINUX_AV_PERMISSIONS_H_\n#define _SELINUX_AV_PERMISSIONS_H_\n\n");
+	fprintf(fout, "#ifndef _NSALINUX_AV_PERMISSIONS_H_\n#define _NSALINUX_AV_PERMISSIONS_H_\n\n");
 
 	for (i = 0; secclass_map[i].name; i++) {
 		struct security_class_mapping *map = &secclass_map[i];
scripts/nsalinux/install_policy.sh renamed from scripts/selinux/install_policy.sh +21 -21

73 lines not on this page · raw message

scripts/nsalinux/mdp/.gitignore renamed from scripts/selinux/mdp/.gitignore +0 -0
similarity index 100%
rename from scripts/selinux/mdp/.gitignore
rename to scripts/nsalinux/mdp/.gitignore
scripts/nsalinux/mdp/Makefile renamed from scripts/selinux/mdp/Makefile +1 -1
similarity index 63%
rename from scripts/selinux/mdp/Makefile
rename to scripts/nsalinux/mdp/Makefile
index dba7eff..c66f30d 100644
@@ -1,5 +1,5 @@
 hostprogs-y	:= mdp
-HOST_EXTRACFLAGS += -Isecurity/selinux/include
+HOST_EXTRACFLAGS += -Isecurity/nsalinux/include
 
 always		:= $(hostprogs-y)
 clean-files	:= policy.* file_contexts
scripts/nsalinux/mdp/dbus_contexts renamed from scripts/selinux/mdp/dbus_contexts +2 -2
similarity index 86%
rename from scripts/selinux/mdp/dbus_contexts
rename to scripts/nsalinux/mdp/dbus_contexts
index 116e684..86e49fb 100644
@@ -1,6 +1,6 @@
 <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig>
-  <selinux>
-  </selinux>
+  <nsalinux>
+  </nsalinux>
 </busconfig>
scripts/nsalinux/mdp/mdp.c renamed from scripts/selinux/mdp/mdp.c +0 -0
similarity index 100%
rename from scripts/selinux/mdp/mdp.c
rename to scripts/nsalinux/mdp/mdp.c
scripts/selinux/README deleted +0 -2
deleted file mode 100644
index 4d020ec..0000000
@@ -1,2 +0,0 @@
-Please see Documentation/security/SELinux.txt for information on
-installing a dummy SELinux policy.
security/Kconfig +7 -7
index e452378..0b2973d 100644
@@ -36,7 +36,7 @@ config SECURITYFS
 	help
 	  This will build the securityfs filesystem.  It is currently used by
 	  the TPM bios character driver and IMA, an integrity provider.  It is
-	  not used by SELinux or SMACK.
+	  not used by NSALinux or SMACK.
 
 	  If you are unsure how to answer this question, answer N.
 
@@ -103,7 +103,7 @@ config INTEL_TXT
 
 config LSM_MMAP_MIN_ADDR
 	int "Low address space for LSM to protect from user allocation"
-	depends on SECURITY && SECURITY_SELINUX
+	depends on SECURITY && SECURITY_NSALINUX
 	default 32768 if ARM || (ARM64 && COMPAT)
 	default 65536
 	help
@@ -118,7 +118,7 @@ config LSM_MMAP_MIN_ADDR
 	  this low address space will need the permission specific to the
 	  systems running LSM.
 
-source security/selinux/Kconfig
+source security/nsalinux/Kconfig
 source security/smack/Kconfig
 source security/tomoyo/Kconfig
 source security/apparmor/Kconfig
@@ -128,7 +128,7 @@ source security/integrity/Kconfig
 
 choice
 	prompt "Default security module"
-	default DEFAULT_SECURITY_SELINUX if SECURITY_SELINUX
+	default DEFAULT_SECURITY_NSALINUX if SECURITY_NSALINUX
 	default DEFAULT_SECURITY_SMACK if SECURITY_SMACK
 	default DEFAULT_SECURITY_TOMOYO if SECURITY_TOMOYO
 	default DEFAULT_SECURITY_APPARMOR if SECURITY_APPARMOR
@@ -138,8 +138,8 @@ choice
 	  Select the security module that will be used by default if the
 	  kernel parameter security= is not specified.
 
-	config DEFAULT_SECURITY_SELINUX
-		bool "SELinux" if SECURITY_SELINUX=y
+	config DEFAULT_SECURITY_NSALINUX
+		bool "NSALinux" if SECURITY_NSALINUX=y
 
 	config DEFAULT_SECURITY_SMACK
 		bool "Simplified Mandatory Access Control" if SECURITY_SMACK=y
@@ -157,7 +157,7 @@ endchoice
 
 config DEFAULT_SECURITY
 	string
-	default "selinux" if DEFAULT_SECURITY_SELINUX
+	default "nsalinux" if DEFAULT_SECURITY_NSALINUX
 	default "smack" if DEFAULT_SECURITY_SMACK
 	default "tomoyo" if DEFAULT_SECURITY_TOMOYO
 	default "apparmor" if DEFAULT_SECURITY_APPARMOR
security/Makefile +2 -2
index c9bfbc8..5323ecd 100644
@@ -3,7 +3,7 @@
 #
 
 obj-$(CONFIG_KEYS)			+= keys/
-subdir-$(CONFIG_SECURITY_SELINUX)	+= selinux
+subdir-$(CONFIG_SECURITY_NSALINUX)	+= nsalinux
 subdir-$(CONFIG_SECURITY_SMACK)		+= smack
 subdir-$(CONFIG_SECURITY_TOMOYO)        += tomoyo
 subdir-$(CONFIG_SECURITY_APPARMOR)	+= apparmor
@@ -16,7 +16,7 @@ obj-$(CONFIG_MMU)			+= min_addr.o
 # Object file lists
 obj-$(CONFIG_SECURITY)			+= security.o
 obj-$(CONFIG_SECURITYFS)		+= inode.o
-obj-$(CONFIG_SECURITY_SELINUX)		+= selinux/
+obj-$(CONFIG_SECURITY_NSALINUX)		+= nsalinux/
 obj-$(CONFIG_SECURITY_SMACK)		+= smack/
 obj-$(CONFIG_AUDIT)			+= lsm_audit.o
 obj-$(CONFIG_SECURITY_TOMOYO)		+= tomoyo/
security/integrity/evm/Kconfig +1 -1
index e825e0a..08200ec 100644
@@ -32,7 +32,7 @@ config EVM_EXTRA_SMACK_XATTRS
 	help
 	  Include additional SMACK xattrs for HMAC calculation.
 
-	  In addition to the original security xattrs (eg. security.selinux,
+	  In addition to the original security xattrs (eg. security.nsalinux,
 	  security.SMACK64, security.capability, and security.ima) included
 	  in the HMAC calculation, enabling this option includes newly defined
 	  Smack xattrs: security.SMACK64EXEC, security.SMACK64TRANSMUTE and
security/integrity/evm/evm_main.c +2 -2
index e6ea9d4..bc0a87c 100644
@@ -36,8 +36,8 @@ char *evm_hash = "sha1";
 int evm_hmac_attrs;
 
 char *evm_config_xattrnames[] = {
-#ifdef CONFIG_SECURITY_SELINUX
-	XATTR_NAME_SELINUX,
+#ifdef CONFIG_SECURITY_NSALINUX
+	XATTR_NAME_NSALINUX,
 #endif
 #ifdef CONFIG_SECURITY_SMACK
 	XATTR_NAME_SMACK,
security/integrity/ima/Kconfig +1 -1
index e54a8a8..45e8277 100644
@@ -39,7 +39,7 @@ config IMA_MEASURE_PCR_IDX
 
 config IMA_LSM_RULES
 	bool
-	depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
+	depends on IMA && AUDIT && (SECURITY_NSALINUX || SECURITY_SMACK)
 	default y
 	help
 	  Disabling this option will disregard LSM based policy rules.
security/integrity/ima/ima_policy.c +2 -2
index be09e2c..0cfb998 100644
@@ -86,7 +86,7 @@ static struct ima_rule_entry dont_measure_rules[] = {
 	{.action = DONT_MEASURE, .fsmagic = DEVPTS_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = BINFMTFS_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = SECURITYFS_MAGIC, .flags = IMA_FSMAGIC},
-	{.action = DONT_MEASURE, .fsmagic = SELINUX_MAGIC, .flags = IMA_FSMAGIC},
+	{.action = DONT_MEASURE, .fsmagic = NSALINUX_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = CGROUP_SUPER_MAGIC,
 	 .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = NSFS_MAGIC, .flags = IMA_FSMAGIC}
@@ -126,7 +126,7 @@ static struct ima_rule_entry default_appraise_rules[] = {
 	{.action = DONT_APPRAISE, .fsmagic = DEVPTS_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = BINFMTFS_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = SECURITYFS_MAGIC, .flags = IMA_FSMAGIC},
-	{.action = DONT_APPRAISE, .fsmagic = SELINUX_MAGIC, .flags = IMA_FSMAGIC},
+	{.action = DONT_APPRAISE, .fsmagic = NSALINUX_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = NSFS_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = CGROUP_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 #ifdef CONFIG_IMA_WRITE_POLICY
security/lsm_audit.c +1 -1
index cccbf30..5f8c7a3 100644
@@ -1,7 +1,7 @@
 /*
  * common LSM auditing functions
  *
- * Based on code written for SELinux by :
+ * Based on code written for NSALinux by :
  *			Stephen Smalley, <[email protected]>
  * 			James Morris <[email protected]>
  * Author : Etienne Basset, <[email protected]>
security/nsalinux/.gitignore renamed from security/selinux/.gitignore +0 -0
similarity index 100%
rename from security/selinux/.gitignore
rename to security/nsalinux/.gitignore
security/nsalinux/Kconfig renamed from security/selinux/Kconfig +54 -54

181 lines not on this page · raw message

security/nsalinux/Makefile renamed from security/selinux/Makefile +8 -8
similarity index 41%
rename from security/selinux/Makefile
rename to security/nsalinux/Makefile
index 3411c33..dd6d724 100644
@@ -1,24 +1,24 @@
 #
-# Makefile for building the SELinux module as part of the kernel tree.
+# Makefile for building the NSALinux module as part of the kernel tree.
 #
 
-obj-$(CONFIG_SECURITY_SELINUX) := selinux.o
+obj-$(CONFIG_SECURITY_NSALINUX) := nsalinux.o
 
-selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \
+nsalinux-y := avc.o hooks.o nsalinuxfs.o netlink.o nlmsgtab.o netif.o \
 	     netnode.o netport.o exports.o \
 	     ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \
 	     ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o
 
-selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
+nsalinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
 
-selinux-$(CONFIG_NETLABEL) += netlabel.o
+nsalinux-$(CONFIG_NETLABEL) += netlabel.o
 
-ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
+ccflags-y := -I$(srctree)/security/nsalinux -I$(srctree)/security/nsalinux/include
 
-$(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
+$(addprefix $(obj)/,$(nsalinux-y)): $(obj)/flask.h
 
 quiet_cmd_flask = GEN     $(obj)/flask.h $(obj)/av_permissions.h
-      cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
+      cmd_flask = scripts/nsalinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
 
 targets += flask.h av_permissions.h
 $(obj)/flask.h: $(src)/include/classmap.h FORCE
security/nsalinux/avc.c renamed from security/selinux/avc.c +17 -17
similarity index 97%
rename from security/selinux/avc.c
rename to security/nsalinux/avc.c
index e60c79d..19a3a48 100644
@@ -38,7 +38,7 @@
 #define AVC_DEF_CACHE_THRESHOLD		512
 #define AVC_CACHE_RECLAIM		16
 
-#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+#ifdef CONFIG_SECURITY_NSALINUX_AVC_STATS
 #define avc_cache_stats_incr(field)	this_cpu_inc(avc_cache_stats.field)
 #else
 #define avc_cache_stats_incr(field)	do {} while (0)
@@ -85,7 +85,7 @@ struct avc_callback_node {
 /* Exported via selinufs */
 unsigned int avc_cache_threshold = AVC_DEF_CACHE_THRESHOLD;
 
-#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+#ifdef CONFIG_SECURITY_NSALINUX_AVC_STATS
 DEFINE_PER_CPU(struct avc_cache_stats, avc_cache_stats) = { 0 };
 #endif
 
@@ -627,7 +627,7 @@ static int avc_latest_notif_update(int seqno, int is_insert)
 	spin_lock_irqsave(&notif_lock, flag);
 	if (is_insert) {
 		if (seqno < avc_cache.latest_notif) {
-			printk(KERN_WARNING "SELinux: avc:  seqno %d < latest_notif %d\n",
+			printk(KERN_WARNING "NSALinux: avc:  seqno %d < latest_notif %d\n",
 			       seqno, avc_cache.latest_notif);
 			ret = -EAGAIN;
 		}
@@ -703,7 +703,7 @@ out:
 }
 
 /**
- * avc_audit_pre_callback - SELinux specific information
+ * avc_audit_pre_callback - NSALinux specific information
  * will be called by generic audit code
  * @ab: the audit buffer
  * @a: audit_data
@@ -712,14 +712,14 @@ static void avc_audit_pre_callback(struct audit_buffer *ab, void *a)
 {
 	struct common_audit_data *ad = a;
 	audit_log_format(ab, "avc:  %s ",
-			 ad->selinux_audit_data->denied ? "denied" : "granted");
-	avc_dump_av(ab, ad->selinux_audit_data->tclass,
-			ad->selinux_audit_data->audited);
+			 ad->nsalinux_audit_data->denied ? "denied" : "granted");
+	avc_dump_av(ab, ad->nsalinux_audit_data->tclass,
+			ad->nsalinux_audit_data->audited);
 	audit_log_format(ab, " for ");
 }
 
 /**
- * avc_audit_post_callback - SELinux specific information
+ * avc_audit_post_callback - NSALinux specific information
  * will be called by generic audit code
  * @ab: the audit buffer
  * @a: audit_data
@@ -728,12 +728,12 @@ static void avc_audit_post_callback(struct audit_buffer *ab, void *a)
 {
 	struct common_audit_data *ad = a;
 	audit_log_format(ab, " ");
-	avc_dump_query(ab, ad->selinux_audit_data->ssid,
-			   ad->selinux_audit_data->tsid,
-			   ad->selinux_audit_data->tclass);
-	if (ad->selinux_audit_data->denied) {
+	avc_dump_query(ab, ad->nsalinux_audit_data->ssid,
+			   ad->nsalinux_audit_data->tsid,
+			   ad->nsalinux_audit_data->tclass);
+	if (ad->nsalinux_audit_data->denied) {
 		audit_log_format(ab, " permissive=%u",
-				 ad->selinux_audit_data->result ? 0 : 1);
+				 ad->nsalinux_audit_data->result ? 0 : 1);
 	}
 }
 
@@ -744,7 +744,7 @@ noinline int slow_avc_audit(u32 ssid, u32 tsid, u16 tclass,
 		unsigned flags)
 {
 	struct common_audit_data stack_data;
-	struct selinux_audit_data sad;
+	struct nsalinux_audit_data sad;
 
 	if (!a) {
 		a = &stack_data;
@@ -770,7 +770,7 @@ noinline int slow_avc_audit(u32 ssid, u32 tsid, u16 tclass,
 	sad.denied = denied;
 	sad.result = result;
 
-	a->selinux_audit_data = &sad;
+	a->nsalinux_audit_data = &sad;
 
 	common_lsm_audit(a, avc_audit_pre_callback, avc_audit_post_callback);
 	return 0;
@@ -986,7 +986,7 @@ static noinline int avc_denied(u32 ssid, u32 tsid,
 	if (flags & AVC_STRICT)
 		return -EACCES;
 
-	if (selinux_enforcing && !(avd->flags & AVD_FLAGS_PERMISSIVE))
+	if (nsalinux_enforcing && !(avd->flags & AVD_FLAGS_PERMISSIVE))
 		return -EACCES;
 
 	avc_update_node(AVC_CALLBACK_GRANT, requested, driver, xperm, ssid,
@@ -1181,7 +1181,7 @@ void avc_disable(void)
 	 * not destroying the avc_node_cachep it might be easy to fix, but
 	 * I don't know the memory barrier semantics well enough to know.  It's
 	 * possible that some other task dereferenced security_ops when
-	 * it still pointed to selinux operations.  If that is the case it's
+	 * it still pointed to nsalinux operations.  If that is the case it's
 	 * possible that it is about to use the avc and is about to need the
 	 * avc_node_cachep.  I know I could wrap the security.c security_ops call
 	 * in an rcu_lock, but seriously, it's not worth it.  Instead I just flush
security/nsalinux/exports.c renamed from security/selinux/exports.c +5 -5
similarity index 74%
rename from security/selinux/exports.c
rename to security/nsalinux/exports.c
index e75dd94..73a01e9 100644
@@ -1,5 +1,5 @@
 /*
- * SELinux services exported to the rest of the kernel.
+ * NSALinux services exported to the rest of the kernel.
  *
  * Author: James Morris <[email protected]>
  *
@@ -12,12 +12,12 @@
  * as published by the Free Software Foundation.
  */
 #include <linux/module.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 
 #include "security.h"
 
-bool selinux_is_enabled(void)
+bool nsalinux_is_enabled(void)
 {
-	return selinux_enabled;
+	return nsalinux_enabled;
 }
-EXPORT_SYMBOL_GPL(selinux_is_enabled);
+EXPORT_SYMBOL_GPL(nsalinux_is_enabled);
security/nsalinux/hooks.c renamed from security/selinux/hooks.c +611 -611

1,363 lines not on this page · raw message

security/nsalinux/include/audit.h renamed from security/selinux/include/audit.h +15 -15
similarity index 62%
rename from security/selinux/include/audit.h
rename to security/nsalinux/include/audit.h
index 1bdf973..aab8c7c 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/avc.h renamed from security/selinux/include/avc.h +9 -9
similarity index 94%
rename from security/selinux/include/avc.h
rename to security/nsalinux/include/avc.h
index 0999df0..e7e2880 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/avc_ss.h renamed from security/selinux/include/avc_ss.h +3 -3
similarity index 84%
rename from security/selinux/include/avc_ss.h
rename to security/nsalinux/include/avc_ss.h
index d5c3284..13b2fc5 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/classmap.h renamed from security/selinux/include/classmap.h +1 -1
similarity index 99%
rename from security/selinux/include/classmap.h
rename to security/nsalinux/include/classmap.h
index ef83c4b..40d2a93 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/conditional.h renamed from security/selinux/include/conditional.h +3 -3
similarity index 85%
rename from security/selinux/include/conditional.h
rename to security/nsalinux/include/conditional.h
index 67ce7a8..2cd22cd 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/initial_sid_to_string.h renamed from security/selinux/include/initial_sid_to_string.h +0 -0
similarity index 100%
rename from security/selinux/include/initial_sid_to_string.h
rename to security/nsalinux/include/initial_sid_to_string.h
security/nsalinux/include/netif.h renamed from security/selinux/include/netif.h +3 -3
similarity index 89%
rename from security/selinux/include/netif.h
rename to security/nsalinux/include/netif.h
index c721454..8316c05 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/netlabel.h renamed from security/selinux/include/netlabel.h +28 -28

56 lines not on this page · raw message

security/nsalinux/include/netnode.h renamed from security/selinux/include/netnode.h +3 -3
similarity index 87%
rename from security/selinux/include/netnode.h
rename to security/nsalinux/include/netnode.h
index 937668d..be77a6b 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/netport.h renamed from security/selinux/include/netport.h +3 -3
similarity index 86%
rename from security/selinux/include/netport.h
rename to security/nsalinux/include/netport.h
index d1ce896..e402266 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/objsec.h renamed from security/selinux/include/objsec.h +6 -6
similarity index 92%
rename from security/selinux/include/objsec.h
rename to security/nsalinux/include/objsec.h
index a2ae054..da888c5 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/security.h renamed from security/selinux/include/security.h +20 -20
similarity index 88%
rename from security/selinux/include/security.h
rename to security/nsalinux/include/security.h
index 38feb55..85731f7 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/xfrm.h renamed from security/selinux/include/xfrm.h +28 -28

56 lines not on this page · raw message

security/nsalinux/netif.c renamed from security/selinux/netif.c +3 -3
similarity index 98%
rename from security/selinux/netif.c
rename to security/nsalinux/netif.c
index e607b44..f929ca1 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netlabel.c renamed from security/selinux/netlabel.c +39 -39

78 lines not on this page · raw message

security/nsalinux/netlink.c renamed from security/selinux/netlink.c +5 -5
similarity index 89%
rename from security/selinux/netlink.c
rename to security/nsalinux/netlink.c
index 828fb6a..a3e94ff 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netnode.c renamed from security/selinux/netnode.c +4 -4
similarity index 97%
rename from security/selinux/netnode.c
rename to security/nsalinux/netnode.c
index da923f8..0d65209 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netport.c renamed from security/selinux/netport.c +4 -4
similarity index 96%
rename from security/selinux/netport.c
rename to security/nsalinux/netport.c
index 3311cc3..f4dead9 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/nlmsgtab.c renamed from security/selinux/nlmsgtab.c +1 -1
similarity index 99%
rename from security/selinux/nlmsgtab.c
rename to security/nsalinux/nlmsgtab.c
index 8495b93..4c9fffb 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/nsalinuxfs.c renamed from security/selinux/selinuxfs.c +45 -45

90 lines not on this page · raw message

security/nsalinux/ss/avtab.c renamed from security/selinux/ss/avtab.c +25 -25

50 lines not on this page · raw message

security/nsalinux/ss/avtab.h renamed from security/selinux/ss/avtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/avtab.h
rename to security/nsalinux/ss/avtab.h
security/nsalinux/ss/conditional.c renamed from security/selinux/ss/conditional.c +8 -8
similarity index 95%
rename from security/selinux/ss/conditional.c
rename to security/nsalinux/ss/conditional.c
index 456e1a9..478fa21 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/conditional.h renamed from security/selinux/ss/conditional.h +0 -0
similarity index 100%
rename from security/selinux/ss/conditional.h
rename to security/nsalinux/ss/conditional.h
security/nsalinux/ss/constraint.h renamed from security/selinux/ss/constraint.h +0 -0
similarity index 100%
rename from security/selinux/ss/constraint.h
rename to security/nsalinux/ss/constraint.h
security/nsalinux/ss/context.h renamed from security/selinux/ss/context.h +0 -0
similarity index 100%
rename from security/selinux/ss/context.h
rename to security/nsalinux/ss/context.h
security/nsalinux/ss/ebitmap.c renamed from security/selinux/ss/ebitmap.c +9 -9
similarity index 94%
rename from security/selinux/ss/ebitmap.c
rename to security/nsalinux/ss/ebitmap.c
index 57644b1..fa25970 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/ebitmap.h renamed from security/selinux/ss/ebitmap.h +0 -0
similarity index 100%
rename from security/selinux/ss/ebitmap.h
rename to security/nsalinux/ss/ebitmap.h
security/nsalinux/ss/hashtab.c renamed from security/selinux/ss/hashtab.c +0 -0
similarity index 100%
rename from security/selinux/ss/hashtab.c
rename to security/nsalinux/ss/hashtab.c
security/nsalinux/ss/hashtab.h renamed from security/selinux/ss/hashtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/hashtab.h
rename to security/nsalinux/ss/hashtab.h
security/nsalinux/ss/mls.c renamed from security/selinux/ss/mls.c +1 -1
similarity index 99%
rename from security/selinux/ss/mls.c
rename to security/nsalinux/ss/mls.c
index e108884..7fe6606 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/mls.h renamed from security/selinux/ss/mls.h +0 -0
similarity index 100%
rename from security/selinux/ss/mls.h
rename to security/nsalinux/ss/mls.h
security/nsalinux/ss/mls_types.h renamed from security/selinux/ss/mls_types.h +0 -0
similarity index 100%
rename from security/selinux/ss/mls_types.h
rename to security/nsalinux/ss/mls_types.h
security/nsalinux/ss/policydb.c renamed from security/selinux/ss/policydb.c +38 -38

76 lines not on this page · raw message

security/nsalinux/ss/policydb.h renamed from security/selinux/ss/policydb.h +1 -1
similarity index 99%
rename from security/selinux/ss/policydb.h
rename to security/nsalinux/ss/policydb.h
index 725d594..a2d471f 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/services.c renamed from security/selinux/ss/services.c +90 -90

180 lines not on this page · raw message

security/nsalinux/ss/services.h renamed from security/selinux/ss/services.h +0 -0
similarity index 100%
rename from security/selinux/ss/services.h
rename to security/nsalinux/ss/services.h
security/nsalinux/ss/sidtab.c renamed from security/selinux/ss/sidtab.c +1 -1
similarity index 98%
rename from security/selinux/ss/sidtab.c
rename to security/nsalinux/ss/sidtab.c
index 5840a35..d3d05fe 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/sidtab.h renamed from security/selinux/ss/sidtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/sidtab.h
rename to security/nsalinux/ss/sidtab.h
security/nsalinux/ss/status.c renamed from security/selinux/ss/status.c +33 -33

66 lines not on this page · raw message

security/nsalinux/ss/symtab.c renamed from security/selinux/ss/symtab.c +0 -0
similarity index 100%
rename from security/selinux/ss/symtab.c
rename to security/nsalinux/ss/symtab.c
security/nsalinux/ss/symtab.h renamed from security/selinux/ss/symtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/symtab.h
rename to security/nsalinux/ss/symtab.h
security/nsalinux/xfrm.c renamed from security/selinux/xfrm.c +54 -54

108 lines not on this page · raw message

security/security.c +3 -3
index 3644b03..6531d8e 100644

Lines of this file are not shown. View the raw message.

security/smack/smack_lsm.c +3 -3
index 11f7901..016a527 100644

Lines of this file are not shown. View the raw message.

security/smack/smack_netfilter.c +2 -2
index aa6bf1b..81ed436 100644

Lines of this file are not shown. View the raw message.

security/smack/smackfs.c +1 -1
index e249a66..458c1b9 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/rcutorture/bin/functions.sh +1 -1
index b325470..09e6f77 100644

Lines of this file are not shown. View the raw message.

tools/usb/usbip/README +1 -1
index 831f49f..3ae72b3 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.9.5

Part of the diff is not shown here. View the raw message.

#1 lore raw
url: https://github.com/0day-ci/linux/commits/Pali-Roh-r/Security-Rename-SELinux-to-NSALinux/20160401-165437 reproduce:

Hi Pali,

[auto build test WARNING on v4.6-rc1]
[cannot apply to pcmoore-selinux/next next-20160401]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Pali-Roh-r/Security-Rename-SELinux-to-NSALinux/20160401-165437
reproduce:

        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__

sparse warnings: (new ones prefixed by >>)

include/linux/compiler.h:232:8: sparse: attribute 'no_sanitize_address': unknown attribute

>> security/nsalinux/netnode.c:177:24: sparse: incompatible types in comparison expression (different address spaces)
--
   include/linux/compiler.h:232:8: sparse: attribute 'no_sanitize_address': unknown attribute
>> security/nsalinux/netport.c:125:24: sparse: incompatible types in comparison expression (different address spaces)

vim +177 security/nsalinux/netnode.c

224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  161  	case PF_INET:
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  162  		idx = sel_netnode_hashfn_ipv4(node->nsec.addr.ipv4);
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  163  		break;
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  164  	case PF_INET6:
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  165  		idx = sel_netnode_hashfn_ipv6(&node->nsec.addr.ipv6);
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  166  		break;
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  167  	default:
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  168  		BUG();
b04eea886 security/selinux/netnode.c Paul Moore    2013-07-23  169  		return;
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  170  	}
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  171  
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  172  	/* we need to impose a limit on the growth of the hash table so check
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  173  	 * this bucket to make sure it is within the specified bounds */
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  174  	list_add_rcu(&node->list, &sel_netnode_hash[idx].list);
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  175  	if (sel_netnode_hash[idx].size == SEL_NETNODE_HASH_BKT_LIMIT) {
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  176  		struct sel_netnode *tail;
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25 @177  		tail = list_entry(
88a693b5c security/selinux/netnode.c Dave Jones    2012-11-08  178  			rcu_dereference_protected(sel_netnode_hash[idx].list.prev,
88a693b5c security/selinux/netnode.c Dave Jones    2012-11-08  179  						  lockdep_is_held(&sel_netnode_lock)),
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  180  			struct sel_netnode, list);
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  181  		list_del_rcu(&tail->list);
9801c60e9 security/selinux/netnode.c Lai Jiangshan 2011-03-18  182  		kfree_rcu(tail, rcu);
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  183  	} else
a639e7ca8 security/selinux/netnode.c Paul Moore    2008-04-25  184  		sel_netnode_hash[idx].size++;
224dfbd81 security/selinux/netnode.c Paul Moore    2008-01-29  185  }

:::::: The code at line 177 was first introduced by commit
:::::: a639e7ca8e8282b75be2724a28bfc788aa3bb156 SELinux: Made netnode cache adds faster

:::::: TO: Paul Moore <[email protected]>
:::::: CC: James Morris <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

maintainer
#2 lore raw
In reply to Pali Rohár
Quoted 8 lines · Pali Rohár

This patch helps NSA agents, so they will know easily which part of Linux kernel code and also which config options must be enabled for their "customer" kernel builds.

Patch also protects people aware of NSA activities, so they will know which part of kernel code comes from NSA and which should they disable or drop.

This patch should have been sent to the subsystem maintainer (Paul Moore), and the LSM and SELinux mail lists as an RFC before taking it to the LKML.

The proposed name change fails in its stated purpose in that it does not identify which nation the "N" refers to. To do that you would need to use USANSA instead of NSA. Remember that your understanding of an acronym is context dependent and that others will not map "NSA" to the United States National Security Agency.

I am generally in favor of naming things more descriptively than "Security Enhanced". In this case, the name has been in use for long enough that it is really hard to accept the notion that someone who is working in the code wouldn't know its history.

Or, have I just replied to an especially well done April 1st prank?

Quoted 9,287 lines
---
 CREDITS                                            |    2 +-
 Documentation/ABI/testing/ima_policy               |    4 +-
 Documentation/CodingStyle                          |    2 +-
 Documentation/DocBook/lsm.tmpl                     |    6 +-
 Documentation/RCU/RTFP.txt                         |    8 +-
 Documentation/cgroup-v1/cgroups.txt                |    2 +-
 Documentation/filesystems/caching/backend-api.txt  |    2 +-
 Documentation/filesystems/caching/cachefiles.txt   |   16 +-
 Documentation/filesystems/cifs/TODO                |    2 +-
 Documentation/filesystems/orangefs.txt             |    2 +-
 Documentation/filesystems/proc.txt                 |    2 +-
 Documentation/kernel-parameters.txt                |   20 +-
 Documentation/networking/secid.txt                 |    2 +-
 Documentation/security/00-INDEX                    |    4 +-
 Documentation/security/LSM.txt                     |    2 +-
 .../security/{SELinux.txt => NSALinux.txt}         |   18 +-
 Documentation/security/credentials.txt             |    4 +-
 Documentation/security/keys.txt                    |   12 +-
 Documentation/security/tomoyo.txt                  |    2 +-
 Documentation/zh_CN/CodingStyle                    |    2 +-
 MAINTAINERS                                        |    8 +-
 arch/mips/configs/bigsur_defconfig                 |    6 +-
 arch/mips/configs/loongson3_defconfig              |    6 +-
 arch/mips/configs/nlm_xlp_defconfig                |    8 +-
 arch/mips/configs/nlm_xlr_defconfig                |    8 +-
 arch/powerpc/configs/c2k_defconfig                 |    6 +-
 arch/powerpc/configs/ppc6xx_defconfig              |    6 +-
 arch/s390/configs/default_defconfig                |    8 +-
 arch/s390/configs/gcov_defconfig                   |    8 +-
 arch/s390/configs/performance_defconfig            |    8 +-
 arch/tile/configs/tilegx_defconfig                 |    6 +-
 arch/tile/configs/tilepro_defconfig                |    6 +-
 arch/x86/configs/i386_defconfig                    |    6 +-
 arch/x86/configs/x86_64_defconfig                  |    6 +-
 arch/xtensa/configs/iss_defconfig                  |    2 +-
 drivers/staging/lustre/lustre/llite/xattr.c        |   14 +-
 fs/9p/Kconfig                                      |    2 +-
 fs/btrfs/inode.c                                   |    8 +-
 fs/btrfs/super.c                                   |    2 +-
 fs/ext2/Kconfig                                    |    2 +-
 fs/ext4/Kconfig                                    |    2 +-
 fs/ext4/namei.c                                    |    2 +-
 fs/f2fs/Kconfig                                    |    2 +-
 fs/gfs2/inode.c                                    |    2 +-
 fs/jffs2/Kconfig                                   |    2 +-
 fs/jfs/Kconfig                                     |    2 +-
 fs/nfs/super.c                                     |    8 +-
 fs/nfsd/Kconfig                                    |    4 +-
 fs/reiserfs/Kconfig                                |    2 +-
 fs/reiserfs/xattr_security.c                       |    2 +-
 fs/xfs/xfs_iops.c                                  |    2 +-
 include/linux/cred.h                               |    2 +-
 include/linux/lsm_audit.h                          |    6 +-
 include/linux/lsm_hooks.h                          |    8 +-
 include/linux/{selinux.h => nsalinux.h}            |   20 +-
 include/net/netlabel.h                             |    2 +-
 include/uapi/linux/Kbuild                          |    2 +-
 include/uapi/linux/audit.h                         |    2 +-
 include/uapi/linux/magic.h                         |    2 +-
 include/uapi/linux/netfilter/xt_SECMARK.h          |    2 +-
 include/uapi/linux/netfilter_ipv4.h                |    4 +-
 include/uapi/linux/netfilter_ipv6.h                |    4 +-
 include/uapi/linux/netlink.h                       |    2 +-
 .../{selinux_netlink.h => nsalinux_netlink.h}      |   10 +-
 include/uapi/linux/pfkeyv2.h                       |    2 +-
 include/uapi/linux/prctl.h                         |    2 +-
 include/uapi/linux/xattr.h                         |    4 +-
 include/uapi/linux/xfrm.h                          |    4 +-
 init/Kconfig                                       |    2 +-
 kernel/audit.c                                     |    6 +-
 kernel/audit.h                                     |    2 +-
 kernel/cred.c                                      |    4 +-
 lib/Kconfig.debug                                  |    2 +-
 lib/is_single_threaded.c                           |    2 +-
 mm/shmem.c                                         |    2 +-
 net/netlabel/netlabel_domainhash.c                 |    2 +-
 scripts/Makefile                                   |    2 +-
 scripts/{selinux => nsalinux}/Makefile             |    0
 scripts/nsalinux/README                            |    2 +
 .../{selinux => nsalinux}/genheaders/.gitignore    |    0
 scripts/{selinux => nsalinux}/genheaders/Makefile  |    2 +-
 .../{selinux => nsalinux}/genheaders/genheaders.c  |    4 +-
 scripts/{selinux => nsalinux}/install_policy.sh    |   42 +-
 scripts/{selinux => nsalinux}/mdp/.gitignore       |    0
 scripts/{selinux => nsalinux}/mdp/Makefile         |    2 +-
 scripts/{selinux => nsalinux}/mdp/dbus_contexts    |    4 +-
 scripts/{selinux => nsalinux}/mdp/mdp.c            |    0
 scripts/selinux/README                             |    2 -
 security/Kconfig                                   |   14 +-
 security/Makefile                                  |    4 +-
 security/integrity/evm/Kconfig                     |    2 +-
 security/integrity/evm/evm_main.c                  |    4 +-
 security/integrity/ima/Kconfig                     |    2 +-
 security/integrity/ima/ima_policy.c                |    4 +-
 security/lsm_audit.c                               |    2 +-
 security/{selinux => nsalinux}/.gitignore          |    0
 security/{selinux => nsalinux}/Kconfig             |  108 +-
 security/{selinux => nsalinux}/Makefile            |   16 +-
 security/{selinux => nsalinux}/avc.c               |   34 +-
 security/{selinux => nsalinux}/exports.c           |   10 +-
 security/{selinux => nsalinux}/hooks.c             | 1222 ++++++++++----------
 security/{selinux => nsalinux}/include/audit.h     |   30 +-
 security/{selinux => nsalinux}/include/avc.h       |   18 +-
 security/{selinux => nsalinux}/include/avc_ss.h    |    6 +-
 security/{selinux => nsalinux}/include/classmap.h  |    2 +-
 .../{selinux => nsalinux}/include/conditional.h    |    6 +-
 .../include/initial_sid_to_string.h                |    0
 security/{selinux => nsalinux}/include/netif.h     |    6 +-
 security/{selinux => nsalinux}/include/netlabel.h  |   56 +-
 security/{selinux => nsalinux}/include/netnode.h   |    6 +-
 security/{selinux => nsalinux}/include/netport.h   |    6 +-
 security/{selinux => nsalinux}/include/objsec.h    |   12 +-
 security/{selinux => nsalinux}/include/security.h  |   40 +-
 security/{selinux => nsalinux}/include/xfrm.h      |   56 +-
 security/{selinux => nsalinux}/netif.c             |    6 +-
 security/{selinux => nsalinux}/netlabel.c          |   78 +-
 security/{selinux => nsalinux}/netlink.c           |   10 +-
 security/{selinux => nsalinux}/netnode.c           |    8 +-
 security/{selinux => nsalinux}/netport.c           |    8 +-
 security/{selinux => nsalinux}/nlmsgtab.c          |    2 +-
 .../{selinux/selinuxfs.c => nsalinux/nsalinuxfs.c} |   90 +-
 security/{selinux => nsalinux}/ss/avtab.c          |   50 +-
 security/{selinux => nsalinux}/ss/avtab.h          |    0
 security/{selinux => nsalinux}/ss/conditional.c    |   16 +-
 security/{selinux => nsalinux}/ss/conditional.h    |    0
 security/{selinux => nsalinux}/ss/constraint.h     |    0
 security/{selinux => nsalinux}/ss/context.h        |    0
 security/{selinux => nsalinux}/ss/ebitmap.c        |   18 +-
 security/{selinux => nsalinux}/ss/ebitmap.h        |    0
 security/{selinux => nsalinux}/ss/hashtab.c        |    0
 security/{selinux => nsalinux}/ss/hashtab.h        |    0
 security/{selinux => nsalinux}/ss/mls.c            |    2 +-
 security/{selinux => nsalinux}/ss/mls.h            |    0
 security/{selinux => nsalinux}/ss/mls_types.h      |    0
 security/{selinux => nsalinux}/ss/policydb.c       |   76 +-
 security/{selinux => nsalinux}/ss/policydb.h       |    2 +-
 security/{selinux => nsalinux}/ss/services.c       |  180 +--
 security/{selinux => nsalinux}/ss/services.h       |    0
 security/{selinux => nsalinux}/ss/sidtab.c         |    2 +-
 security/{selinux => nsalinux}/ss/sidtab.h         |    0
 security/{selinux => nsalinux}/ss/status.c         |   66 +-
 security/{selinux => nsalinux}/ss/symtab.c         |    0
 security/{selinux => nsalinux}/ss/symtab.h         |    0
 security/{selinux => nsalinux}/xfrm.c              |  108 +-
 security/security.c                                |    6 +-
 security/smack/smack_lsm.c                         |    6 +-
 security/smack/smack_netfilter.c                   |    4 +-
 security/smack/smackfs.c                           |    2 +-
 .../testing/selftests/rcutorture/bin/functions.sh  |    2 +-
 tools/usb/usbip/README                             |    2 +-
 150 files changed, 1420 insertions(+), 1420 deletions(-)
 rename Documentation/security/{SELinux.txt => NSALinux.txt} (58%)
 rename include/linux/{selinux.h => nsalinux.h} (60%)
 rename include/uapi/linux/{selinux_netlink.h => nsalinux_netlink.h} (84%)
 rename scripts/{selinux => nsalinux}/Makefile (100%)
 create mode 100644 scripts/nsalinux/README
 rename scripts/{selinux => nsalinux}/genheaders/.gitignore (100%)
 rename scripts/{selinux => nsalinux}/genheaders/Makefile (52%)
 rename scripts/{selinux => nsalinux}/genheaders/genheaders.c (95%)
 rename scripts/{selinux => nsalinux}/install_policy.sh (45%)
 rename scripts/{selinux => nsalinux}/mdp/.gitignore (100%)
 rename scripts/{selinux => nsalinux}/mdp/Makefile (63%)
 rename scripts/{selinux => nsalinux}/mdp/dbus_contexts (86%)
 rename scripts/{selinux => nsalinux}/mdp/mdp.c (100%)
 delete mode 100644 scripts/selinux/README
 rename security/{selinux => nsalinux}/.gitignore (100%)
 rename security/{selinux => nsalinux}/Kconfig (47%)
 rename security/{selinux => nsalinux}/Makefile (41%)
 rename security/{selinux => nsalinux}/avc.c (97%)
 rename security/{selinux => nsalinux}/exports.c (74%)
 rename security/{selinux => nsalinux}/hooks.c (78%)
 rename security/{selinux => nsalinux}/include/audit.h (62%)
 rename security/{selinux => nsalinux}/include/avc.h (94%)
 rename security/{selinux => nsalinux}/include/avc_ss.h (84%)
 rename security/{selinux => nsalinux}/include/classmap.h (99%)
 rename security/{selinux => nsalinux}/include/conditional.h (85%)
 rename security/{selinux => nsalinux}/include/initial_sid_to_string.h (100%)
 rename security/{selinux => nsalinux}/include/netif.h (89%)
 rename security/{selinux => nsalinux}/include/netlabel.h (53%)
 rename security/{selinux => nsalinux}/include/netnode.h (87%)
 rename security/{selinux => nsalinux}/include/netport.h (86%)
 rename security/{selinux => nsalinux}/include/objsec.h (92%)
 rename security/{selinux => nsalinux}/include/security.h (88%)
 rename security/{selinux => nsalinux}/include/xfrm.h (37%)
 rename security/{selinux => nsalinux}/netif.c (98%)
 rename security/{selinux => nsalinux}/netlabel.c (81%)
 rename security/{selinux => nsalinux}/netlink.c (89%)
 rename security/{selinux => nsalinux}/netnode.c (97%)
 rename security/{selinux => nsalinux}/netport.c (96%)
 rename security/{selinux => nsalinux}/nlmsgtab.c (99%)
 rename security/{selinux/selinuxfs.c => nsalinux/nsalinuxfs.c} (95%)
 rename security/{selinux => nsalinux}/ss/avtab.c (90%)
 rename security/{selinux => nsalinux}/ss/avtab.h (100%)
 rename security/{selinux => nsalinux}/ss/conditional.c (95%)
 rename security/{selinux => nsalinux}/ss/conditional.h (100%)
 rename security/{selinux => nsalinux}/ss/constraint.h (100%)
 rename security/{selinux => nsalinux}/ss/context.h (100%)
 rename security/{selinux => nsalinux}/ss/ebitmap.c (94%)
 rename security/{selinux => nsalinux}/ss/ebitmap.h (100%)
 rename security/{selinux => nsalinux}/ss/hashtab.c (100%)
 rename security/{selinux => nsalinux}/ss/hashtab.h (100%)
 rename security/{selinux => nsalinux}/ss/mls.c (99%)
 rename security/{selinux => nsalinux}/ss/mls.h (100%)
 rename security/{selinux => nsalinux}/ss/mls_types.h (100%)
 rename security/{selinux => nsalinux}/ss/policydb.c (96%)
 rename security/{selinux => nsalinux}/ss/policydb.h (99%)
 rename security/{selinux => nsalinux}/ss/services.c (94%)
 rename security/{selinux => nsalinux}/ss/services.h (100%)
 rename security/{selinux => nsalinux}/ss/sidtab.c (98%)
 rename security/{selinux => nsalinux}/ss/sidtab.h (100%)
 rename security/{selinux => nsalinux}/ss/status.c (58%)
 rename security/{selinux => nsalinux}/ss/symtab.c (100%)
 rename security/{selinux => nsalinux}/ss/symtab.h (100%)
 rename security/{selinux => nsalinux}/xfrm.c (75%)
CREDITS +1 -1
index 4312cd0..f5f19d6 100644
@@ -2600,7 +2600,7 @@ S: Nashua, NH 03062
 N: James Morris
 E: [email protected]
 W: http://namei.org/
-D: Netfilter, Linux Security Modules (LSM), SELinux, IPSec,
+D: Netfilter, Linux Security Modules (LSM), NSALinux, IPSec,
 D: Crypto API, general networking, miscellaneous.
 S: PO Box 707
 S: Spit Junction NSW 2088
Documentation/ABI/testing/ima_policy +2 -2
index bb0f9a1..bd88a08 100644
@@ -62,7 +62,7 @@ Description:
 			# SECURITYFS_MAGIC
 			dont_measure fsmagic=0x73636673
 			dont_appraise fsmagic=0x73636673
-			# SELINUX_MAGIC
+			# NSALINUX_MAGIC
 			dont_measure fsmagic=0xf97cff8c
 			dont_appraise fsmagic=0xf97cff8c
 			# CGROUP_SUPER_MAGIC
@@ -86,7 +86,7 @@ Description:
 
 		Examples of LSM specific definitions:
 
-		SELinux:
+		NSALinux:
 			dont_measure obj_type=var_log_t
 			dont_appraise obj_type=var_log_t
 			dont_measure obj_type=auditd_log_t
Documentation/CodingStyle +1 -1
index 9a70ddd..205a615 100644
@@ -564,7 +564,7 @@ config AUDIT
 	depends on NET
 	help
 	  Enable auditing infrastructure that can be used with another
-	  kernel subsystem, such as SELinux (which requires this for
+	  kernel subsystem, such as NSALinux (which requires this for
 	  logging of avc messages output).  Does not do system-call
 	  auditing without CONFIG_AUDITSYSCALL.
 
Documentation/DocBook/lsm.tmpl +3 -3
index fe7664c..487ec94 100644
@@ -37,8 +37,8 @@
 
 <para>
 In March 2001, the National Security Agency (NSA) gave a presentation
-about Security-Enhanced Linux (SELinux) at the 2.5 Linux Kernel
-Summit.  SELinux is an implementation of flexible and fine-grained
+about Security-Enhanced Linux (NSALinux) at the 2.5 Linux Kernel
+Summit.  NSALinux is an implementation of flexible and fine-grained
 nondiscretionary access controls in the Linux kernel, originally
 implemented as its own particular kernel patch.  Several other
 security projects (e.g. RSBAC, Medusa) have also developed flexible
@@ -64,7 +64,7 @@ module.
 <para>
 The Linux Security Modules (LSM) project was started by WireX to
 develop such a framework.  LSM is a joint development effort by
-several security projects, including Immunix, SELinux, SGI and Janus,
+several security projects, including Immunix, NSALinux, SGI and Janus,
 and several individuals, including Greg Kroah-Hartman and James
 Morris, to develop a Linux kernel patch that implements this
 framework.  The patch is currently tracking the 2.4 series and is
Documentation/RCU/RTFP.txt +4 -4
index 370ca00..c93b1fd 100644
@@ -145,7 +145,7 @@ Hugh Dickins [Dickins02a] and an implementation by Mingming Cao
 different CPUs [McKenney04b], a dissertation describing use of RCU in a
 number of operating-system kernels [PaulEdwardMcKenneyPhD], a paper
 describing how to make RCU safe for soft-realtime applications [Sarma04c],
-and a paper describing SELinux performance with RCU [JamesMorris04b].
+and a paper describing NSALinux performance with RCU [JamesMorris04b].
 
 2005 brought further adaptation of RCU to realtime use, permitting
 preemption of RCU realtime critical sections [PaulMcKenney05a,
@@ -1195,7 +1195,7 @@ Oregon Health and Sciences University"
 
 @unpublished{JamesMorris04a
 ,Author="James Morris"
-,Title="{[PATCH 2/3] SELinux} scalability - convert {AVC} to {RCU}"
+,Title="{[PATCH 2/3] NSALinux} scalability - convert {AVC} to {RCU}"
 ,day="15"
 ,month="November"
 ,year="2004"
@@ -1209,14 +1209,14 @@ Oregon Health and Sciences University"
 
 @unpublished{JamesMorris04b
 ,Author="James Morris"
-,Title="Recent Developments in {SELinux} Kernel Performance"
+,Title="Recent Developments in {NSALinux} Kernel Performance"
 ,month="December"
 ,year="2004"
 ,note="Available:
 \url{http://www.livejournal.com/users/james_morris/2153.html}
 [Viewed December 10, 2004]"
 ,annotation={
-	RCU helps SELinux performance.  ;-)  Made LWN.
+	RCU helps NSALinux performance.  ;-)  Made LWN.
 }
 }
 
Documentation/cgroup-v1/cgroups.txt +1 -1
index 947e6fe..531dbc4 100644
@@ -664,7 +664,7 @@ using kernel memory and it's advised to keep the usage at minimum.  This
 is the reason why user defined extended attributes are not supported, since
 any user can do it and there's no limit in the value size.
 
-The current known users for this feature are SELinux to limit cgroup usage
+The current known users for this feature are NSALinux to limit cgroup usage
 in containers and systemd for assorted meta data like main PID in a cgroup
 (systemd creates a cgroup per service).
 
Documentation/filesystems/caching/backend-api.txt +1 -1
index c0bd567..f539884 100644
@@ -84,7 +84,7 @@ The cache methods are executed one of two contexts:
 In either case, this may not be an appropriate context in which to access the
 cache.
 
-The calling process's fsuid, fsgid and SELinux security identities may need to
+The calling process's fsuid, fsgid and NSALinux security identities may need to
 be masqueraded for the duration of the cache driver's access to the cache.
 This is left to the cache to handle; FS-Cache makes no effort in this regard.
 
Documentation/filesystems/caching/cachefiles.txt +8 -8
index 748a1ae..164659a 100644
@@ -18,7 +18,7 @@ Contents:
 
  (*) Cache structure.
 
- (*) Security model and SELinux.
+ (*) Security model and NSALinux.
 
  (*) A note on security.
 
@@ -308,11 +308,11 @@ any file of an incorrect type (such as a FIFO file or a device file).
 
 
 ==========================
-SECURITY MODEL AND SELINUX
+SECURITY MODEL AND NSALINUX
 ==========================
 
 CacheFiles is implemented to deal properly with the LSM security features of
-the Linux kernel and the SELinux facility.
+the Linux kernel and the NSALinux facility.
 
 One of the problems that CacheFiles faces is that it is generally acting on
 behalf of a process, and running in that process's context, and that includes a
@@ -345,7 +345,7 @@ When the CacheFiles module is asked to bind to its cache, it:
 
 	cachefiles_kernel_t
 
-     SELinux transitions the daemon's security ID to the module's security ID
+     NSALinux transitions the daemon's security ID to the module's security ID
      based on a rule of this form in the policy.
 
 	type_transition <daemon's-ID> kernel_t : process <module's-ID>;
@@ -381,10 +381,10 @@ They are built and installed directly by the RPM.
 If a non-RPM based system is being used, then copy the above files to their own
 directory and run:
 
-	make -f /usr/share/selinux/devel/Makefile
+	make -f /usr/share/nsalinux/devel/Makefile
 	semodule -i cachefilesd.pp
 
-You will need checkpolicy and selinux-policy-devel installed prior to the
+You will need checkpolicy and nsalinux-policy-devel installed prior to the
 build.
 
 
@@ -394,7 +394,7 @@ an auxiliary policy must be installed to label the alternate location of the
 cache.
 
 For instructions on how to add an auxiliary policy to enable the cache to be
-located elsewhere when SELinux is in enforcing mode, please see:
+located elsewhere when NSALinux is in enforcing mode, please see:
 
 	/usr/share/doc/cachefilesd-*/move-cache.txt
 
@@ -440,7 +440,7 @@ may be overridden.  This is not seen externally, and is used whan a process
 acts upon another object, for example SIGKILLing another process or opening a
 file.
 
-LSM hooks exist that allow SELinux (or Smack or whatever) to reject a request
+LSM hooks exist that allow NSALinux (or Smack or whatever) to reject a request
 for CacheFiles to run in a context of a specific security label, or to create
 files and directories with another security label.
 
Documentation/filesystems/cifs/TODO +1 -1
index 066ffdd..ddc407b 100644
@@ -45,7 +45,7 @@ j) Add GUI tool to configure /proc/fs/cifs settings and for display of
 the CIFS statistics (started)
 
 k) implement support for security and trusted categories of xattrs
-(requires minor protocol extension) to enable better support for SELINUX
+(requires minor protocol extension) to enable better support for NSALINUX
 
 l) Implement O_DIRECT flag on open (already supported on mount)
 
Documentation/filesystems/orangefs.txt +1 -1
index e1a0056..33d4666 100644
@@ -82,7 +82,7 @@ prove things are working with:
 
 /opt/osf/bin/pvfs2-ls /mymountpoint
 
-You might not want to enforce selinux, it doesn't seem to matter by
+You might not want to enforce nsalinux, it doesn't seem to matter by
 linux 3.11...
 
 If stuff seems to be working, turn on the client core:
Documentation/filesystems/proc.txt +1 -1
index 7f5607a..12ec0ef 100644
@@ -1850,7 +1850,7 @@ the process is maintaining.  Example output:
      | lr-------- 1 root root 64 Jan 27 11:24 333c81f000-333c820000 -> /usr/lib64/ld-2.18.so
      | lr-------- 1 root root 64 Jan 27 11:24 333c820000-333c821000 -> /usr/lib64/ld-2.18.so
      | ...
-     | lr-------- 1 root root 64 Jan 27 11:24 35d0421000-35d0422000 -> /usr/lib64/libselinux.so.1
+     | lr-------- 1 root root 64 Jan 27 11:24 35d0421000-35d0422000 -> /usr/lib64/libnsalinux.so.1
      | lr-------- 1 root root 64 Jan 27 11:24 400000-41a000 -> /usr/bin/ls
 
 The name of a link represents the virtual memory bounds of a mapping, i.e.
Documentation/kernel-parameters.txt +10 -10
index ecc74fa..5dfde04 100644
@@ -107,7 +107,7 @@ parameter is applicable:
 			A lot of drivers have their options described inside
 			the Documentation/scsi/ sub-directory.
 	SECURITY Different security models are enabled.
-	SELINUX SELinux support is enabled.
+	NSALINUX NSALinux support is enabled.
 	APPARMOR AppArmor support is enabled.
 	SERIAL	Serial support is enabled.
 	SH	SuperH architecture is enabled.
@@ -624,15 +624,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			nosocket -- Disable socket memory accounting.
 			nokmem -- Disable kernel memory accounting.
 
-	checkreqprot	[SELINUX] Set initial checkreqprot flag value.
+	checkreqprot	[NSALINUX] Set initial checkreqprot flag value.
 			Format: { "0" | "1" }
-			See security/selinux/Kconfig help text.
+			See security/nsalinux/Kconfig help text.
 			0 -- check protection applied by kernel (includes
 				any implied execute protection).
 			1 -- check protection requested by application.
 			Default value is set via a kernel config option.
 			Value can be changed at runtime via
-				/selinux/checkreqprot.
+				/nsalinux/checkreqprot.
 
 	cio_ignore=	[S390]
 			See Documentation/s390/CommonIO for details.
@@ -1193,13 +1193,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			(in particular on some ATI chipsets).
 			The kernel tries to set a reasonable default.
 
-	enforcing	[SELINUX] Set initial enforcing status.
+	enforcing	[NSALINUX] Set initial enforcing status.
 			Format: {"0" | "1"}
-			See security/selinux/Kconfig help text.
+			See security/nsalinux/Kconfig help text.
 			0 -- permissive (log only, no denials).
 			1 -- enforcing (deny and log).
 			Default value is 0.
-			Value can be changed at runtime via /selinux/enforce.
+			Value can be changed at runtime via /nsalinux/enforce.
 
 	erst_disable	[ACPI]
 			Disable Error Record Serialization Table (ERST)
@@ -3604,13 +3604,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			loaded. An invalid security module name will be treated
 			as if no module has been chosen.
 
-	selinux=	[SELINUX] Disable or enable SELinux at boot time.
+	nsalinux=	[NSALINUX] Disable or enable NSALinux at boot time.
 			Format: { "0" | "1" }
-			See security/selinux/Kconfig help text.
+			See security/nsalinux/Kconfig help text.
 			0 -- disable.
 			1 -- enable.
 			Default value is set via kernel config option.
-			If enabled at boot time, /selinux/disable can be used
+			If enabled at boot time, /nsalinux/disable can be used
 			later to disable prior to initial policy load.
 
 	apparmor=	[APPARMOR] Disable or enable AppArmor at boot time
Documentation/networking/secid.txt +1 -1
index 95ea067..e7186ac 100644
@@ -1,6 +1,6 @@
 flowi structure:
 
-The secid member in the flow structure is used in LSMs (e.g. SELinux) to indicate
+The secid member in the flow structure is used in LSMs (e.g. NSALinux) to indicate
 the label of the flow. This label of the flow is currently used in selecting
 matching labeled xfrm(s).
 
Documentation/security/00-INDEX +2 -2
index 45c82fd..4715b2a 100644
@@ -2,8 +2,8 @@
 	- this file.
 LSM.txt
 	- description of the Linux Security Module framework.
-SELinux.txt
-	- how to get started with the SELinux security enhancement.
+NSALinux.txt
+	- how to get started with the NSALinux security enhancement.
 Smack.txt
 	- documentation on the Smack Linux Security Module.
 Yama.txt
Documentation/security/LSM.txt +1 -1
index 3db7e67..9a146c8 100644
@@ -11,7 +11,7 @@ LSMs were built into a given kernel.
 
 The primary users of the LSM interface are Mandatory Access Control
 (MAC) extensions which provide a comprehensive security policy. Examples
-include SELinux, Smack, Tomoyo, and AppArmor. In addition to the larger
+include NSALinux, Smack, Tomoyo, and AppArmor. In addition to the larger
 MAC extensions, other extensions can be built using the LSM to provide
 specific changes to system operation when these tweaks are not available
 in the core functionality of Linux itself.
Documentation/security/NSALinux.txt renamed from Documentation/security/SELinux.txt +9 -9
similarity index 58%
rename from Documentation/security/SELinux.txt
rename to Documentation/security/NSALinux.txt
index 07eae00..f90df63 100644
@@ -1,27 +1,27 @@
-If you want to use SELinux, chances are you will want
+If you want to use NSALinux, chances are you will want
 to use the distro-provided policies, or install the
 latest reference policy release from
 	http://oss.tresys.com/projects/refpolicy
 
 However, if you want to install a dummy policy for
 testing, you can do using 'mdp' provided under
-scripts/selinux.  Note that this requires the selinux
+scripts/nsalinux.  Note that this requires the nsalinux
 userspace to be installed - in particular you will
 need checkpolicy to compile a kernel, and setfiles and
 fixfiles to label the filesystem.
 
-	1. Compile the kernel with selinux enabled.
+	1. Compile the kernel with nsalinux enabled.
 	2. Type 'make' to compile mdp.
 	3. Make sure that you are not running with
-	   SELinux enabled and a real policy.  If
-	   you are, reboot with selinux disabled
+	   NSALinux enabled and a real policy.  If
+	   you are, reboot with nsalinux disabled
 	   before continuing.
 	4. Run install_policy.sh:
-		cd scripts/selinux
+		cd scripts/nsalinux
 		sh install_policy.sh
 
 Step 4 will create a new dummy policy valid for your
-kernel, with a single selinux user, role, and type.
-It will compile the policy, will set your SELINUXTYPE to
-dummy in /etc/selinux/config, install the compiled policy
+kernel, with a single nsalinux user, role, and type.
+It will compile the policy, will set your NSALINUXTYPE to
+dummy in /etc/nsalinux/config, install the compiled policy
 as 'dummy', and relabel your filesystem.
Documentation/security/credentials.txt +2 -2
index 8625705..f34a111 100644
@@ -131,9 +131,9 @@ object acts upon another:
 
 	 The system as a whole may have one or more sets of rules that get
 	 applied to all subjects and objects, regardless of their source.
-	 SELinux and Smack are examples of this.
+	 NSALinux and Smack are examples of this.
 
-	 In the case of SELinux and Smack, each object is given a label as part
+	 In the case of NSALinux and Smack, each object is given a label as part
 	 of its credentials.  When an action is requested, they take the
 	 subject label, the object label and the action and look for a rule
 	 that says that this action is either granted or denied.
Documentation/security/keys.txt +6 -6
index 8c18387..aec82ae 100644
@@ -19,7 +19,7 @@ This document has the following sections:
 	- Key overview
 	- Key service overview
 	- Key access permissions
-	- SELinux support
+	- NSALinux support
 	- New procfs files
 	- Userspace system call interface
 	- Kernel services
@@ -250,18 +250,18 @@ the key or having the sysadmin capability is sufficient.
 
 
 ===============
-SELINUX SUPPORT
+NSALINUX SUPPORT
 ===============
 
-The security class "key" has been added to SELinux so that mandatory access
+The security class "key" has been added to NSALinux so that mandatory access
 controls can be applied to keys created within various contexts.  This support
 is preliminary, and is likely to change quite significantly in the near future.
-Currently, all of the basic permissions explained above are provided in SELinux
-as well; SELinux is simply invoked after all basic permission checks have been
+Currently, all of the basic permissions explained above are provided in NSALinux
+as well; NSALinux is simply invoked after all basic permission checks have been
 performed.
 
 The value of the file /proc/self/attr/keycreate influences the labeling of
-newly-created keys.  If the contents of that file correspond to an SELinux
+newly-created keys.  If the contents of that file correspond to an NSALinux
 security context, then the key will be assigned that context.  Otherwise, the
 key will be assigned the current context of the task that invoked the key
 creation request.  Tasks must be granted explicit permission to assign a
Documentation/security/tomoyo.txt +1 -1
index 200a2d3..b2fa581 100644
@@ -47,7 +47,7 @@ History of TOMOYO?
 We believe that inode based security and name based security are complementary
 and both should be used together. But unfortunately, so far, we cannot enable
 multiple LSM modules at the same time. We feel sorry that you have to give up
-SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.
+NSALinux/SMACK/AppArmor etc. when you want to use TOMOYO.
 
 We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM
 version of TOMOYO, available at http://tomoyo.sourceforge.jp/1.7/ .
Documentation/zh_CN/CodingStyle +1 -1
index 654afd7..9bf7a13 100644
@@ -458,7 +458,7 @@ config AUDIT
 	depends on NET
 	help
 	  Enable auditing infrastructure that can be used with another
-	  kernel subsystem, such as SELinux (which requires this for
+	  kernel subsystem, such as NSALinux (which requires this for
 	  logging of avc messages output).  Does not do system-call
 	  auditing without CONFIG_AUDITSYSCALL.
 
MAINTAINERS +4 -4
index 378ebff..c9034dc 100644
@@ -9939,7 +9939,7 @@ SECURITY CONTACT
 M:	Security Officers <[email protected]>
 S:	Supported
 
-SELINUX SECURITY MODULE
+NSALINUX SECURITY MODULE
 M:	Paul Moore <[email protected]>
 M:	Stephen Smalley <[email protected]>
 M:	Eric Paris <[email protected]>
@@ -9947,9 +9947,9 @@ L:	[email protected] (moderated for non-subscribers)
 W:	http://selinuxproject.org
 T:	git git://git.infradead.org/users/pcmoore/selinux
 S:	Supported
-F:	include/linux/selinux*
-F:	security/selinux/
-F:	scripts/selinux/
+F:	include/linux/nsalinux*
+F:	security/nsalinux/
+F:	scripts/nsalinux/
 
 APPARMOR SECURITY MODULE
 M:	John Johansen <[email protected]>
arch/mips/configs/bigsur_defconfig +3 -3
index e070dac..806c845 100644
@@ -250,9 +250,9 @@ CONFIG_KEYS=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_DEFAULT_SECURITY_DAC=y
 CONFIG_CRYPTO_NULL=y
 CONFIG_CRYPTO_CCM=m
arch/mips/configs/loongson3_defconfig +3 -3
index f8bf915..e635154 100644
@@ -342,9 +342,9 @@ CONFIG_SECURITY=y
 CONFIG_SECURITYFS=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_PATH=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_DEFAULT_SECURITY_DAC=y
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_HMAC=y
arch/mips/configs/nlm_xlp_defconfig +4 -4
index b3d1d37..b721b11 100644
@@ -569,10 +569,10 @@ CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_KGDB=y
 CONFIG_SECURITY=y
 CONFIG_LSM_MMAP_MIN_ADDR=0
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_SECURITY_SMACK=y
 CONFIG_SECURITY_TOMOYO=y
 CONFIG_CRYPTO_NULL=m
arch/mips/configs/nlm_xlr_defconfig +4 -4
index 3d8016d..b92d94e 100644
@@ -530,10 +530,10 @@ CONFIG_KGDB=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_LSM_MMAP_MIN_ADDR=0
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_SECURITY_SMACK=y
 CONFIG_SECURITY_TOMOYO=y
 CONFIG_CRYPTO_NULL=m
arch/powerpc/configs/c2k_defconfig +3 -3
index 340685c..a170128 100644
@@ -389,9 +389,9 @@ CONFIG_BOOTX_TEXT=y
 CONFIG_PPC_EARLY_DEBUG=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_MICHAEL_MIC=m
arch/powerpc/configs/ppc6xx_defconfig +3 -3
index 99ccbeba..3022dfd 100644
@@ -1178,9 +1178,9 @@ CONFIG_PPC_EARLY_DEBUG=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_TEST=m
 CONFIG_CRYPTO_GCM=m
 CONFIG_CRYPTO_CTS=m
arch/s390/configs/default_defconfig +4 -4
index 0ac42cc..77ecee8 100644
@@ -612,10 +612,10 @@ CONFIG_S390_PTDUMP=y
 CONFIG_ENCRYPTED_KEYS=m
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_IMA=y
 CONFIG_IMA_APPRAISE=y
 CONFIG_CRYPTO_USER=m
arch/s390/configs/gcov_defconfig +4 -4
index a31dcd5..8c4a965 100644
@@ -558,10 +558,10 @@ CONFIG_S390_PTDUMP=y
 CONFIG_ENCRYPTED_KEYS=m
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_IMA=y
 CONFIG_IMA_APPRAISE=y
 CONFIG_CRYPTO_USER=m
arch/s390/configs/performance_defconfig +4 -4
index 7b73bf3..836480e 100644
@@ -555,10 +555,10 @@ CONFIG_S390_PTDUMP=y
 CONFIG_ENCRYPTED_KEYS=m
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE=0
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_IMA=y
 CONFIG_IMA_APPRAISE=y
 CONFIG_CRYPTO_USER=m
arch/tile/configs/tilegx_defconfig +3 -3
index 3f3dfb8..fb9aef2 100644
@@ -378,9 +378,9 @@ CONFIG_SECURITY=y
 CONFIG_SECURITYFS=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_PCRYPT=m
 CONFIG_CRYPTO_CRYPTD=m
 CONFIG_CRYPTO_TEST=m
arch/tile/configs/tilepro_defconfig +3 -3
index ef9e27e..87134a8 100644
@@ -490,9 +490,9 @@ CONFIG_SECURITY=y
 CONFIG_SECURITYFS=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_PCRYPT=m
 CONFIG_CRYPTO_CRYPTD=m
 CONFIG_CRYPTO_TEST=m
arch/x86/configs/i386_defconfig +3 -3
index 265901a..0dd4d06d 100644
@@ -305,8 +305,8 @@ CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_OPTIMIZE_INLINING=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 CONFIG_CRYPTO_AES_586=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/x86/configs/x86_64_defconfig +3 -3
index 4f404a6..fdf65ba 100644
@@ -302,7 +302,7 @@ CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_OPTIMIZE_INLINING=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_NSALINUX=y
+CONFIG_SECURITY_NSALINUX_BOOTPARAM=y
+CONFIG_SECURITY_NSALINUX_DISABLE=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/xtensa/configs/iss_defconfig +1 -1
index 44c6764..55a55dd 100644
@@ -643,7 +643,7 @@ CONFIG_RCU_CPU_STALL_DETECTOR=y
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITYFS is not set
-# CONFIG_DEFAULT_SECURITY_SELINUX is not set
+# CONFIG_DEFAULT_SECURITY_NSALINUX is not set
 # CONFIG_DEFAULT_SECURITY_SMACK is not set
 # CONFIG_DEFAULT_SECURITY_TOMOYO is not set
 CONFIG_DEFAULT_SECURITY_DAC=y
drivers/staging/lustre/lustre/llite/xattr.c +7 -7
index b68dcc9..5eed334 100644
@@ -37,7 +37,7 @@
 #include <linux/fs.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
@@ -138,9 +138,9 @@ int ll_setxattr_common(struct inode *inode, const char *name,
 	     strcmp(name, "security.capability") == 0))
 		return 0;
 
-	/* LU-549:  Disable security.selinux when selinux is disabled */
-	if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled() &&
-	    strcmp(name, "security.selinux") == 0)
+	/* LU-549:  Disable security.nsalinux when nsalinux is disabled */
+	if (xattr_type == XATTR_SECURITY_T && !nsalinux_is_enabled() &&
+	    strcmp(name, "security.nsalinux") == 0)
 		return -EOPNOTSUPP;
 
 #ifdef CONFIG_FS_POSIX_ACL
@@ -314,9 +314,9 @@ int ll_getxattr_common(struct inode *inode, const char *name,
 	     strcmp(name, "security.capability") == 0))
 		return -ENODATA;
 
-	/* LU-549:  Disable security.selinux when selinux is disabled */
-	if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled() &&
-	    strcmp(name, "security.selinux") == 0)
+	/* LU-549:  Disable security.nsalinux when nsalinux is disabled */
+	if (xattr_type == XATTR_SECURITY_T && !nsalinux_is_enabled() &&
+	    strcmp(name, "security.nsalinux") == 0)
 		return -EOPNOTSUPP;
 
 #ifdef CONFIG_FS_POSIX_ACL
fs/9p/Kconfig +1 -1
index 6489e1f..e64308b 100644
@@ -38,7 +38,7 @@ config 9P_FS_SECURITY
         depends on 9P_FS
         help
           Security labels support alternative access control models
-          implemented by security modules like SELinux.  This option
+          implemented by security modules like NSALinux.  This option
           enables an extended attribute handler for file security
           labels in the 9P filesystem.
 
fs/btrfs/inode.c +4 -4
index 41a5688..6568a52 100644
@@ -6351,7 +6351,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
 	/*
 	 * 2 for inode item and ref
 	 * 2 for dir items
-	 * 1 for xattr if selinux is on
+	 * 1 for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 5);
 	if (IS_ERR(trans))
@@ -6422,7 +6422,7 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
 	/*
 	 * 2 for inode item and ref
 	 * 2 for dir items
-	 * 1 for xattr if selinux is on
+	 * 1 for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 5);
 	if (IS_ERR(trans))
@@ -6570,7 +6570,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 	/*
 	 * 2 items for inode and ref
 	 * 2 items for dir items
-	 * 1 for xattr if selinux is on
+	 * 1 for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 5);
 	if (IS_ERR(trans))
@@ -9799,7 +9799,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
 	 * 2 items for dir items
 	 * 1 item for updating parent inode item
 	 * 1 item for the inline extent item
-	 * 1 item for xattr if selinux is on
+	 * 1 item for xattr if nsalinux is on
 	 */
 	trans = btrfs_start_transaction(root, 7);
 	if (IS_ERR(trans))
fs/btrfs/super.c +1 -1
index 00b8f37..42342af 100644
@@ -1488,7 +1488,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info,
 		memcpy(&fs_info->security_opts, sec_opts, sizeof(*sec_opts));
 	} else {
 		/*
-		 * Since SELinux(the only one supports security_mnt_opts) does
+		 * Since NSALinux(the only one supports security_mnt_opts) does
 		 * NOT support changing context during remount/mount same sb,
 		 * This must be the same or part of the same security options,
 		 * just free it.
fs/ext2/Kconfig +1 -1
index c634874..9a93197 100644
@@ -36,7 +36,7 @@ config EXT2_FS_SECURITY
 	depends on EXT2_FS_XATTR
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the ext2 filesystem.
 
fs/ext4/Kconfig +1 -1
index b46e9fc..ea62e4d 100644
@@ -91,7 +91,7 @@ config EXT4_FS_SECURITY
 	depends on EXT4_FS
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the ext4 filesystem.
 
fs/ext4/namei.c +1 -1
index 48e4b89..1251922 100644
@@ -3106,7 +3106,7 @@ static int ext4_symlink(struct inode *dir,
 		 * For non-fast symlinks, we just allocate inode and put it on
 		 * orphan list in the first transaction => we need bitmap,
 		 * group descriptor, sb, inode block, quota blocks, and
-		 * possibly selinux xattr blocks.
+		 * possibly nsalinux xattr blocks.
 		 */
 		credits = 4 + EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) +
 			  EXT4_XATTR_TRANS_BLOCKS;
fs/f2fs/Kconfig +1 -1
index 1f8982a..5827963 100644
@@ -59,7 +59,7 @@ config F2FS_FS_SECURITY
 	depends on F2FS_FS_XATTR
 	help
 	  Security labels provide an access control facility to support Linux
-	  Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
+	  Security Models (LSMs) accepted by AppArmor, NSALinux, Smack and TOMOYO
 	  Linux. This option enables an extended attribute handler for file
 	  security labels in the f2fs filesystem, so that it requires enabling
 	  the extended attribute support in advance.
fs/gfs2/inode.c +1 -1
index bb30f9a..72c968a 100644
@@ -1976,7 +1976,7 @@ static ssize_t gfs2_getxattr(struct dentry *dentry, const char *name,
 	struct gfs2_holder gh;
 	int ret;
 
-	/* For selinux during lookup */
+	/* For nsalinux during lookup */
 	if (gfs2_glock_is_locked_by_me(ip->i_gl))
 		return generic_getxattr(dentry, name, data, size);
 
fs/jffs2/Kconfig +1 -1
index d8bb6c4..a870943 100644
@@ -93,7 +93,7 @@ config JFFS2_FS_SECURITY
 	default y
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the jffs2 filesystem.
 
fs/jfs/Kconfig +1 -1
index 57cef19..964e159 100644
@@ -26,7 +26,7 @@ config JFS_SECURITY
 	depends on JFS_FS
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the jfs filesystem.
 
fs/nfs/super.c +4 -4
index f126828..2b21fe3 100644
@@ -2040,14 +2040,14 @@ static int nfs23_validate_mount_data(void *options,
 					NFS_MOUNT_LOCAL_FCNTL);
 		/*
 		 * The legacy version 6 binary mount data from userspace has a
-		 * field used only to transport selinux information into the
+		 * field used only to transport nsalinux information into the
 		 * the kernel.  To continue to support that functionality we
-		 * have a touch of selinux knowledge here in the NFS code. The
+		 * have a touch of nsalinux knowledge here in the NFS code. The
 		 * userspace code converted context=blah to just blah so we are
-		 * converting back to the full string selinux understands.
+		 * converting back to the full string nsalinux understands.
 		 */
 		if (data->context[0]){
-#ifdef CONFIG_SECURITY_SELINUX
+#ifdef CONFIG_SECURITY_NSALINUX
 			int rc;
 			char *opts_str = kmalloc(sizeof(data->context) + 8, GFP_KERNEL);
 			if (!opts_str)
fs/nfsd/Kconfig +2 -2
index c9f583d..7c70f71 100644
@@ -118,10 +118,10 @@ config NFSD_V4_SECURITY_LABEL
 
 	Say Y here if you want enable fine-grained security label attribute
 	support for NFS version 4.  Security labels allow security modules like
-	SELinux and Smack to label files to facilitate enforcement of their policies.
+	NSALinux and Smack to label files to facilitate enforcement of their policies.
 	Without this an NFSv4 mount will have the same label on each file.
 
-	If you do not wish to enable fine-grained security labels SELinux or
+	If you do not wish to enable fine-grained security labels NSALinux or
 	Smack policies on NFSv4 files, say N.
 
 config NFSD_FAULT_INJECTION
fs/reiserfs/Kconfig +1 -1
index 7cd4666..ae9c5ef 100644
@@ -80,7 +80,7 @@ config REISERFS_FS_SECURITY
 	depends on REISERFS_FS_XATTR
 	help
 	  Security labels support alternative access control models
-	  implemented by security modules like SELinux.  This option
+	  implemented by security modules like NSALinux.  This option
 	  enables an extended attribute handler for file security
 	  labels in the ReiserFS filesystem.
 
fs/reiserfs/xattr_security.c +1 -1
index ab0217d..51a9e31 100644
@@ -51,7 +51,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode,
 
 	sec->name = NULL;
 
-	/* Don't add selinux attributes on xattrs - they'll never get used */
+	/* Don't add nsalinux attributes on xattrs - they'll never get used */
 	if (IS_PRIVATE(dir))
 		return 0;
 
fs/xfs/xfs_iops.c +1 -1
index fb7dc61..36d6a6a 100644
@@ -78,7 +78,7 @@ xfs_initxattrs(
 }
 
 /*
- * Hook in SELinux.  This is not quite correct yet, what we really need
+ * Hook in NSALinux.  This is not quite correct yet, what we really need
  * here (as we do for default ACLs) is a mechanism by which creation of
  * these attrs can be journalled at inode creation time (along with the
  * inode, of course, such that log replay can't cause these to be lost).
include/linux/cred.h +1 -1
index 257db64..2e81331 100644
@@ -15,7 +15,7 @@
 #include <linux/capability.h>
 #include <linux/init.h>
 #include <linux/key.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 #include <linux/atomic.h>
 #include <linux/uidgid.h>
 
include/linux/lsm_audit.h +3 -3
index ffb9c9d..d9c85ec 100644
@@ -1,6 +1,6 @@
 /*
  * Common LSM logging functions
- * Heavily borrowed from selinux/avc.h
+ * Heavily borrowed from nsalinux/avc.h
  *
  * Author : Etienne BASSET  <[email protected]>
  *
@@ -81,8 +81,8 @@ struct common_audit_data {
 #ifdef CONFIG_SECURITY_SMACK
 		struct smack_audit_data *smack_audit_data;
 #endif
-#ifdef CONFIG_SECURITY_SELINUX
-		struct selinux_audit_data *selinux_audit_data;
+#ifdef CONFIG_SECURITY_NSALINUX
+		struct nsalinux_audit_data *nsalinux_audit_data;
 #endif
 #ifdef CONFIG_SECURITY_APPARMOR
 		struct apparmor_audit_data *apparmor_audit_data;
include/linux/lsm_hooks.h +4 -4
index cdee11c..045f794 100644
@@ -179,7 +179,7 @@
  *	@inode contains the inode structure of the newly created inode.
  *	@dir contains the inode structure of the parent directory.
  *	@qstr contains the last path component of the new object
- *	@name will be set to the allocated name suffix (e.g. selinux).
+ *	@name will be set to the allocated name suffix (e.g. nsalinux).
  *	@value will be set to the allocated attribute value.
  *	@len will be set to the length of the value.
  *	Returns 0 if @name and @value have been successfully set,
@@ -1863,7 +1863,7 @@ static inline void security_add_hooks(struct security_hook_list *hooks,
 		list_add_tail_rcu(&hooks[i].list, hooks[i].head);
 }
 
-#ifdef CONFIG_SECURITY_SELINUX_DISABLE
+#ifdef CONFIG_SECURITY_NSALINUX_DISABLE
 /*
  * Assuring the safety of deleting a security module is up to
  * the security module involved. This may entail ordering the
@@ -1874,7 +1874,7 @@ static inline void security_add_hooks(struct security_hook_list *hooks,
  * The name of the configuration option reflects the only module
  * that currently uses the mechanism. Any developer who thinks
  * disabling their module is a good idea needs to be at least as
- * careful as the SELinux team.
+ * careful as the NSALinux team.
  */
 static inline void security_delete_hooks(struct security_hook_list *hooks,
 						int count)
@@ -1884,7 +1884,7 @@ static inline void security_delete_hooks(struct security_hook_list *hooks,
 	for (i = 0; i < count; i++)
 		list_del_rcu(&hooks[i].list);
 }
-#endif /* CONFIG_SECURITY_SELINUX_DISABLE */
+#endif /* CONFIG_SECURITY_NSALINUX_DISABLE */
 
 extern int __init security_module_enable(const char *module);
 extern void __init capability_add_hooks(void);
include/linux/nsalinux.h renamed from include/linux/selinux.h +10 -10
similarity index 60%
rename from include/linux/selinux.h
rename to include/linux/nsalinux.h
index 44f4596..f5a100f 100644
@@ -1,5 +1,5 @@
 /*
- * SELinux services exported to the rest of the kernel.
+ * NSALinux services exported to the rest of the kernel.
  *
  * Author: James Morris <[email protected]>
  *
@@ -11,25 +11,25 @@
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
  */
-#ifndef _LINUX_SELINUX_H
-#define _LINUX_SELINUX_H
+#ifndef _LINUX_NSALINUX_H
+#define _LINUX_NSALINUX_H
 
-struct selinux_audit_rule;
+struct nsalinux_audit_rule;
 struct audit_context;
 struct kern_ipc_perm;
 
-#ifdef CONFIG_SECURITY_SELINUX
+#ifdef CONFIG_SECURITY_NSALINUX
 
 /**
- * selinux_is_enabled - is SELinux enabled?
+ * nsalinux_is_enabled - is NSALinux enabled?
  */
-bool selinux_is_enabled(void);
+bool nsalinux_is_enabled(void);
 #else
 
-static inline bool selinux_is_enabled(void)
+static inline bool nsalinux_is_enabled(void)
 {
 	return false;
 }
-#endif	/* CONFIG_SECURITY_SELINUX */
+#endif	/* CONFIG_SECURITY_NSALINUX */
 
-#endif /* _LINUX_SELINUX_H */
+#endif /* _LINUX_NSALINUX_H */
include/net/netlabel.h +1 -1
index 7b5a300..b201ac2 100644
@@ -148,7 +148,7 @@ struct netlbl_lsm_cache {
  * This structure is used to represent category bitmaps.  Due to the large
  * number of categories supported by most labeling protocols it is not
  * practical to transfer a full bitmap internally so NetLabel adopts a sparse
- * bitmap structure modeled after SELinux's ebitmap structure.
+ * bitmap structure modeled after NSALinux's ebitmap structure.
  * The catmap bitmap field MUST be a power of two in length and large
  * enough to hold at least 240 bits.  Special care (i.e. check the code!)
  * should be used when changing these values as the LSM implementation
include/uapi/linux/Kbuild +1 -1
index b71fd0b..c8204a6 100644
@@ -368,7 +368,7 @@ header-y += sctp.h
 header-y += sdla.h
 header-y += seccomp.h
 header-y += securebits.h
-header-y += selinux_netlink.h
+header-y += nsalinux_netlink.h
 header-y += sem.h
 header-y += serial_core.h
 header-y += serial.h
include/uapi/linux/audit.h +1 -1
index d820aa9..a5307cf 100644
@@ -113,7 +113,7 @@
 #define AUDIT_REPLACE		1329	/* Replace auditd if this packet unanswerd */
 
 #define AUDIT_AVC		1400	/* SE Linux avc denial or grant */
-#define AUDIT_SELINUX_ERR	1401	/* Internal SE Linux Errors */
+#define AUDIT_NSALINUX_ERR	1401	/* Internal SE Linux Errors */
 #define AUDIT_AVC_PATH		1402	/* dentry, vfsmount pair from avc */
 #define AUDIT_MAC_POLICY_LOAD	1403	/* Policy file load */
 #define AUDIT_MAC_STATUS	1404	/* Changed enforcing,permissive,off */
include/uapi/linux/magic.h +1 -1
index 0de181a..c2c341e 100644
@@ -10,7 +10,7 @@
 #define CRAMFS_MAGIC_WEND	0x453dcd28	/* magic number with the wrong endianess */
 #define DEBUGFS_MAGIC          0x64626720
 #define SECURITYFS_MAGIC	0x73636673
-#define SELINUX_MAGIC		0xf97cff8c
+#define NSALINUX_MAGIC		0xf97cff8c
 #define SMACK_MAGIC		0x43415d53	/* "SMAC" */
 #define RAMFS_MAGIC		0x858458f6	/* some random number */
 #define TMPFS_MAGIC		0x01021994
include/uapi/linux/netfilter/xt_SECMARK.h +1 -1
index 989092b..8636d3d 100644
@@ -10,7 +10,7 @@
  * 'mode' refers to the specific security subsystem which the
  * packets are being marked for.
  */
-#define SECMARK_MODE_SEL	0x01		/* SELinux */
+#define SECMARK_MODE_SEL	0x01		/* NSALinux */
 #define SECMARK_SECCTX_MAX	256
 
 struct xt_secmark_target_info {
include/uapi/linux/netfilter_ipv4.h +2 -2
index 91ddd1f..a986795 100644
@@ -58,14 +58,14 @@ enum nf_ip_hook_priorities {
 	NF_IP_PRI_FIRST = INT_MIN,
 	NF_IP_PRI_CONNTRACK_DEFRAG = -400,
 	NF_IP_PRI_RAW = -300,
-	NF_IP_PRI_SELINUX_FIRST = -225,
+	NF_IP_PRI_NSALINUX_FIRST = -225,
 	NF_IP_PRI_CONNTRACK = -200,
 	NF_IP_PRI_MANGLE = -150,
 	NF_IP_PRI_NAT_DST = -100,
 	NF_IP_PRI_FILTER = 0,
 	NF_IP_PRI_SECURITY = 50,
 	NF_IP_PRI_NAT_SRC = 100,
-	NF_IP_PRI_SELINUX_LAST = 225,
+	NF_IP_PRI_NSALINUX_LAST = 225,
 	NF_IP_PRI_CONNTRACK_HELPER = 300,
 	NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
 	NF_IP_PRI_LAST = INT_MAX,
include/uapi/linux/netfilter_ipv6.h +2 -2
index 12497c6..22c2c00 100644
@@ -63,14 +63,14 @@ enum nf_ip6_hook_priorities {
 	NF_IP6_PRI_FIRST = INT_MIN,
 	NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
 	NF_IP6_PRI_RAW = -300,
-	NF_IP6_PRI_SELINUX_FIRST = -225,
+	NF_IP6_PRI_NSALINUX_FIRST = -225,
 	NF_IP6_PRI_CONNTRACK = -200,
 	NF_IP6_PRI_MANGLE = -150,
 	NF_IP6_PRI_NAT_DST = -100,
 	NF_IP6_PRI_FILTER = 0,
 	NF_IP6_PRI_SECURITY = 50,
 	NF_IP6_PRI_NAT_SRC = 100,
-	NF_IP6_PRI_SELINUX_LAST = 225,
+	NF_IP6_PRI_NSALINUX_LAST = 225,
 	NF_IP6_PRI_CONNTRACK_HELPER = 300,
 	NF_IP6_PRI_LAST = INT_MAX,
 };
include/uapi/linux/netlink.h +1 -1
index 0dba4e4..9160cbe 100644
@@ -12,7 +12,7 @@
 #define NETLINK_SOCK_DIAG	4	/* socket monitoring				*/
 #define NETLINK_NFLOG		5	/* netfilter/iptables ULOG */
 #define NETLINK_XFRM		6	/* ipsec */
-#define NETLINK_SELINUX		7	/* SELinux event notifications */
+#define NETLINK_NSALINUX		7	/* NSALinux event notifications */
 #define NETLINK_ISCSI		8	/* Open-iSCSI */
 #define NETLINK_AUDIT		9	/* auditing */
 #define NETLINK_FIB_LOOKUP	10	
include/uapi/linux/nsalinux_netlink.h renamed from include/uapi/linux/selinux_netlink.h +5 -5
similarity index 84%
rename from include/uapi/linux/selinux_netlink.h
rename to include/uapi/linux/nsalinux_netlink.h
index d239797..e5baa6b 100644
@@ -1,5 +1,5 @@
 /*
- * Netlink event notifications for SELinux.
+ * Netlink event notifications for NSALinux.
  *
  * Author: James Morris <[email protected]>
  *
@@ -9,8 +9,8 @@
  * it under the terms of the GNU General Public License version 2,
  * as published by the Free Software Foundation.
  */
-#ifndef _LINUX_SELINUX_NETLINK_H
-#define _LINUX_SELINUX_NETLINK_H
+#ifndef _LINUX_NSALINUX_NETLINK_H
+#define _LINUX_NSALINUX_NETLINK_H
 
 #include <linux/types.h>
 
@@ -29,7 +29,7 @@ enum {
 #define SELNL_GRP_ALL		0xffffffff
 #endif
 
-enum selinux_nlgroups {
+enum nsalinux_nlgroups {
 	SELNLGRP_NONE,
 #define SELNLGRP_NONE	SELNLGRP_NONE
 	SELNLGRP_AVC,
@@ -47,4 +47,4 @@ struct selnl_msg_policyload {
 	__u32	seqno;
 };
 
-#endif /* _LINUX_SELINUX_NETLINK_H */
+#endif /* _LINUX_NSALINUX_NETLINK_H */
include/uapi/linux/pfkeyv2.h +1 -1
index ada7f01..7b95e12 100644
@@ -220,7 +220,7 @@ struct sadb_x_nat_t_port {
 struct sadb_x_sec_ctx {
 	__u16	sadb_x_sec_len;
 	__u16	sadb_x_sec_exttype;
-	__u8		sadb_x_ctx_alg;  /* LSMs: e.g., selinux == 1 */
+	__u8		sadb_x_ctx_alg;  /* LSMs: e.g., nsalinux == 1 */
 	__u8		sadb_x_ctx_doi;
 	__u16	sadb_x_ctx_len;
 } __attribute__((packed));
include/uapi/linux/prctl.h +1 -1
index a8d0759..8b434ba 100644
@@ -166,7 +166,7 @@ struct prctl_mm_map {
  * capset, etc.) will still work.  Drop those privileges if you want them gone.
  *
  * Changing LSM security domain is considered a new privilege.  So, for example,
- * asking selinux for a specific new context (e.g. with runcon) will result
+ * asking nsalinux for a specific new context (e.g. with runcon) will result
  * in execve returning -EPERM.
  *
  * See Documentation/prctl/no_new_privs.txt for more details.
include/uapi/linux/xattr.h +2 -2
index 1590c49..993c8b8 100644
@@ -49,8 +49,8 @@
 #define XATTR_IMA_SUFFIX "ima"
 #define XATTR_NAME_IMA XATTR_SECURITY_PREFIX XATTR_IMA_SUFFIX
 
-#define XATTR_SELINUX_SUFFIX "selinux"
-#define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX
+#define XATTR_NSALINUX_SUFFIX "nsalinux"
+#define XATTR_NAME_NSALINUX XATTR_SECURITY_PREFIX XATTR_NSALINUX_SUFFIX
 
 #define XATTR_SMACK_SUFFIX "SMACK64"
 #define XATTR_SMACK_IPIN "SMACK64IPIN"
include/uapi/linux/xfrm.h +2 -2
index 2cd9e60..9ed9bcd 100644
@@ -41,7 +41,7 @@ struct xfrm_sec_ctx {
 
 /* Security Context Algorithms */
 #define XFRM_SC_ALG_RESERVED 0
-#define XFRM_SC_ALG_SELINUX 1
+#define XFRM_SC_ALG_NSALINUX 1
 
 /* Selector, used as selector both on policy rules (SPD) and SAs. */
 
@@ -227,7 +227,7 @@ enum {
 struct xfrm_user_sec_ctx {
 	__u16			len;
 	__u16			exttype;
-	__u8			ctx_alg;  /* LSMs: e.g., selinux == 1 */
+	__u8			ctx_alg;  /* LSMs: e.g., nsalinux == 1 */
 	__u8			ctx_doi;
 	__u16			ctx_len;
 };
init/Kconfig +1 -1
index e0d2616..8025b4a 100644
@@ -298,7 +298,7 @@ config AUDIT
 	depends on NET
 	help
 	  Enable auditing infrastructure that can be used with another
-	  kernel subsystem, such as SELinux (which requires this for
+	  kernel subsystem, such as NSALinux (which requires this for
 	  logging of avc messages output).  System call auditing is included
 	  on architectures which support it.
 
kernel/audit.c +3 -3
index 678c3f0..4ea612b 100644
@@ -1,5 +1,5 @@
 /* audit.c -- Auditing support
- * Gateway between the kernel (e.g., selinux) and the user-space audit daemon.
+ * Gateway between the kernel (e.g., nsalinux) and the user-space audit daemon.
  * System-call specific features have moved to auditsc.c
  *
  * Copyright 2003-2007 Red Hat Inc., Durham, North Carolina.
@@ -2034,12 +2034,12 @@ void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
 
 #ifdef CONFIG_SECURITY
 /**
- * audit_log_secctx - Converts and logs SELinux context
+ * audit_log_secctx - Converts and logs NSALinux context
  * @ab: audit_buffer
  * @secid: security number
  *
  * This is a helper function that calls security_secid_to_secctx to convert
- * secid to secctx and then adds the (converted) SELinux context to the audit
+ * secid to secctx and then adds the (converted) NSALinux context to the audit
  * log by calling audit_log_format, thus also preventing leak of internal secid
  * to userspace. If secid cannot be converted audit_panic is called.
  */
kernel/audit.h +1 -1
index cbbe6bb..fef7b9c 100644
@@ -250,7 +250,7 @@ struct audit_net {
 	struct sock *nlsk;
 };
 
-extern int selinux_audit_rule_update(void);
+extern int nsalinux_audit_rule_update(void);
 
 extern struct mutex audit_filter_mutex;
 extern int audit_del_rule(struct audit_entry *);
kernel/cred.c +2 -2
index 0c0cd8a..fb1a50b 100644
@@ -701,12 +701,12 @@ bool creds_are_invalid(const struct cred *cred)
 {
 	if (cred->magic != CRED_MAGIC)
 		return true;
-#ifdef CONFIG_SECURITY_SELINUX
+#ifdef CONFIG_SECURITY_NSALINUX
 	/*
 	 * cred->security == NULL if security_cred_alloc_blank() or
 	 * security_prepare_creds() returned an error.
 	 */
-	if (selinux_is_enabled() && cred->security) {
+	if (nsalinux_is_enabled() && cred->security) {
 		if ((unsigned long) cred->security < PAGE_SIZE)
 			return true;
 		if ((*(u32 *)cred->security & 0xffffff00) ==
lib/Kconfig.debug +1 -1
index 1e9a607..a6a005d 100644
@@ -1246,7 +1246,7 @@ config DEBUG_CREDENTIALS
 	  see that this number never exceeds the usage count of the cred
 	  struct.
 
-	  Furthermore, if SELinux is enabled, this also checks that the
+	  Furthermore, if NSALinux is enabled, this also checks that the
 	  security pointer in the cred struct is never seen to be invalid.
 
 	  If unsure, say N.
lib/is_single_threaded.c +1 -1
index 391fd23..4a918e9 100644
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells ([email protected])
- * - Derived from security/selinux/hooks.c
+ * - Derived from security/nsalinux/hooks.c
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public Licence
mm/shmem.c +1 -1
index 9428c51..01641f3 100644
@@ -3456,7 +3456,7 @@ int shmem_zero_setup(struct vm_area_struct *vma)
 
 	/*
 	 * Cloning a new file under mmap_sem leads to a lock ordering conflict
-	 * between XFS directory reading and selinux: since this file is only
+	 * between XFS directory reading and nsalinux: since this file is only
 	 * accessible to the user through its mapping, use S_PRIVATE flag to
 	 * bypass file security, in the same way as shmem_kernel_file_setup().
 	 */
net/netlabel/netlabel_domainhash.c +1 -1
index ada6742..0c6fa19 100644
@@ -119,7 +119,7 @@ static u32 netlbl_domhsh_hash(const char *key)
 	u32 len;
 
 	/* This is taken (with slight modification) from
-	 * security/selinux/ss/symtab.c:symhash() */
+	 * security/nsalinux/ss/symtab.c:symhash() */
 
 	for (iter = 0, val = 0, len = strlen(key); iter < len; iter++)
 		val = (val << 4 | (val >> (8 * sizeof(u32) - 4))) ^ key[iter];
scripts/Makefile +1 -1
index 822ab4a..0fd8fc6 100644
@@ -42,7 +42,7 @@ build_check-lc_ctype: $(obj)/check-lc_ctype
 
 subdir-$(CONFIG_MODVERSIONS) += genksyms
 subdir-y                     += mod
-subdir-$(CONFIG_SECURITY_SELINUX) += selinux
+subdir-$(CONFIG_SECURITY_NSALINUX) += nsalinux
 subdir-$(CONFIG_DTC)         += dtc
 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
 
scripts/nsalinux/Makefile renamed from scripts/selinux/Makefile +0 -0
similarity index 100%
rename from scripts/selinux/Makefile
rename to scripts/nsalinux/Makefile
scripts/nsalinux/README new file +2 -0
new file mode 100644
index 0000000..dd501d3
@@ -0,0 +1,2 @@
+Please see Documentation/security/NSALinux.txt for information on
+installing a dummy NSALinux policy.
scripts/nsalinux/genheaders/.gitignore renamed from scripts/selinux/genheaders/.gitignore +0 -0
similarity index 100%
rename from scripts/selinux/genheaders/.gitignore
rename to scripts/nsalinux/genheaders/.gitignore
scripts/nsalinux/genheaders/Makefile renamed from scripts/selinux/genheaders/Makefile +1 -1
similarity index 52%
rename from scripts/selinux/genheaders/Makefile
rename to scripts/nsalinux/genheaders/Makefile
index 1d1ac51..2a99775 100644
@@ -1,4 +1,4 @@
 hostprogs-y	:= genheaders
-HOST_EXTRACFLAGS += -Isecurity/selinux/include
+HOST_EXTRACFLAGS += -Isecurity/nsalinux/include
 
 always		:= $(hostprogs-y)
scripts/nsalinux/genheaders/genheaders.c renamed from scripts/selinux/genheaders/genheaders.c +2 -2
similarity index 95%
rename from scripts/selinux/genheaders/genheaders.c
rename to scripts/nsalinux/genheaders/genheaders.c
index 539855f..7210769 100644
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
 		initial_sid_to_string[i] = stoupperx(initial_sid_to_string[i]);
 
 	fprintf(fout, "/* This file is automatically generated.  Do not edit. */\n");
-	fprintf(fout, "#ifndef _SELINUX_FLASK_H_\n#define _SELINUX_FLASK_H_\n\n");
+	fprintf(fout, "#ifndef _NSALINUX_FLASK_H_\n#define _NSALINUX_FLASK_H_\n\n");
 
 	for (i = 0; secclass_map[i].name; i++) {
 		struct security_class_mapping *map = &secclass_map[i];
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
 	}
 
 	fprintf(fout, "/* This file is automatically generated.  Do not edit. */\n");
-	fprintf(fout, "#ifndef _SELINUX_AV_PERMISSIONS_H_\n#define _SELINUX_AV_PERMISSIONS_H_\n\n");
+	fprintf(fout, "#ifndef _NSALINUX_AV_PERMISSIONS_H_\n#define _NSALINUX_AV_PERMISSIONS_H_\n\n");
 
 	for (i = 0; secclass_map[i].name; i++) {
 		struct security_class_mapping *map = &secclass_map[i];
scripts/nsalinux/install_policy.sh renamed from scripts/selinux/install_policy.sh +21 -21
similarity index 45%
rename from scripts/selinux/install_policy.sh
rename to scripts/nsalinux/install_policy.sh
index f6a0ce7..41e1e79 100755
@@ -1,6 +1,6 @@
 #!/bin/sh
 if [ `id -u` -ne 0 ]; then
-	echo "$0: must be root to install the selinux policy"
+	echo "$0: must be root to install the nsalinux policy"
 	exit 1
 fi
 SF=`which setfiles`
@@ -8,7 +8,7 @@ if [ $? -eq 1 ]; then
 	if [ -f /sbin/setfiles ]; then
 		SF="/usr/setfiles"
 	else
-		echo "no selinux tools installed: setfiles"
+		echo "no nsalinux tools installed: setfiles"
 		exit 1
 	fi
 fi
@@ -21,39 +21,39 @@ VERS=`$CP -V | awk '{print $1}'`
 ./mdp policy.conf file_contexts
 $CP -o policy.$VERS policy.conf
 
-mkdir -p /etc/selinux/dummy/policy
-mkdir -p /etc/selinux/dummy/contexts/files
+mkdir -p /etc/nsalinux/dummy/policy
+mkdir -p /etc/nsalinux/dummy/contexts/files
 
-cp file_contexts /etc/selinux/dummy/contexts/files
-cp dbus_contexts /etc/selinux/dummy/contexts
-cp policy.$VERS /etc/selinux/dummy/policy
-FC_FILE=/etc/selinux/dummy/contexts/files/file_contexts
+cp file_contexts /etc/nsalinux/dummy/contexts/files
+cp dbus_contexts /etc/nsalinux/dummy/contexts
+cp policy.$VERS /etc/nsalinux/dummy/policy
+FC_FILE=/etc/nsalinux/dummy/contexts/files/file_contexts
 
-if [ ! -d /etc/selinux ]; then
-	mkdir -p /etc/selinux
+if [ ! -d /etc/nsalinux ]; then
+	mkdir -p /etc/nsalinux
 fi
-if [ ! -f /etc/selinux/config ]; then
-	cat > /etc/selinux/config << EOF
-SELINUX=enforcing
-SELINUXTYPE=dummy
+if [ ! -f /etc/nsalinux/config ]; then
+	cat > /etc/nsalinux/config << EOF
+NSALINUX=enforcing
+NSALINUXTYPE=dummy
 EOF
 else
-	TYPE=`cat /etc/selinux/config | grep "^SELINUXTYPE" | tail -1 | awk -F= '{ print $2 '}`
+	TYPE=`cat /etc/nsalinux/config | grep "^NSALINUXTYPE" | tail -1 | awk -F= '{ print $2 '}`
 	if [ "eq$TYPE" != "eqdummy" ]; then
-		selinuxenabled
+		nsalinuxenabled
 		if [ $? -eq 0 ]; then
-			echo "SELinux already enabled with a non-dummy policy."
+			echo "NSALinux already enabled with a non-dummy policy."
 			echo "Exiting.  Please install policy by hand if that"
 			echo "is what you REALLY want."
 			exit 1
 		fi
-		mv /etc/selinux/config /etc/selinux/config.mdpbak
-		grep -v "^SELINUXTYPE" /etc/selinux/config.mdpbak >> /etc/selinux/config
-		echo "SELINUXTYPE=dummy" >> /etc/selinux/config
+		mv /etc/nsalinux/config /etc/nsalinux/config.mdpbak
+		grep -v "^NSALINUXTYPE" /etc/nsalinux/config.mdpbak >> /etc/nsalinux/config
+		echo "NSALINUXTYPE=dummy" >> /etc/nsalinux/config
 	fi
 fi
 
-cd /etc/selinux/dummy/contexts/files
+cd /etc/nsalinux/dummy/contexts/files
 $SF file_contexts /
 
 mounts=`cat /proc/$$/mounts | egrep "ext2|ext3|xfs|jfs|ext4|ext4dev|gfs2" | awk '{ print $2 '}`
scripts/nsalinux/mdp/.gitignore renamed from scripts/selinux/mdp/.gitignore +0 -0
similarity index 100%
rename from scripts/selinux/mdp/.gitignore
rename to scripts/nsalinux/mdp/.gitignore
scripts/nsalinux/mdp/Makefile renamed from scripts/selinux/mdp/Makefile +1 -1
similarity index 63%
rename from scripts/selinux/mdp/Makefile
rename to scripts/nsalinux/mdp/Makefile
index dba7eff..c66f30d 100644
@@ -1,5 +1,5 @@
 hostprogs-y	:= mdp
-HOST_EXTRACFLAGS += -Isecurity/selinux/include
+HOST_EXTRACFLAGS += -Isecurity/nsalinux/include
 
 always		:= $(hostprogs-y)
 clean-files	:= policy.* file_contexts
scripts/nsalinux/mdp/dbus_contexts renamed from scripts/selinux/mdp/dbus_contexts +2 -2
similarity index 86%
rename from scripts/selinux/mdp/dbus_contexts
rename to scripts/nsalinux/mdp/dbus_contexts
index 116e684..86e49fb 100644
@@ -1,6 +1,6 @@
 <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig>
-  <selinux>
-  </selinux>
+  <nsalinux>
+  </nsalinux>
 </busconfig>
scripts/nsalinux/mdp/mdp.c renamed from scripts/selinux/mdp/mdp.c +0 -0
similarity index 100%
rename from scripts/selinux/mdp/mdp.c
rename to scripts/nsalinux/mdp/mdp.c
scripts/selinux/README deleted +0 -2
deleted file mode 100644
index 4d020ec..0000000
@@ -1,2 +0,0 @@
-Please see Documentation/security/SELinux.txt for information on
-installing a dummy SELinux policy.
security/Kconfig +7 -7
index e452378..0b2973d 100644
@@ -36,7 +36,7 @@ config SECURITYFS
 	help
 	  This will build the securityfs filesystem.  It is currently used by
 	  the TPM bios character driver and IMA, an integrity provider.  It is
-	  not used by SELinux or SMACK.
+	  not used by NSALinux or SMACK.
 
 	  If you are unsure how to answer this question, answer N.
 
@@ -103,7 +103,7 @@ config INTEL_TXT
 
 config LSM_MMAP_MIN_ADDR
 	int "Low address space for LSM to protect from user allocation"
-	depends on SECURITY && SECURITY_SELINUX
+	depends on SECURITY && SECURITY_NSALINUX
 	default 32768 if ARM || (ARM64 && COMPAT)
 	default 65536
 	help
@@ -118,7 +118,7 @@ config LSM_MMAP_MIN_ADDR
 	  this low address space will need the permission specific to the
 	  systems running LSM.
 
-source security/selinux/Kconfig
+source security/nsalinux/Kconfig
 source security/smack/Kconfig
 source security/tomoyo/Kconfig
 source security/apparmor/Kconfig
@@ -128,7 +128,7 @@ source security/integrity/Kconfig
 
 choice
 	prompt "Default security module"
-	default DEFAULT_SECURITY_SELINUX if SECURITY_SELINUX
+	default DEFAULT_SECURITY_NSALINUX if SECURITY_NSALINUX
 	default DEFAULT_SECURITY_SMACK if SECURITY_SMACK
 	default DEFAULT_SECURITY_TOMOYO if SECURITY_TOMOYO
 	default DEFAULT_SECURITY_APPARMOR if SECURITY_APPARMOR
@@ -138,8 +138,8 @@ choice
 	  Select the security module that will be used by default if the
 	  kernel parameter security= is not specified.
 
-	config DEFAULT_SECURITY_SELINUX
-		bool "SELinux" if SECURITY_SELINUX=y
+	config DEFAULT_SECURITY_NSALINUX
+		bool "NSALinux" if SECURITY_NSALINUX=y
 
 	config DEFAULT_SECURITY_SMACK
 		bool "Simplified Mandatory Access Control" if SECURITY_SMACK=y
@@ -157,7 +157,7 @@ endchoice
 
 config DEFAULT_SECURITY
 	string
-	default "selinux" if DEFAULT_SECURITY_SELINUX
+	default "nsalinux" if DEFAULT_SECURITY_NSALINUX
 	default "smack" if DEFAULT_SECURITY_SMACK
 	default "tomoyo" if DEFAULT_SECURITY_TOMOYO
 	default "apparmor" if DEFAULT_SECURITY_APPARMOR
security/Makefile +2 -2
index c9bfbc8..5323ecd 100644
@@ -3,7 +3,7 @@
 #
 
 obj-$(CONFIG_KEYS)			+= keys/
-subdir-$(CONFIG_SECURITY_SELINUX)	+= selinux
+subdir-$(CONFIG_SECURITY_NSALINUX)	+= nsalinux
 subdir-$(CONFIG_SECURITY_SMACK)		+= smack
 subdir-$(CONFIG_SECURITY_TOMOYO)        += tomoyo
 subdir-$(CONFIG_SECURITY_APPARMOR)	+= apparmor
@@ -16,7 +16,7 @@ obj-$(CONFIG_MMU)			+= min_addr.o
 # Object file lists
 obj-$(CONFIG_SECURITY)			+= security.o
 obj-$(CONFIG_SECURITYFS)		+= inode.o
-obj-$(CONFIG_SECURITY_SELINUX)		+= selinux/
+obj-$(CONFIG_SECURITY_NSALINUX)		+= nsalinux/
 obj-$(CONFIG_SECURITY_SMACK)		+= smack/
 obj-$(CONFIG_AUDIT)			+= lsm_audit.o
 obj-$(CONFIG_SECURITY_TOMOYO)		+= tomoyo/
security/integrity/evm/Kconfig +1 -1
index e825e0a..08200ec 100644
@@ -32,7 +32,7 @@ config EVM_EXTRA_SMACK_XATTRS
 	help
 	  Include additional SMACK xattrs for HMAC calculation.
 
-	  In addition to the original security xattrs (eg. security.selinux,
+	  In addition to the original security xattrs (eg. security.nsalinux,
 	  security.SMACK64, security.capability, and security.ima) included
 	  in the HMAC calculation, enabling this option includes newly defined
 	  Smack xattrs: security.SMACK64EXEC, security.SMACK64TRANSMUTE and
security/integrity/evm/evm_main.c +2 -2
index e6ea9d4..bc0a87c 100644
@@ -36,8 +36,8 @@ char *evm_hash = "sha1";
 int evm_hmac_attrs;
 
 char *evm_config_xattrnames[] = {
-#ifdef CONFIG_SECURITY_SELINUX
-	XATTR_NAME_SELINUX,
+#ifdef CONFIG_SECURITY_NSALINUX
+	XATTR_NAME_NSALINUX,
 #endif
 #ifdef CONFIG_SECURITY_SMACK
 	XATTR_NAME_SMACK,
security/integrity/ima/Kconfig +1 -1
index e54a8a8..45e8277 100644
@@ -39,7 +39,7 @@ config IMA_MEASURE_PCR_IDX
 
 config IMA_LSM_RULES
 	bool
-	depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
+	depends on IMA && AUDIT && (SECURITY_NSALINUX || SECURITY_SMACK)
 	default y
 	help
 	  Disabling this option will disregard LSM based policy rules.
security/integrity/ima/ima_policy.c +2 -2
index be09e2c..0cfb998 100644
@@ -86,7 +86,7 @@ static struct ima_rule_entry dont_measure_rules[] = {
 	{.action = DONT_MEASURE, .fsmagic = DEVPTS_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = BINFMTFS_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = SECURITYFS_MAGIC, .flags = IMA_FSMAGIC},
-	{.action = DONT_MEASURE, .fsmagic = SELINUX_MAGIC, .flags = IMA_FSMAGIC},
+	{.action = DONT_MEASURE, .fsmagic = NSALINUX_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = CGROUP_SUPER_MAGIC,
 	 .flags = IMA_FSMAGIC},
 	{.action = DONT_MEASURE, .fsmagic = NSFS_MAGIC, .flags = IMA_FSMAGIC}
@@ -126,7 +126,7 @@ static struct ima_rule_entry default_appraise_rules[] = {
 	{.action = DONT_APPRAISE, .fsmagic = DEVPTS_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = BINFMTFS_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = SECURITYFS_MAGIC, .flags = IMA_FSMAGIC},
-	{.action = DONT_APPRAISE, .fsmagic = SELINUX_MAGIC, .flags = IMA_FSMAGIC},
+	{.action = DONT_APPRAISE, .fsmagic = NSALINUX_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = NSFS_MAGIC, .flags = IMA_FSMAGIC},
 	{.action = DONT_APPRAISE, .fsmagic = CGROUP_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 #ifdef CONFIG_IMA_WRITE_POLICY
security/lsm_audit.c +1 -1
index cccbf30..5f8c7a3 100644
@@ -1,7 +1,7 @@
 /*
  * common LSM auditing functions
  *
- * Based on code written for SELinux by :
+ * Based on code written for NSALinux by :
  *			Stephen Smalley, <[email protected]>
  * 			James Morris <[email protected]>
  * Author : Etienne Basset, <[email protected]>
security/nsalinux/.gitignore renamed from security/selinux/.gitignore +0 -0
similarity index 100%
rename from security/selinux/.gitignore
rename to security/nsalinux/.gitignore
security/nsalinux/Kconfig renamed from security/selinux/Kconfig +54 -54
similarity index 47%
rename from security/selinux/Kconfig
rename to security/nsalinux/Kconfig
index 8691e92..0ceb3e5 100644
@@ -1,107 +1,107 @@
-config SECURITY_SELINUX
-	bool "NSA SELinux Support"
+config SECURITY_NSALINUX
+	bool "NSALinux Support"
 	depends on SECURITY_NETWORK && AUDIT && NET && INET
 	select NETWORK_SECMARK
 	default n
 	help
-	  This selects NSA Security-Enhanced Linux (SELinux).
+	  This selects NSALinux.
 	  You will also need a policy configuration and a labeled filesystem.
 	  If you are unsure how to answer this question, answer N.
 
-config SECURITY_SELINUX_BOOTPARAM
-	bool "NSA SELinux boot parameter"
-	depends on SECURITY_SELINUX
+config SECURITY_NSALINUX_BOOTPARAM
+	bool "NSALinux boot parameter"
+	depends on SECURITY_NSALINUX
 	default n
 	help
-	  This option adds a kernel parameter 'selinux', which allows SELinux
-	  to be disabled at boot.  If this option is selected, SELinux
-	  functionality can be disabled with selinux=0 on the kernel
+	  This option adds a kernel parameter 'nsalinux', which allows NSALinux
+	  to be disabled at boot.  If this option is selected, NSALinux
+	  functionality can be disabled with nsalinux=0 on the kernel
 	  command line.  The purpose of this option is to allow a single
-	  kernel image to be distributed with SELinux built in, but not
+	  kernel image to be distributed with NSALinux built in, but not
 	  necessarily enabled.
 
 	  If you are unsure how to answer this question, answer N.
 
-config SECURITY_SELINUX_BOOTPARAM_VALUE
-	int "NSA SELinux boot parameter default value"
-	depends on SECURITY_SELINUX_BOOTPARAM
+config SECURITY_NSALINUX_BOOTPARAM_VALUE
+	int "NSALinux boot parameter default value"
+	depends on SECURITY_NSALINUX_BOOTPARAM
 	range 0 1
 	default 1
 	help
 	  This option sets the default value for the kernel parameter
-	  'selinux', which allows SELinux to be disabled at boot.  If this
-	  option is set to 0 (zero), the SELinux kernel parameter will
-	  default to 0, disabling SELinux at bootup.  If this option is
-	  set to 1 (one), the SELinux kernel parameter will default to 1,
-	  enabling SELinux at bootup.
+	  'nsalinux', which allows NSALinux to be disabled at boot.  If this
+	  option is set to 0 (zero), the NSALinux kernel parameter will
+	  default to 0, disabling NSALinux at bootup.  If this option is
+	  set to 1 (one), the NSALinux kernel parameter will default to 1,
+	  enabling NSALinux at bootup.
 
 	  If you are unsure how to answer this question, answer 1.
 
-config SECURITY_SELINUX_DISABLE
-	bool "NSA SELinux runtime disable"
-	depends on SECURITY_SELINUX
+config SECURITY_NSALINUX_DISABLE
+	bool "NSALinux runtime disable"
+	depends on SECURITY_NSALINUX
 	default n
 	help
-	  This option enables writing to a selinuxfs node 'disable', which
-	  allows SELinux to be disabled at runtime prior to the policy load.
-	  SELinux will then remain disabled until the next boot.
-	  This option is similar to the selinux=0 boot parameter, but is to
-	  support runtime disabling of SELinux, e.g. from /sbin/init, for
+	  This option enables writing to a nsalinuxfs node 'disable', which
+	  allows NSALinux to be disabled at runtime prior to the policy load.
+	  NSALinux will then remain disabled until the next boot.
+	  This option is similar to the nsalinux=0 boot parameter, but is to
+	  support runtime disabling of NSALinux, e.g. from /sbin/init, for
 	  portability across platforms where boot parameters are difficult
 	  to employ.
 
 	  If you are unsure how to answer this question, answer N.
 
-config SECURITY_SELINUX_DEVELOP
-	bool "NSA SELinux Development Support"
-	depends on SECURITY_SELINUX
+config SECURITY_NSALINUX_DEVELOP
+	bool "NSALinux Development Support"
+	depends on SECURITY_NSALINUX
 	default y
 	help
-	  This enables the development support option of NSA SELinux,
-	  which is useful for experimenting with SELinux and developing
+	  This enables the development support option of NSALinux,
+	  which is useful for experimenting with NSALinux and developing
 	  policies.  If unsure, say Y.  With this option enabled, the
 	  kernel will start in permissive mode (log everything, deny nothing)
 	  unless you specify enforcing=1 on the kernel command line.  You
 	  can interactively toggle the kernel between enforcing mode and
-	  permissive mode (if permitted by the policy) via /selinux/enforce.
+	  permissive mode (if permitted by the policy) via /nsalinux/enforce.
 
-config SECURITY_SELINUX_AVC_STATS
-	bool "NSA SELinux AVC Statistics"
-	depends on SECURITY_SELINUX
+config SECURITY_NSALINUX_AVC_STATS
+	bool "NSALinux AVC Statistics"
+	depends on SECURITY_NSALINUX
 	default y
 	help
 	  This option collects access vector cache statistics to
-	  /selinux/avc/cache_stats, which may be monitored via
+	  /nsalinux/avc/cache_stats, which may be monitored via
 	  tools such as avcstat.
 
-config SECURITY_SELINUX_CHECKREQPROT_VALUE
-	int "NSA SELinux checkreqprot default value"
-	depends on SECURITY_SELINUX
+config SECURITY_NSALINUX_CHECKREQPROT_VALUE
+	int "NSALinux checkreqprot default value"
+	depends on SECURITY_NSALINUX
 	range 0 1
 	default 0
 	help
 	  This option sets the default value for the 'checkreqprot' flag
-	  that determines whether SELinux checks the protection requested
+	  that determines whether NSALinux checks the protection requested
 	  by the application or the protection that will be applied by the
 	  kernel (including any implied execute for read-implies-exec) for
 	  mmap and mprotect calls.  If this option is set to 0 (zero),
-	  SELinux will default to checking the protection that will be applied
-	  by the kernel.  If this option is set to 1 (one), SELinux will
+	  NSALinux will default to checking the protection that will be applied
+	  by the kernel.  If this option is set to 1 (one), NSALinux will
 	  default to checking the protection requested by the application.
 	  The checkreqprot flag may be changed from the default via the
 	  'checkreqprot=' boot parameter.  It may also be changed at runtime
-	  via /selinux/checkreqprot if authorized by policy.
+	  via /nsalinux/checkreqprot if authorized by policy.
 
 	  If you are unsure how to answer this question, answer 0.
 
-config SECURITY_SELINUX_POLICYDB_VERSION_MAX
-	bool "NSA SELinux maximum supported policy format version"
-	depends on SECURITY_SELINUX
+config SECURITY_NSALINUX_POLICYDB_VERSION_MAX
+	bool "NSALinux maximum supported policy format version"
+	depends on SECURITY_NSALINUX
 	default n
 	help
 	  This option enables the maximum policy format version supported
-	  by SELinux to be set to a particular value.  This value is reported
-	  to userspace via /selinux/policyvers and used at policy load time.
+	  by NSALinux to be set to a particular value.  This value is reported
+	  to userspace via /nsalinux/policyvers and used at policy load time.
 	  It can be adjusted downward to support legacy userland (init) that
 	  does not correctly handle kernels that support newer policy versions.
 
@@ -112,14 +112,14 @@ config SECURITY_SELINUX_POLICYDB_VERSION_MAX
 
 	  If you are unsure how to answer this question, answer N.
 
-config SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE
-	int "NSA SELinux maximum supported policy format version value"
-	depends on SECURITY_SELINUX_POLICYDB_VERSION_MAX
+config SECURITY_NSALINUX_POLICYDB_VERSION_MAX_VALUE
+	int "NSALinux maximum supported policy format version value"
+	depends on SECURITY_NSALINUX_POLICYDB_VERSION_MAX
 	range 15 23
 	default 19
 	help
 	  This option sets the value for the maximum policy format version
-	  supported by SELinux.
+	  supported by NSALinux.
 
 	  Examples:
 	  For Fedora Core 3, use 18.
@@ -128,6 +128,6 @@ config SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE
 	  If you are unsure how to answer this question, look for the
 	  policy format version supported by your policy toolchain, by
 	  running 'checkpolicy -V'. Or look at what policy you have
-	  installed under /etc/selinux/$SELINUXTYPE/policy, where
-	  SELINUXTYPE is defined in your /etc/selinux/config.
+	  installed under /etc/nsalinux/$NSALINUXTYPE/policy, where
+	  NSALINUXTYPE is defined in your /etc/nsalinux/config.
 
security/nsalinux/Makefile renamed from security/selinux/Makefile +8 -8
similarity index 41%
rename from security/selinux/Makefile
rename to security/nsalinux/Makefile
index 3411c33..dd6d724 100644
@@ -1,24 +1,24 @@
 #
-# Makefile for building the SELinux module as part of the kernel tree.
+# Makefile for building the NSALinux module as part of the kernel tree.
 #
 
-obj-$(CONFIG_SECURITY_SELINUX) := selinux.o
+obj-$(CONFIG_SECURITY_NSALINUX) := nsalinux.o
 
-selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \
+nsalinux-y := avc.o hooks.o nsalinuxfs.o netlink.o nlmsgtab.o netif.o \
 	     netnode.o netport.o exports.o \
 	     ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \
 	     ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o
 
-selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
+nsalinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o
 
-selinux-$(CONFIG_NETLABEL) += netlabel.o
+nsalinux-$(CONFIG_NETLABEL) += netlabel.o
 
-ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
+ccflags-y := -I$(srctree)/security/nsalinux -I$(srctree)/security/nsalinux/include
 
-$(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h
+$(addprefix $(obj)/,$(nsalinux-y)): $(obj)/flask.h
 
 quiet_cmd_flask = GEN     $(obj)/flask.h $(obj)/av_permissions.h
-      cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
+      cmd_flask = scripts/nsalinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
 
 targets += flask.h av_permissions.h
 $(obj)/flask.h: $(src)/include/classmap.h FORCE
security/nsalinux/avc.c renamed from security/selinux/avc.c +17 -17
similarity index 97%
rename from security/selinux/avc.c
rename to security/nsalinux/avc.c
index e60c79d..19a3a48 100644
@@ -38,7 +38,7 @@
 #define AVC_DEF_CACHE_THRESHOLD		512
 #define AVC_CACHE_RECLAIM		16
 
-#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+#ifdef CONFIG_SECURITY_NSALINUX_AVC_STATS
 #define avc_cache_stats_incr(field)	this_cpu_inc(avc_cache_stats.field)
 #else
 #define avc_cache_stats_incr(field)	do {} while (0)
@@ -85,7 +85,7 @@ struct avc_callback_node {
 /* Exported via selinufs */
 unsigned int avc_cache_threshold = AVC_DEF_CACHE_THRESHOLD;
 
-#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
+#ifdef CONFIG_SECURITY_NSALINUX_AVC_STATS
 DEFINE_PER_CPU(struct avc_cache_stats, avc_cache_stats) = { 0 };
 #endif
 
@@ -627,7 +627,7 @@ static int avc_latest_notif_update(int seqno, int is_insert)
 	spin_lock_irqsave(&notif_lock, flag);
 	if (is_insert) {
 		if (seqno < avc_cache.latest_notif) {
-			printk(KERN_WARNING "SELinux: avc:  seqno %d < latest_notif %d\n",
+			printk(KERN_WARNING "NSALinux: avc:  seqno %d < latest_notif %d\n",
 			       seqno, avc_cache.latest_notif);
 			ret = -EAGAIN;
 		}
@@ -703,7 +703,7 @@ out:
 }
 
 /**
- * avc_audit_pre_callback - SELinux specific information
+ * avc_audit_pre_callback - NSALinux specific information
  * will be called by generic audit code
  * @ab: the audit buffer
  * @a: audit_data
@@ -712,14 +712,14 @@ static void avc_audit_pre_callback(struct audit_buffer *ab, void *a)
 {
 	struct common_audit_data *ad = a;
 	audit_log_format(ab, "avc:  %s ",
-			 ad->selinux_audit_data->denied ? "denied" : "granted");
-	avc_dump_av(ab, ad->selinux_audit_data->tclass,
-			ad->selinux_audit_data->audited);
+			 ad->nsalinux_audit_data->denied ? "denied" : "granted");
+	avc_dump_av(ab, ad->nsalinux_audit_data->tclass,
+			ad->nsalinux_audit_data->audited);
 	audit_log_format(ab, " for ");
 }
 
 /**
- * avc_audit_post_callback - SELinux specific information
+ * avc_audit_post_callback - NSALinux specific information
  * will be called by generic audit code
  * @ab: the audit buffer
  * @a: audit_data
@@ -728,12 +728,12 @@ static void avc_audit_post_callback(struct audit_buffer *ab, void *a)
 {
 	struct common_audit_data *ad = a;
 	audit_log_format(ab, " ");
-	avc_dump_query(ab, ad->selinux_audit_data->ssid,
-			   ad->selinux_audit_data->tsid,
-			   ad->selinux_audit_data->tclass);
-	if (ad->selinux_audit_data->denied) {
+	avc_dump_query(ab, ad->nsalinux_audit_data->ssid,
+			   ad->nsalinux_audit_data->tsid,
+			   ad->nsalinux_audit_data->tclass);
+	if (ad->nsalinux_audit_data->denied) {
 		audit_log_format(ab, " permissive=%u",
-				 ad->selinux_audit_data->result ? 0 : 1);
+				 ad->nsalinux_audit_data->result ? 0 : 1);
 	}
 }
 
@@ -744,7 +744,7 @@ noinline int slow_avc_audit(u32 ssid, u32 tsid, u16 tclass,
 		unsigned flags)
 {
 	struct common_audit_data stack_data;
-	struct selinux_audit_data sad;
+	struct nsalinux_audit_data sad;
 
 	if (!a) {
 		a = &stack_data;
@@ -770,7 +770,7 @@ noinline int slow_avc_audit(u32 ssid, u32 tsid, u16 tclass,
 	sad.denied = denied;
 	sad.result = result;
 
-	a->selinux_audit_data = &sad;
+	a->nsalinux_audit_data = &sad;
 
 	common_lsm_audit(a, avc_audit_pre_callback, avc_audit_post_callback);
 	return 0;
@@ -986,7 +986,7 @@ static noinline int avc_denied(u32 ssid, u32 tsid,
 	if (flags & AVC_STRICT)
 		return -EACCES;
 
-	if (selinux_enforcing && !(avd->flags & AVD_FLAGS_PERMISSIVE))
+	if (nsalinux_enforcing && !(avd->flags & AVD_FLAGS_PERMISSIVE))
 		return -EACCES;
 
 	avc_update_node(AVC_CALLBACK_GRANT, requested, driver, xperm, ssid,
@@ -1181,7 +1181,7 @@ void avc_disable(void)
 	 * not destroying the avc_node_cachep it might be easy to fix, but
 	 * I don't know the memory barrier semantics well enough to know.  It's
 	 * possible that some other task dereferenced security_ops when
-	 * it still pointed to selinux operations.  If that is the case it's
+	 * it still pointed to nsalinux operations.  If that is the case it's
 	 * possible that it is about to use the avc and is about to need the
 	 * avc_node_cachep.  I know I could wrap the security.c security_ops call
 	 * in an rcu_lock, but seriously, it's not worth it.  Instead I just flush
security/nsalinux/exports.c renamed from security/selinux/exports.c +5 -5
similarity index 74%
rename from security/selinux/exports.c
rename to security/nsalinux/exports.c
index e75dd94..73a01e9 100644
@@ -1,5 +1,5 @@
 /*
- * SELinux services exported to the rest of the kernel.
+ * NSALinux services exported to the rest of the kernel.
  *
  * Author: James Morris <[email protected]>
  *
@@ -12,12 +12,12 @@
  * as published by the Free Software Foundation.
  */
 #include <linux/module.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 
 #include "security.h"
 
-bool selinux_is_enabled(void)
+bool nsalinux_is_enabled(void)
 {
-	return selinux_enabled;
+	return nsalinux_enabled;
 }
-EXPORT_SYMBOL_GPL(selinux_is_enabled);
+EXPORT_SYMBOL_GPL(nsalinux_is_enabled);
security/nsalinux/hooks.c renamed from security/selinux/hooks.c +611 -611
similarity index 78%
rename from security/selinux/hooks.c
rename to security/nsalinux/hooks.c
index 912deee..cd63e5e 100644
@@ -1,7 +1,7 @@
 /*
- *  NSA Security-Enhanced Linux (SELinux) security module
+ *  NSALinux security module
  *
- *  This file contains the SELinux hook function implementations.
+ *  This file contains the NSALinux hook function implementations.
  *
  *  Authors:  Stephen Smalley, <[email protected]>
  *	      Chris Vance, <[email protected]>
@@ -75,7 +75,7 @@
 #include <linux/personality.h>
 #include <linux/audit.h>
 #include <linux/string.h>
-#include <linux/selinux.h>
+#include <linux/nsalinux.h>
 #include <linux/mutex.h>
 #include <linux/posix-timers.h>
 #include <linux/syslog.h>
@@ -95,41 +95,41 @@
 #include "avc_ss.h"
 
 /* SECMARK reference count */
-static atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
+static atomic_t nsalinux_secmark_refcount = ATOMIC_INIT(0);
 
-#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
-int selinux_enforcing;
+#ifdef CONFIG_SECURITY_NSALINUX_DEVELOP
+int nsalinux_enforcing;
 
 static int __init enforcing_setup(char *str)
 {
 	unsigned long enforcing;
 	if (!kstrtoul(str, 0, &enforcing))
-		selinux_enforcing = enforcing ? 1 : 0;
+		nsalinux_enforcing = enforcing ? 1 : 0;
 	return 1;
 }
 __setup("enforcing=", enforcing_setup);
 #endif
 
-#ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM
-int selinux_enabled = CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE;
+#ifdef CONFIG_SECURITY_NSALINUX_BOOTPARAM
+int nsalinux_enabled = CONFIG_SECURITY_NSALINUX_BOOTPARAM_VALUE;
 
-static int __init selinux_enabled_setup(char *str)
+static int __init nsalinux_enabled_setup(char *str)
 {
 	unsigned long enabled;
 	if (!kstrtoul(str, 0, &enabled))
-		selinux_enabled = enabled ? 1 : 0;
+		nsalinux_enabled = enabled ? 1 : 0;
 	return 1;
 }
-__setup("selinux=", selinux_enabled_setup);
+__setup("nsalinux=", nsalinux_enabled_setup);
 #else
-int selinux_enabled = 1;
+int nsalinux_enabled = 1;
 #endif
 
 static struct kmem_cache *sel_inode_cache;
 static struct kmem_cache *file_security_cache;
 
 /**
- * selinux_secmark_enabled - Check to see if SECMARK is currently enabled
+ * nsalinux_secmark_enabled - Check to see if SECMARK is currently enabled
  *
  * Description:
  * This function checks the SECMARK reference counter to see if any SECMARK
@@ -139,13 +139,13 @@ static struct kmem_cache *file_security_cache;
  * policy capability is enabled, SECMARK is always considered enabled.
  *
  */
-static int selinux_secmark_enabled(void)
+static int nsalinux_secmark_enabled(void)
 {
-	return (selinux_policycap_alwaysnetwork || atomic_read(&selinux_secmark_refcount));
+	return (nsalinux_policycap_alwaysnetwork || atomic_read(&nsalinux_secmark_refcount));
 }
 
 /**
- * selinux_peerlbl_enabled - Check to see if peer labeling is currently enabled
+ * nsalinux_peerlbl_enabled - Check to see if peer labeling is currently enabled
  *
  * Description:
  * This function checks if NetLabel or labeled IPSEC is enabled.  Returns true
@@ -154,12 +154,12 @@ static int selinux_secmark_enabled(void)
  * is always considered enabled.
  *
  */
-static int selinux_peerlbl_enabled(void)
+static int nsalinux_peerlbl_enabled(void)
 {
-	return (selinux_policycap_alwaysnetwork || netlbl_enabled() || selinux_xfrm_enabled());
+	return (nsalinux_policycap_alwaysnetwork || netlbl_enabled() || nsalinux_xfrm_enabled());
 }
 
-static int selinux_netcache_avc_callback(u32 event)
+static int nsalinux_netcache_avc_callback(u32 event)
 {
 	if (event == AVC_CALLBACK_RESET) {
 		sel_netif_flush();
@@ -180,7 +180,7 @@ static void cred_init_security(void)
 
 	tsec = kzalloc(sizeof(struct task_security_struct), GFP_KERNEL);
 	if (!tsec)
-		panic("SELinux:  Failed to initialize initial task.\n");
+		panic("NSALinux:  Failed to initialize initial task.\n");
 
 	tsec->osid = tsec->sid = SECINITSID_KERNEL;
 	cred->security = tsec;
@@ -339,7 +339,7 @@ static void inode_free_security(struct inode *inode)
 
 	/*
 	 * The inode may still be referenced in a path walk and
-	 * a call to selinux_inode_permission() can be made
+	 * a call to nsalinux_inode_permission() can be made
 	 * after inode_free_security() is called. Ideally, the VFS
 	 * wouldn't do this, but fixing that is a much harder
 	 * job. For now, simply free the i_security via RCU, and
@@ -437,7 +437,7 @@ static const match_table_t tokens = {
 	{Opt_error, NULL},
 };
 
-#define SEL_MOUNT_FAIL_MSG "SELinux:  duplicate or incompatible mount options\n"
+#define SEL_MOUNT_FAIL_MSG "NSALinux:  duplicate or incompatible mount options\n"
 
 static int may_context_mount_sb_relabel(u32 sid,
 			struct superblock_security_struct *sbsec,
@@ -472,7 +472,7 @@ static int may_context_mount_inode_relabel(u32 sid,
 	return rc;
 }
 
-static int selinux_is_sblabel_mnt(struct super_block *sb)
+static int nsalinux_is_sblabel_mnt(struct super_block *sb)
 {
 	struct superblock_security_struct *sbsec = sb->s_security;
 
@@ -498,22 +498,22 @@ static int sb_finish_set_opts(struct super_block *sb)
 		/* Make sure that the xattr handler exists and that no
 		   error other than -ENODATA is returned by getxattr on
 		   the root directory.  -ENODATA is ok, as this may be
-		   the first boot of the SELinux kernel before we have
+		   the first boot of the NSALinux kernel before we have
 		   assigned xattr values to the filesystem. */
 		if (!root_inode->i_op->getxattr) {
-			printk(KERN_WARNING "SELinux: (dev %s, type %s) has no "
+			printk(KERN_WARNING "NSALinux: (dev %s, type %s) has no "
 			       "xattr support\n", sb->s_id, sb->s_type->name);
 			rc = -EOPNOTSUPP;
 			goto out;
 		}
-		rc = root_inode->i_op->getxattr(root, XATTR_NAME_SELINUX, NULL, 0);
+		rc = root_inode->i_op->getxattr(root, XATTR_NAME_NSALINUX, NULL, 0);
 		if (rc < 0 && rc != -ENODATA) {
 			if (rc == -EOPNOTSUPP)
-				printk(KERN_WARNING "SELinux: (dev %s, type "
+				printk(KERN_WARNING "NSALinux: (dev %s, type "
 				       "%s) has no security xattr handler\n",
 				       sb->s_id, sb->s_type->name);
 			else
-				printk(KERN_WARNING "SELinux: (dev %s, type "
+				printk(KERN_WARNING "NSALinux: (dev %s, type "
 				       "%s) getxattr errno %d\n", sb->s_id,
 				       sb->s_type->name, -rc);
 			goto out;
@@ -521,11 +521,11 @@ static int sb_finish_set_opts(struct super_block *sb)
 	}
 
 	if (sbsec->behavior > ARRAY_SIZE(labeling_behaviors))
-		printk(KERN_ERR "SELinux: initialized (dev %s, type %s), unknown behavior\n",
+		printk(KERN_ERR "NSALinux: initialized (dev %s, type %s), unknown behavior\n",
 		       sb->s_id, sb->s_type->name);
 
 	sbsec->flags |= SE_SBINITIALIZED;
-	if (selinux_is_sblabel_mnt(sb))
+	if (nsalinux_is_sblabel_mnt(sb))
 		sbsec->flags |= SBLABEL_MNT;
 
 	/* Initialize the root inode. */
@@ -563,7 +563,7 @@ out:
  * options were so it can use those later for submounts, displaying
  * mount options, or whatever.
  */
-static int selinux_get_mnt_opts(const struct super_block *sb,
+static int nsalinux_get_mnt_opts(const struct super_block *sb,
 				struct security_mnt_opts *opts)
 {
 	int rc = 0, i;
@@ -676,7 +676,7 @@ static int bad_option(struct superblock_security_struct *sbsec, char flag,
  * Allow filesystems with binary mount data to explicitly set mount point
  * labeling information.
  */
-static int selinux_set_mnt_opts(struct super_block *sb,
+static int nsalinux_set_mnt_opts(struct super_block *sb,
 				struct security_mnt_opts *opts,
 				unsigned long kern_flags,
 				unsigned long *set_kern_flags)
@@ -697,13 +697,13 @@ static int selinux_set_mnt_opts(struct super_block *sb,
 
 	if (!ss_initialized) {
 		if (!num_opts) {
-			/* Defer initialization until selinux_complete_init,
+			/* Defer initialization until nsalinux_complete_init,
 			   after the initial policy is loaded and the security
 			   server is ready to handle calls. */
 			goto out;
 		}
 		rc = -EINVAL;
-		printk(KERN_WARNING "SELinux: Unable to set superblock options "
+		printk(KERN_WARNING "NSALinux: Unable to set superblock options "
 			"before the security server is initialized\n");
 		goto out;
 	}
@@ -741,7 +741,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
 			continue;
 		rc = security_context_str_to_sid(mount_options[i], &sid, GFP_KERNEL);
 		if (rc) {
-			printk(KERN_WARNING "SELinux: security_context_str_to_sid"
+			printk(KERN_WARNING "NSALinux: security_context_str_to_sid"
 			       "(%s) failed for (dev %s, type %s) errno=%d\n",
 			       mount_options[i], sb->s_id, name, rc);
 			goto out;
@@ -873,7 +873,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
 		if (sbsec->behavior != SECURITY_FS_USE_XATTR &&
 			sbsec->behavior != SECURITY_FS_USE_NATIVE) {
 			rc = -EINVAL;
-			printk(KERN_WARNING "SELinux: defcontext option is "
+			printk(KERN_WARNING "NSALinux: defcontext option is "
 			       "invalid for this filesystem type\n");
 			goto out;
 		}
@@ -894,12 +894,12 @@ out:
 	return rc;
 out_double_mount:
 	rc = -EINVAL;
-	printk(KERN_WARNING "SELinux: mount invalid.  Same superblock, different "
+	printk(KERN_WARNING "NSALinux: mount invalid.  Same superblock, different "
 	       "security settings for (dev %s, type %s)\n", sb->s_id, name);
 	goto out;
 }
 
-static int selinux_cmp_sb_context(const struct super_block *oldsb,
+static int nsalinux_cmp_sb_context(const struct super_block *oldsb,
 				    const struct super_block *newsb)
 {
 	struct superblock_security_struct *old = oldsb->s_security;
@@ -923,13 +923,13 @@ static int selinux_cmp_sb_context(const struct super_block *oldsb,
 	}
 	return 0;
 mismatch:
-	printk(KERN_WARNING "SELinux: mount invalid.  Same superblock, "
+	printk(KERN_WARNING "NSALinux: mount invalid.  Same superblock, "
 			    "different security settings for (dev %s, "
 			    "type %s)\n", newsb->s_id, newsb->s_type->name);
 	return -EBUSY;
 }
 
-static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb,
+static int nsalinux_sb_clone_mnt_opts(const struct super_block *oldsb,
 					struct super_block *newsb)
 {
 	const struct superblock_security_struct *oldsbsec = oldsb->s_security;
@@ -951,7 +951,7 @@ static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb,
 
 	/* if fs is reusing a sb, make sure that the contexts match */
 	if (newsbsec->flags & SE_SBINITIALIZED)
-		return selinux_cmp_sb_context(oldsb, newsb);
+		return nsalinux_cmp_sb_context(oldsb, newsb);
 
 	mutex_lock(&newsbsec->lock);
 
@@ -984,7 +984,7 @@ static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb,
 	return 0;
 }
 
-static int selinux_parse_opts_str(char *options,
+static int nsalinux_parse_opts_str(char *options,
 				  struct security_mnt_opts *opts)
 {
 	char *p;
@@ -1060,7 +1060,7 @@ static int selinux_parse_opts_str(char *options,
 			break;
 		default:
 			rc = -EINVAL;
-			printk(KERN_WARNING "SELinux:  unknown mount option\n");
+			printk(KERN_WARNING "NSALinux:  unknown mount option\n");
 			goto out_err;
 
 		}
@@ -1120,19 +1120,19 @@ static int superblock_doinit(struct super_block *sb, void *data)
 
 	BUG_ON(sb->s_type->fs_flags & FS_BINARY_MOUNTDATA);
 
-	rc = selinux_parse_opts_str(options, &opts);
+	rc = nsalinux_parse_opts_str(options, &opts);
 	if (rc)
 		goto out_err;
 
 out:
-	rc = selinux_set_mnt_opts(sb, &opts, 0, NULL);
+	rc = nsalinux_set_mnt_opts(sb, &opts, 0, NULL);
 
 out_err:
 	security_free_mnt_opts(&opts);
 	return rc;
 }
 
-static void selinux_write_opts(struct seq_file *m,
+static void nsalinux_write_opts(struct seq_file *m,
 			       struct security_mnt_opts *opts)
 {
 	int i;
@@ -1178,12 +1178,12 @@ static void selinux_write_opts(struct seq_file *m,
 	}
 }
 
-static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
+static int nsalinux_sb_show_options(struct seq_file *m, struct super_block *sb)
 {
 	struct security_mnt_opts opts;
 	int rc;
 
-	rc = selinux_get_mnt_opts(sb, &opts);
+	rc = nsalinux_get_mnt_opts(sb, &opts);
 	if (rc) {
 		/* before policy load we may get EINVAL, don't show anything */
 		if (rc == -EINVAL)
@@ -1191,7 +1191,7 @@ static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
 		return rc;
 	}
 
-	selinux_write_opts(m, &opts);
+	nsalinux_write_opts(m, &opts);
 
 	security_free_mnt_opts(&opts);
 
@@ -1272,8 +1272,8 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
 			return SECCLASS_NETLINK_NFLOG_SOCKET;
 		case NETLINK_XFRM:
 			return SECCLASS_NETLINK_XFRM_SOCKET;
-		case NETLINK_SELINUX:
-			return SECCLASS_NETLINK_SELINUX_SOCKET;
+		case NETLINK_NSALINUX:
+			return SECCLASS_NETLINK_NSALINUX_SOCKET;
 		case NETLINK_ISCSI:
 			return SECCLASS_NETLINK_ISCSI_SOCKET;
 		case NETLINK_AUDIT:
@@ -1310,7 +1310,7 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
 	return SECCLASS_SOCKET;
 }
 
-static int selinux_genfs_get_sid(struct dentry *dentry,
+static int nsalinux_genfs_get_sid(struct dentry *dentry,
 				 u16 tclass,
 				 u16 flags,
 				 u32 *sid)
@@ -1329,7 +1329,7 @@ static int selinux_genfs_get_sid(struct dentry *dentry,
 	else {
 		if (flags & SE_SBPROC) {
 			/* each process gets a /proc/PID/ entry. Strip off the
-			 * PID part to get a valid selinux labeling.
+			 * PID part to get a valid nsalinux labeling.
 			 * e.g. /proc/1/net/rpc/nfs -> /net/rpc/nfs */
 			while (path[1] >= '0' && path[1] <= '9') {
 				path[1] = '/';
@@ -1363,7 +1363,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 
 	sbsec = inode->i_sb->s_security;
 	if (!(sbsec->flags & SE_SBINITIALIZED)) {
-		/* Defer initialization until selinux_complete_init,
+		/* Defer initialization until nsalinux_complete_init,
 		   after the initial policy is loaded and the security
 		   server is ready to handle calls. */
 		spin_lock(&sbsec->isec_lock);
@@ -1388,7 +1388,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 			/* Called from d_instantiate or d_splice_alias. */
 			dentry = dget(opt_dentry);
 		} else {
-			/* Called from selinux_complete_init, try to find a dentry. */
+			/* Called from nsalinux_complete_init, try to find a dentry. */
 			dentry = d_find_alias(inode);
 		}
 		if (!dentry) {
@@ -1412,13 +1412,13 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 			goto out_unlock;
 		}
 		context[len] = '\0';
-		rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX,
+		rc = inode->i_op->getxattr(dentry, XATTR_NAME_NSALINUX,
 					   context, len);
 		if (rc == -ERANGE) {
 			kfree(context);
 
 			/* Need a larger buffer.  Query for the right size. */
-			rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX,
+			rc = inode->i_op->getxattr(dentry, XATTR_NAME_NSALINUX,
 						   NULL, 0);
 			if (rc < 0) {
 				dput(dentry);
@@ -1433,13 +1433,13 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 			}
 			context[len] = '\0';
 			rc = inode->i_op->getxattr(dentry,
-						   XATTR_NAME_SELINUX,
+						   XATTR_NAME_NSALINUX,
 						   context, len);
 		}
 		dput(dentry);
 		if (rc < 0) {
 			if (rc != -ENODATA) {
-				printk(KERN_WARNING "SELinux: %s:  getxattr returned "
+				printk(KERN_WARNING "NSALinux: %s:  getxattr returned "
 				       "%d for dev=%s ino=%ld\n", __func__,
 				       -rc, inode->i_sb->s_id, inode->i_ino);
 				kfree(context);
@@ -1458,11 +1458,11 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 
 				if (rc == -EINVAL) {
 					if (printk_ratelimit())
-						printk(KERN_NOTICE "SELinux: inode=%lu on dev=%s was found to have an invalid "
+						printk(KERN_NOTICE "NSALinux: inode=%lu on dev=%s was found to have an invalid "
 							"context=%s.  This indicates you may need to relabel the inode or the "
 							"filesystem in question.\n", ino, dev, context);
 				} else {
-					printk(KERN_WARNING "SELinux: %s:  context_to_sid(%s) "
+					printk(KERN_WARNING "NSALinux: %s:  context_to_sid(%s) "
 					       "returned %d for dev=%s ino=%ld\n",
 					       __func__, context, -rc, dev, ino);
 				}
@@ -1505,7 +1505,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 				 * d_splice_alias. */
 				dentry = dget(opt_dentry);
 			else
-				/* Called from selinux_complete_init, try to
+				/* Called from nsalinux_complete_init, try to
 				 * find a dentry. */
 				dentry = d_find_alias(inode);
 			/*
@@ -1520,7 +1520,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
 			if (!dentry)
 				goto out_unlock;
 			isec->sclass = inode_mode_to_security_class(inode->i_mode);
-			rc = selinux_genfs_get_sid(dentry, isec->sclass,
+			rc = nsalinux_genfs_get_sid(dentry, isec->sclass,
 						   sbsec->flags, &sid);
 			dput(dentry);
 			if (rc)
@@ -1617,7 +1617,7 @@ static int current_has_perm(const struct task_struct *tsk,
 }
 
 #if CAP_LAST_CAP > 63
-#error Fix SELinux to handle capabilities > 63.
+#error Fix NSALinux to handle capabilities > 63.
 #endif
 
 /* Check whether a task is allowed to use a capability. */
@@ -1643,7 +1643,7 @@ static int cred_has_capability(const struct cred *cred,
 		break;
 	default:
 		printk(KERN_ERR
-		       "SELinux:  out of range capability %d\n", cap);
+		       "NSALinux:  out of range capability %d\n", cap);
 		BUG();
 		return -EINVAL;
 	}
@@ -1775,7 +1775,7 @@ out:
 /*
  * Determine the label for an inode that might be unioned.
  */
-static int selinux_determine_inode_label(struct inode *dir,
+static int nsalinux_determine_inode_label(struct inode *dir,
 					 const struct qstr *name,
 					 u16 tclass,
 					 u32 *_new_isid)
@@ -1824,7 +1824,7 @@ static int may_create(struct inode *dir,
 	if (rc)
 		return rc;
 
-	rc = selinux_determine_inode_label(dir, &dentry->d_name, tclass,
+	rc = nsalinux_determine_inode_label(dir, &dentry->d_name, tclass,
 					   &newsid);
 	if (rc)
 		return rc;
@@ -1886,7 +1886,7 @@ static int may_link(struct inode *dir,
 		av = DIR__RMDIR;
 		break;
 	default:
-		printk(KERN_WARNING "SELinux: %s:  unrecognized kind %d\n",
+		printk(KERN_WARNING "NSALinux: %s:  unrecognized kind %d\n",
 			__func__, kind);
 		return 0;
 	}
@@ -2022,7 +2022,7 @@ static inline u32 open_file_to_av(struct file *file)
 {
 	u32 av = file_to_av(file);
 
-	if (selinux_policycap_openperm)
+	if (nsalinux_policycap_openperm)
 		av |= FILE__OPEN;
 
 	return av;
@@ -2030,7 +2030,7 @@ static inline u32 open_file_to_av(struct file *file)
 
 /* Hook functions begin here. */
 
-static int selinux_binder_set_context_mgr(struct task_struct *mgr)
+static int nsalinux_binder_set_context_mgr(struct task_struct *mgr)
 {
 	u32 mysid = current_sid();
 	u32 mgrsid = task_sid(mgr);
@@ -2039,7 +2039,7 @@ static int selinux_binder_set_context_mgr(struct task_struct *mgr)
 			    BINDER__SET_CONTEXT_MGR, NULL);
 }
 
-static int selinux_binder_transaction(struct task_struct *from,
+static int nsalinux_binder_transaction(struct task_struct *from,
 				      struct task_struct *to)
 {
 	u32 mysid = current_sid();
@@ -2058,7 +2058,7 @@ static int selinux_binder_transaction(struct task_struct *from,
 			    NULL);
 }
 
-static int selinux_binder_transfer_binder(struct task_struct *from,
+static int nsalinux_binder_transfer_binder(struct task_struct *from,
 					  struct task_struct *to)
 {
 	u32 fromsid = task_sid(from);
@@ -2068,7 +2068,7 @@ static int selinux_binder_transfer_binder(struct task_struct *from,
 			    NULL);
 }
 
-static int selinux_binder_transfer_file(struct task_struct *from,
+static int nsalinux_binder_transfer_file(struct task_struct *from,
 					struct task_struct *to,
 					struct file *file)
 {
@@ -2098,7 +2098,7 @@ static int selinux_binder_transfer_file(struct task_struct *from,
 			    &ad);
 }
 
-static int selinux_ptrace_access_check(struct task_struct *child,
+static int nsalinux_ptrace_access_check(struct task_struct *child,
 				     unsigned int mode)
 {
 	if (mode & PTRACE_MODE_READ) {
@@ -2110,18 +2110,18 @@ static int selinux_ptrace_access_check(struct task_struct *child,
 	return current_has_perm(child, PROCESS__PTRACE);
 }
 
-static int selinux_ptrace_traceme(struct task_struct *parent)
+static int nsalinux_ptrace_traceme(struct task_struct *parent)
 {
 	return task_has_perm(parent, current, PROCESS__PTRACE);
 }
 
-static int selinux_capget(struct task_struct *target, kernel_cap_t *effective,
+static int nsalinux_capget(struct task_struct *target, kernel_cap_t *effective,
 			  kernel_cap_t *inheritable, kernel_cap_t *permitted)
 {
 	return current_has_perm(target, PROCESS__GETCAP);
 }
 
-static int selinux_capset(struct cred *new, const struct cred *old,
+static int nsalinux_capset(struct cred *new, const struct cred *old,
 			  const kernel_cap_t *effective,
 			  const kernel_cap_t *inheritable,
 			  const kernel_cap_t *permitted)
@@ -2130,22 +2130,22 @@ static int selinux_capset(struct cred *new, const struct cred *old,
 }
 
 /*
- * (This comment used to live with the selinux_task_setuid hook,
+ * (This comment used to live with the nsalinux_task_setuid hook,
  * which was removed).
  *
- * Since setuid only affects the current process, and since the SELinux
- * controls are not based on the Linux identity attributes, SELinux does not
- * need to control this operation.  However, SELinux does control the use of
+ * Since setuid only affects the current process, and since the NSALinux
+ * controls are not based on the Linux identity attributes, NSALinux does not
+ * need to control this operation.  However, NSALinux does control the use of
  * the CAP_SETUID and CAP_SETGID capabilities using the capable hook.
  */
 
-static int selinux_capable(const struct cred *cred, struct user_namespace *ns,
+static int nsalinux_capable(const struct cred *cred, struct user_namespace *ns,
 			   int cap, int audit)
 {
 	return cred_has_capability(cred, cap, audit);
 }
 
-static int selinux_quotactl(int cmds, int type, int id, struct super_block *sb)
+static int nsalinux_quotactl(int cmds, int type, int id, struct super_block *sb)
 {
 	const struct cred *cred = current_cred();
 	int rc = 0;
@@ -2173,14 +2173,14 @@ static int selinux_quotactl(int cmds, int type, int id, struct super_block *sb)
 	return rc;
 }
 
-static int selinux_quota_on(struct dentry *dentry)
+static int nsalinux_quota_on(struct dentry *dentry)
 {
 	const struct cred *cred = current_cred();
 
 	return dentry_has_perm(cred, dentry, FILE__QUOTAON);
 }
 
-static int selinux_syslog(int type)
+static int nsalinux_syslog(int type)
 {
 	int rc;
 
@@ -2212,10 +2212,10 @@ static int selinux_syslog(int type)
  * mapping. 0 means there is enough memory for the allocation to
  * succeed and -ENOMEM implies there is not.
  *
- * Do not audit the selinux permission check, as this is applied to all
+ * Do not audit the nsalinux permission check, as this is applied to all
  * processes that allocate mappings.
  */
-static int selinux_vm_enough_memory(struct mm_struct *mm, long pages)
+static int nsalinux_vm_enough_memory(struct mm_struct *mm, long pages)
 {
 	int rc, cap_sys_admin = 0;
 
@@ -2264,7 +2264,7 @@ static int check_nnp_nosuid(const struct linux_binprm *bprm,
 	return 0;
 }
 
-static int selinux_bprm_set_creds(struct linux_binprm *bprm)
+static int nsalinux_bprm_set_creds(struct linux_binprm *bprm)
 {
 	const struct task_security_struct *old_tsec;
 	struct task_security_struct *new_tsec;
@@ -2273,7 +2273,7 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm)
 	struct inode *inode = file_inode(bprm->file);
 	int rc;
 
-	/* SELinux context only depends on initial program or script and not
+	/* NSALinux context only depends on initial program or script and not
 	 * the script interpreter */
 	if (bprm->cred_prepared)
 		return 0;
@@ -2378,7 +2378,7 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm)
 	return 0;
 }
 
-static int selinux_bprm_secureexec(struct linux_binprm *bprm)
+static int nsalinux_bprm_secureexec(struct linux_binprm *bprm)
 {
 	const struct task_security_struct *tsec = current_security();
 	u32 sid, osid;
@@ -2442,7 +2442,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
 	if (!n) /* none found? */
 		return;
 
-	devnull = dentry_open(&selinux_null, O_RDWR, cred);
+	devnull = dentry_open(&nsalinux_null, O_RDWR, cred);
 	if (IS_ERR(devnull))
 		devnull = NULL;
 	/* replace all the matching ones with this */
@@ -2456,7 +2456,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
 /*
  * Prepare a process for imminent new credential changes due to exec
  */
-static void selinux_bprm_committing_creds(struct linux_binprm *bprm)
+static void nsalinux_bprm_committing_creds(struct linux_binprm *bprm)
 {
 	struct task_security_struct *new_tsec;
 	struct rlimit *rlim, *initrlim;
@@ -2501,7 +2501,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm)
  * Clean up the process immediately after the installation of new credentials
  * due to exec
  */
-static void selinux_bprm_committed_creds(struct linux_binprm *bprm)
+static void nsalinux_bprm_committed_creds(struct linux_binprm *bprm)
 {
 	const struct task_security_struct *tsec = current_security();
 	struct itimerval itimer;
@@ -2546,12 +2546,12 @@ static void selinux_bprm_committed_creds(struct linux_binprm *bprm)
 
 /* superblock security operations */
 
-static int selinux_sb_alloc_security(struct super_block *sb)
+static int nsalinux_sb_alloc_security(struct super_block *sb)
 {
 	return superblock_alloc_security(sb);
 }
 
-static void selinux_sb_free_security(struct super_block *sb)
+static void nsalinux_sb_free_security(struct super_block *sb)
 {
 	superblock_free_security(sb);
 }
@@ -2564,7 +2564,7 @@ static inline int match_prefix(char *prefix, int plen, char *option, int olen)
 	return !memcmp(prefix, option, plen);
 }
 
-static inline int selinux_option(char *option, int len)
+static inline int nsalinux_option(char *option, int len)
 {
 	return (match_prefix(CONTEXT_STR, sizeof(CONTEXT_STR)-1, option, len) ||
 		match_prefix(FSCONTEXT_STR, sizeof(FSCONTEXT_STR)-1, option, len) ||
@@ -2584,7 +2584,7 @@ static inline void take_option(char **to, char *from, int *first, int len)
 	*to += len;
 }
 
-static inline void take_selinux_option(char **to, char *from, int *first,
+static inline void take_nsalinux_option(char **to, char *from, int *first,
 				       int len)
 {
 	int current_size = 0;
@@ -2605,7 +2605,7 @@ static inline void take_selinux_option(char **to, char *from, int *first,
 	}
 }
 
-static int selinux_sb_copy_data(char *orig, char *copy)
+static int nsalinux_sb_copy_data(char *orig, char *copy)
 {
 	int fnosec, fsec, rc = 0;
 	char *in_save, *in_curr, *in_end;
@@ -2632,8 +2632,8 @@ static int selinux_sb_copy_data(char *orig, char *copy)
 				*in_end == '\0') {
 			int len = in_end - in_curr;
 
-			if (selinux_option(in_curr, len))
-				take_selinux_option(&sec_curr, in_curr, &fsec, len);
+			if (nsalinux_option(in_curr, len))
+				take_nsalinux_option(&sec_curr, in_curr, &fsec, len);
 			else
 				take_option(&nosec, in_curr, &fnosec, len);
 
@@ -2647,7 +2647,7 @@ out:
 	return rc;
 }
 
-static int selinux_sb_remount(struct super_block *sb, void *data)
+static int nsalinux_sb_remount(struct super_block *sb, void *data)
 {
 	int rc, i, *flags;
 	struct security_mnt_opts opts;
@@ -2667,11 +2667,11 @@ static int selinux_sb_remount(struct super_block *sb, void *data)
 	secdata = alloc_secdata();
 	if (!secdata)
 		return -ENOMEM;
-	rc = selinux_sb_copy_data(data, secdata);
+	rc = nsalinux_sb_copy_data(data, secdata);
 	if (rc)
 		goto out_free_secdata;
 
-	rc = selinux_parse_opts_str(secdata, &opts);
+	rc = nsalinux_parse_opts_str(secdata, &opts);
 	if (rc)
 		goto out_free_secdata;
 
@@ -2685,7 +2685,7 @@ static int selinux_sb_remount(struct super_block *sb, void *data)
 			continue;
 		rc = security_context_str_to_sid(mount_options[i], &sid, GFP_KERNEL);
 		if (rc) {
-			printk(KERN_WARNING "SELinux: security_context_str_to_sid"
+			printk(KERN_WARNING "NSALinux: security_context_str_to_sid"
 			       "(%s) failed for (dev %s, type %s) errno=%d\n",
 			       mount_options[i], sb->s_id, sb->s_type->name, rc);
 			goto out_free_opts;
@@ -2724,13 +2724,13 @@ out_free_secdata:
 	free_secdata(secdata);
 	return rc;
 out_bad_option:
-	printk(KERN_WARNING "SELinux: unable to change security options "
+	printk(KERN_WARNING "NSALinux: unable to change security options "
 	       "during remount (dev %s, type=%s)\n", sb->s_id,
 	       sb->s_type->name);
 	goto out_free_opts;
 }
 
-static int selinux_sb_kern_mount(struct super_block *sb, int flags, void *data)
+static int nsalinux_sb_kern_mount(struct super_block *sb, int flags, void *data)
 {
 	const struct cred *cred = current_cred();
 	struct common_audit_data ad;
@@ -2749,7 +2749,7 @@ static int selinux_sb_kern_mount(struct super_block *sb, int flags, void *data)
 	return superblock_has_perm(cred, sb, FILESYSTEM__MOUNT, &ad);
 }
 
-static int selinux_sb_statfs(struct dentry *dentry)
+static int nsalinux_sb_statfs(struct dentry *dentry)
 {
 	const struct cred *cred = current_cred();
 	struct common_audit_data ad;
@@ -2759,7 +2759,7 @@ static int selinux_sb_statfs(struct dentry *dentry)
 	return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad);
 }
 
-static int selinux_mount(const char *dev_name,
+static int nsalinux_mount(const char *dev_name,
 			 struct path *path,
 			 const char *type,
 			 unsigned long flags,
@@ -2774,7 +2774,7 @@ static int selinux_mount(const char *dev_name,
 		return path_has_perm(cred, path, FILE__MOUNTON);
 }
 
-static int selinux_umount(struct vfsmount *mnt, int flags)
+static int nsalinux_umount(struct vfsmount *mnt, int flags)
 {
 	const struct cred *cred = current_cred();
 
@@ -2784,24 +2784,24 @@ static int selinux_umount(struct vfsmount *mnt, int flags)
 
 /* inode security operations */
 
-static int selinux_inode_alloc_security(struct inode *inode)
+static int nsalinux_inode_alloc_security(struct inode *inode)
 {
 	return inode_alloc_security(inode);
 }
 
-static void selinux_inode_free_security(struct inode *inode)
+static void nsalinux_inode_free_security(struct inode *inode)
 {
 	inode_free_security(inode);
 }
 
-static int selinux_dentry_init_security(struct dentry *dentry, int mode,
+static int nsalinux_dentry_init_security(struct dentry *dentry, int mode,
 					struct qstr *name, void **ctx,
 					u32 *ctxlen)
 {
 	u32 newsid;
 	int rc;
 
-	rc = selinux_determine_inode_label(d_inode(dentry->d_parent), name,
+	rc = nsalinux_determine_inode_label(d_inode(dentry->d_parent), name,
 					   inode_mode_to_security_class(mode),
 					   &newsid);
 	if (rc)
@@ -2810,7 +2810,7 @@ static int selinux_dentry_init_security(struct dentry *dentry, int mode,
 	return security_sid_to_context(newsid, (char **)ctx, ctxlen);
 }
 
-static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
+static int nsalinux_inode_init_security(struct inode *inode, struct inode *dir,
 				       const struct qstr *qstr,
 				       const char **name,
 				       void **value, size_t *len)
@@ -2826,14 +2826,14 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
 	sid = tsec->sid;
 	newsid = tsec->create_sid;
 
-	rc = selinux_determine_inode_label(
+	rc = nsalinux_determine_inode_label(
 		dir, qstr,
 		inode_mode_to_security_class(inode->i_mode),
 		&newsid);
 	if (rc)
 		return rc;
 
-	/* Possibly defer initialization to selinux_complete_init. */
+	/* Possibly defer initialization to nsalinux_complete_init. */
 	if (sbsec->flags & SE_SBINITIALIZED) {
 		struct inode_security_struct *isec = inode->i_security;
 		isec->sclass = inode_mode_to_security_class(inode->i_mode);
@@ -2845,7 +2845,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
 		return -EOPNOTSUPP;
 
 	if (name)
-		*name = XATTR_SELINUX_SUFFIX;
+		*name = XATTR_NSALINUX_SUFFIX;
 
 	if (value && len) {
 		rc = security_sid_to_context_force(newsid, &context, &clen);
@@ -2858,55 +2858,55 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
 	return 0;
 }
 
-static int selinux_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode)
+static int nsalinux_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode)
 {
 	return may_create(dir, dentry, SECCLASS_FILE);
 }
 
-static int selinux_inode_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry)
+static int nsalinux_inode_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry)
 {
 	return may_link(dir, old_dentry, MAY_LINK);
 }
 
-static int selinux_inode_unlink(struct inode *dir, struct dentry *dentry)
+static int nsalinux_inode_unlink(struct inode *dir, struct dentry *dentry)
 {
 	return may_link(dir, dentry, MAY_UNLINK);
 }
 
-static int selinux_inode_symlink(struct inode *dir, struct dentry *dentry, const char *name)
+static int nsalinux_inode_symlink(struct inode *dir, struct dentry *dentry, const char *name)
 {
 	return may_create(dir, dentry, SECCLASS_LNK_FILE);
 }
 
-static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mask)
+static int nsalinux_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mask)
 {
 	return may_create(dir, dentry, SECCLASS_DIR);
 }
 
-static int selinux_inode_rmdir(struct inode *dir, struct dentry *dentry)
+static int nsalinux_inode_rmdir(struct inode *dir, struct dentry *dentry)
 {
 	return may_link(dir, dentry, MAY_RMDIR);
 }
 
-static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
+static int nsalinux_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
 {
 	return may_create(dir, dentry, inode_mode_to_security_class(mode));
 }
 
-static int selinux_inode_rename(struct inode *old_inode, struct dentry *old_dentry,
+static int nsalinux_inode_rename(struct inode *old_inode, struct dentry *old_dentry,
 				struct inode *new_inode, struct dentry *new_dentry)
 {
 	return may_rename(old_inode, old_dentry, new_inode, new_dentry);
 }
 
-static int selinux_inode_readlink(struct dentry *dentry)
+static int nsalinux_inode_readlink(struct dentry *dentry)
 {
 	const struct cred *cred = current_cred();
 
 	return dentry_has_perm(cred, dentry, FILE__READ);
 }
 
-static int selinux_inode_follow_link(struct dentry *dentry, struct inode *inode,
+static int nsalinux_inode_follow_link(struct dentry *dentry, struct inode *inode,
 				     bool rcu)
 {
 	const struct cred *cred = current_cred();
@@ -2946,7 +2946,7 @@ static noinline int audit_inode_permission(struct inode *inode,
 	return 0;
 }
 
-static int selinux_inode_permission(struct inode *inode, int mask)
+static int nsalinux_inode_permission(struct inode *inode, int mask)
 {
 	const struct cred *cred = current_cred();
 	u32 perms;
@@ -2990,7 +2990,7 @@ static int selinux_inode_permission(struct inode *inode, int mask)
 	return rc;
 }
 
-static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
+static int nsalinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
 {
 	const struct cred *cred = current_cred();
 	unsigned int ia_valid = iattr->ia_valid;
@@ -3008,19 +3008,19 @@ static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
 			ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET))
 		return dentry_has_perm(cred, dentry, FILE__SETATTR);
 
-	if (selinux_policycap_openperm && (ia_valid & ATTR_SIZE)
+	if (nsalinux_policycap_openperm && (ia_valid & ATTR_SIZE)
 			&& !(ia_valid & ATTR_FILE))
 		av |= FILE__OPEN;
 
 	return dentry_has_perm(cred, dentry, av);
 }
 
-static int selinux_inode_getattr(const struct path *path)
+static int nsalinux_inode_getattr(const struct path *path)
 {
 	return path_has_perm(current_cred(), path, FILE__GETATTR);
 }
 
-static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name)
+static int nsalinux_inode_setotherxattr(struct dentry *dentry, const char *name)
 {
 	const struct cred *cred = current_cred();
 
@@ -3041,7 +3041,7 @@ static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name)
 	return dentry_has_perm(cred, dentry, FILE__SETATTR);
 }
 
-static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
+static int nsalinux_inode_setxattr(struct dentry *dentry, const char *name,
 				  const void *value, size_t size, int flags)
 {
 	struct inode *inode = d_backing_inode(dentry);
@@ -3051,8 +3051,8 @@ static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
 	u32 newsid, sid = current_sid();
 	int rc = 0;
 
-	if (strcmp(name, XATTR_NAME_SELINUX))
-		return selinux_inode_setotherxattr(dentry, name);
+	if (strcmp(name, XATTR_NAME_NSALINUX))
+		return nsalinux_inode_setotherxattr(dentry, name);
 
 	sbsec = inode->i_sb->s_security;
 	if (!(sbsec->flags & SBLABEL_MNT))
@@ -3088,7 +3088,7 @@ static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
 				str = "";
 				audit_size = 0;
 			}
-			ab = audit_log_start(current->audit_context, GFP_ATOMIC, AUDIT_SELINUX_ERR);
+			ab = audit_log_start(current->audit_context, GFP_ATOMIC, AUDIT_NSALINUX_ERR);
 			audit_log_format(ab, "op=setxattr invalid_context=");
 			audit_log_n_untrustedstring(ab, value, audit_size);
 			audit_log_end(ab);
@@ -3117,7 +3117,7 @@ static int selinux_inode_setxattr(struct dentry *dentry, const char *name,
 			    &ad);
 }
 
-static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
+static void nsalinux_inode_post_setxattr(struct dentry *dentry, const char *name,
 					const void *value, size_t size,
 					int flags)
 {
@@ -3126,14 +3126,14 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
 	u32 newsid;
 	int rc;
 
-	if (strcmp(name, XATTR_NAME_SELINUX)) {
+	if (strcmp(name, XATTR_NAME_NSALINUX)) {
 		/* Not an attribute we recognize, so nothing to do. */
 		return;
 	}
 
 	rc = security_context_to_sid_force(value, size, &newsid);
 	if (rc) {
-		printk(KERN_ERR "SELinux:  unable to map context to SID"
+		printk(KERN_ERR "NSALinux:  unable to map context to SID"
 		       "for (%s, %lu), rc=%d\n",
 		       inode->i_sb->s_id, inode->i_ino, -rc);
 		return;
@@ -3146,26 +3146,26 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
 	return;
 }
 
-static int selinux_inode_getxattr(struct dentry *dentry, const char *name)
+static int nsalinux_inode_getxattr(struct dentry *dentry, const char *name)
 {
 	const struct cred *cred = current_cred();
 
 	return dentry_has_perm(cred, dentry, FILE__GETATTR);
 }
 
-static int selinux_inode_listxattr(struct dentry *dentry)
+static int nsalinux_inode_listxattr(struct dentry *dentry)
 {
 	const struct cred *cred = current_cred();
 
 	return dentry_has_perm(cred, dentry, FILE__GETATTR);
 }
 
-static int selinux_inode_removexattr(struct dentry *dentry, const char *name)
+static int nsalinux_inode_removexattr(struct dentry *dentry, const char *name)
 {
-	if (strcmp(name, XATTR_NAME_SELINUX))
-		return selinux_inode_setotherxattr(dentry, name);
+	if (strcmp(name, XATTR_NAME_NSALINUX))
+		return nsalinux_inode_setotherxattr(dentry, name);
 
-	/* No one is allowed to remove a SELinux security label.
+	/* No one is allowed to remove a NSALinux security label.
 	   You can change the label, but all data must be labeled. */
 	return -EACCES;
 }
@@ -3173,16 +3173,16 @@ static int selinux_inode_removexattr(struct dentry *dentry, const char *name)
 /*
  * Copy the inode security context value to the user.
  *
- * Permission check is handled by selinux_inode_getxattr hook.
+ * Permission check is handled by nsalinux_inode_getxattr hook.
  */
-static int selinux_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
+static int nsalinux_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
 {
 	u32 size;
 	int error;
 	char *context = NULL;
 	struct inode_security_struct *isec = inode_security(inode);
 
-	if (strcmp(name, XATTR_SELINUX_SUFFIX))
+	if (strcmp(name, XATTR_NSALINUX_SUFFIX))
 		return -EOPNOTSUPP;
 
 	/*
@@ -3216,14 +3216,14 @@ out_nofree:
 	return error;
 }
 
-static int selinux_inode_setsecurity(struct inode *inode, const char *name,
+static int nsalinux_inode_setsecurity(struct inode *inode, const char *name,
 				     const void *value, size_t size, int flags)
 {
 	struct inode_security_struct *isec = inode_security(inode);
 	u32 newsid;
 	int rc;
 
-	if (strcmp(name, XATTR_SELINUX_SUFFIX))
+	if (strcmp(name, XATTR_NSALINUX_SUFFIX))
 		return -EOPNOTSUPP;
 
 	if (!value || !size)
@@ -3239,15 +3239,15 @@ static int selinux_inode_setsecurity(struct inode *inode, const char *name,
 	return 0;
 }
 
-static int selinux_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size)
+static int nsalinux_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size)
 {
-	const int len = sizeof(XATTR_NAME_SELINUX);
+	const int len = sizeof(XATTR_NAME_NSALINUX);
 	if (buffer && len <= buffer_size)
-		memcpy(buffer, XATTR_NAME_SELINUX, len);
+		memcpy(buffer, XATTR_NAME_NSALINUX, len);
 	return len;
 }
 
-static void selinux_inode_getsecid(struct inode *inode, u32 *secid)
+static void nsalinux_inode_getsecid(struct inode *inode, u32 *secid)
 {
 	struct inode_security_struct *isec = inode_security_novalidate(inode);
 	*secid = isec->sid;
@@ -3255,7 +3255,7 @@ static void selinux_inode_getsecid(struct inode *inode, u32 *secid)
 
 /* file security operations */
 
-static int selinux_revalidate_file_permission(struct file *file, int mask)
+static int nsalinux_revalidate_file_permission(struct file *file, int mask)
 {
 	const struct cred *cred = current_cred();
 	struct inode *inode = file_inode(file);
@@ -3268,7 +3268,7 @@ static int selinux_revalidate_file_permission(struct file *file, int mask)
 			     file_mask_to_av(inode->i_mode, mask));
 }
 
-static int selinux_file_permission(struct file *file, int mask)
+static int nsalinux_file_permission(struct file *file, int mask)
 {
 	struct inode *inode = file_inode(file);
 	struct file_security_struct *fsec = file->f_security;
@@ -3285,15 +3285,15 @@ static int selinux_file_permission(struct file *file, int mask)
 		/* No change since file_open check. */
 		return 0;
 
-	return selinux_revalidate_file_permission(file, mask);
+	return nsalinux_revalidate_file_permission(file, mask);
 }
 
-static int selinux_file_alloc_security(struct file *file)
+static int nsalinux_file_alloc_security(struct file *file)
 {
 	return file_alloc_security(file);
 }
 
-static void selinux_file_free_security(struct file *file)
+static void nsalinux_file_free_security(struct file *file)
 {
 	file_free_security(file);
 }
@@ -3338,7 +3338,7 @@ out:
 	return rc;
 }
 
-static int selinux_file_ioctl(struct file *file, unsigned int cmd,
+static int nsalinux_file_ioctl(struct file *file, unsigned int cmd,
 			      unsigned long arg)
 {
 	const struct cred *cred = current_cred();
@@ -3423,7 +3423,7 @@ error:
 	return rc;
 }
 
-static int selinux_mmap_addr(unsigned long addr)
+static int nsalinux_mmap_addr(unsigned long addr)
 {
 	int rc = 0;
 
@@ -3436,23 +3436,23 @@ static int selinux_mmap_addr(unsigned long addr)
 	return rc;
 }
 
-static int selinux_mmap_file(struct file *file, unsigned long reqprot,
+static int nsalinux_mmap_file(struct file *file, unsigned long reqprot,
 			     unsigned long prot, unsigned long flags)
 {
-	if (selinux_checkreqprot)
+	if (nsalinux_checkreqprot)
 		prot = reqprot;
 
 	return file_map_prot_check(file, prot,
 				   (flags & MAP_TYPE) == MAP_SHARED);
 }
 
-static int selinux_file_mprotect(struct vm_area_struct *vma,
+static int nsalinux_file_mprotect(struct vm_area_struct *vma,
 				 unsigned long reqprot,
 				 unsigned long prot)
 {
 	const struct cred *cred = current_cred();
 
-	if (selinux_checkreqprot)
+	if (nsalinux_checkreqprot)
 		prot = reqprot;
 
 	if (default_noexec &&
@@ -3482,14 +3482,14 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
 	return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
 }
 
-static int selinux_file_lock(struct file *file, unsigned int cmd)
+static int nsalinux_file_lock(struct file *file, unsigned int cmd)
 {
 	const struct cred *cred = current_cred();
 
 	return file_has_perm(cred, file, FILE__LOCK);
 }
 
-static int selinux_file_fcntl(struct file *file, unsigned int cmd,
+static int nsalinux_file_fcntl(struct file *file, unsigned int cmd,
 			      unsigned long arg)
 {
 	const struct cred *cred = current_cred();
@@ -3529,7 +3529,7 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
 	return err;
 }
 
-static void selinux_file_set_fowner(struct file *file)
+static void nsalinux_file_set_fowner(struct file *file)
 {
 	struct file_security_struct *fsec;
 
@@ -3537,7 +3537,7 @@ static void selinux_file_set_fowner(struct file *file)
 	fsec->fown_sid = current_sid();
 }
 
-static int selinux_file_send_sigiotask(struct task_struct *tsk,
+static int nsalinux_file_send_sigiotask(struct task_struct *tsk,
 				       struct fown_struct *fown, int signum)
 {
 	struct file *file;
@@ -3559,14 +3559,14 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk,
 			    SECCLASS_PROCESS, perm, NULL);
 }
 
-static int selinux_file_receive(struct file *file)
+static int nsalinux_file_receive(struct file *file)
 {
 	const struct cred *cred = current_cred();
 
 	return file_has_perm(cred, file, file_to_av(file));
 }
 
-static int selinux_file_open(struct file *file, const struct cred *cred)
+static int nsalinux_file_open(struct file *file, const struct cred *cred)
 {
 	struct file_security_struct *fsec;
 	struct inode_security_struct *isec;
@@ -3575,7 +3575,7 @@ static int selinux_file_open(struct file *file, const struct cred *cred)
 	isec = inode_security(file_inode(file));
 	/*
 	 * Save inode label and policy sequence number
-	 * at open-time so that selinux_file_permission
+	 * at open-time so that nsalinux_file_permission
 	 * can determine whether revalidation is necessary.
 	 * Task label is already saved in the file security
 	 * struct as its SID.
@@ -3584,7 +3584,7 @@ static int selinux_file_open(struct file *file, const struct cred *cred)
 	fsec->pseqno = avc_policy_seqno();
 	/*
 	 * Since the inode label or policy seqno may have changed
-	 * between the selinux_inode_permission check and the saving
+	 * between the nsalinux_inode_permission check and the saving
 	 * of state above, recheck that access is still permitted.
 	 * Otherwise, access might never be revalidated against the
 	 * new inode label or new policy.
@@ -3595,15 +3595,15 @@ static int selinux_file_open(struct file *file, const struct cred *cred)
 
 /* task security operations */
 
-static int selinux_task_create(unsigned long clone_flags)
+static int nsalinux_task_create(unsigned long clone_flags)
 {
 	return current_has_perm(current, PROCESS__FORK);
 }
 
 /*
- * allocate the SELinux part of blank credentials
+ * allocate the NSALinux part of blank credentials
  */
-static int selinux_cred_alloc_blank(struct cred *cred, gfp_t gfp)
+static int nsalinux_cred_alloc_blank(struct cred *cred, gfp_t gfp)
 {
 	struct task_security_struct *tsec;
 
@@ -3618,7 +3618,7 @@ static int selinux_cred_alloc_blank(struct cred *cred, gfp_t gfp)
 /*
  * detach and free the LSM part of a set of credentials
  */
-static void selinux_cred_free(struct cred *cred)
+static void nsalinux_cred_free(struct cred *cred)
 {
 	struct task_security_struct *tsec = cred->security;
 
@@ -3634,7 +3634,7 @@ static void selinux_cred_free(struct cred *cred)
 /*
  * prepare a new set of credentials for modification
  */
-static int selinux_cred_prepare(struct cred *new, const struct cred *old,
+static int nsalinux_cred_prepare(struct cred *new, const struct cred *old,
 				gfp_t gfp)
 {
 	const struct task_security_struct *old_tsec;
@@ -3651,9 +3651,9 @@ static int selinux_cred_prepare(struct cred *new, const struct cred *old,
 }
 
 /*
- * transfer the SELinux data to a blank set of creds
+ * transfer the NSALinux data to a blank set of creds
  */
-static void selinux_cred_transfer(struct cred *new, const struct cred *old)
+static void nsalinux_cred_transfer(struct cred *new, const struct cred *old)
 {
 	const struct task_security_struct *old_tsec = old->security;
 	struct task_security_struct *tsec = new->security;
@@ -3665,7 +3665,7 @@ static void selinux_cred_transfer(struct cred *new, const struct cred *old)
  * set the security data for a kernel service
  * - all the creation contexts are set to unlabelled
  */
-static int selinux_kernel_act_as(struct cred *new, u32 secid)
+static int nsalinux_kernel_act_as(struct cred *new, u32 secid)
 {
 	struct task_security_struct *tsec = new->security;
 	u32 sid = current_sid();
@@ -3688,7 +3688,7 @@ static int selinux_kernel_act_as(struct cred *new, u32 secid)
  * set the file creation context in a security record to the same as the
  * objective context of the specified inode
  */
-static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode)
+static int nsalinux_kernel_create_files_as(struct cred *new, struct inode *inode)
 {
 	struct inode_security_struct *isec = inode_security(inode);
 	struct task_security_struct *tsec = new->security;
@@ -3705,7 +3705,7 @@ static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode)
 	return ret;
 }
 
-static int selinux_kernel_module_request(char *kmod_name)
+static int nsalinux_kernel_module_request(char *kmod_name)
 {
 	u32 sid;
 	struct common_audit_data ad;
@@ -3719,42 +3719,42 @@ static int selinux_kernel_module_request(char *kmod_name)
 			    SYSTEM__MODULE_REQUEST, &ad);
 }
 
-static int selinux_task_setpgid(struct task_struct *p, pid_t pgid)
+static int nsalinux_task_setpgid(struct task_struct *p, pid_t pgid)
 {
 	return current_has_perm(p, PROCESS__SETPGID);
 }
 
-static int selinux_task_getpgid(struct task_struct *p)
+static int nsalinux_task_getpgid(struct task_struct *p)
 {
 	return current_has_perm(p, PROCESS__GETPGID);
 }
 
-static int selinux_task_getsid(struct task_struct *p)
+static int nsalinux_task_getsid(struct task_struct *p)
 {
 	return current_has_perm(p, PROCESS__GETSESSION);
 }
 
-static void selinux_task_getsecid(struct task_struct *p, u32 *secid)
+static void nsalinux_task_getsecid(struct task_struct *p, u32 *secid)
 {
 	*secid = task_sid(p);
 }
 
-static int selinux_task_setnice(struct task_struct *p, int nice)
+static int nsalinux_task_setnice(struct task_struct *p, int nice)
 {
 	return current_has_perm(p, PROCESS__SETSCHED);
 }
 
-static int selinux_task_setioprio(struct task_struct *p, int ioprio)
+static int nsalinux_task_setioprio(struct task_struct *p, int ioprio)
 {
 	return current_has_perm(p, PROCESS__SETSCHED);
 }
 
-static int selinux_task_getioprio(struct task_struct *p)
+static int nsalinux_task_getioprio(struct task_struct *p)
 {
 	return current_has_perm(p, PROCESS__GETSCHED);
 }
 
-static int selinux_task_setrlimit(struct task_struct *p, unsigned int resource,
+static int nsalinux_task_setrlimit(struct task_struct *p, unsigned int resource,
 		struct rlimit *new_rlim)
 {
 	struct rlimit *old_rlim = p->signal->rlim + resource;
@@ -3762,29 +3762,29 @@ static int selinux_task_setrlimit(struct task_struct *p, unsigned int resource,
 	/* Control the ability to change the hard limit (whether
 	   lowering or raising it), so that the hard limit can
 	   later be used as a safe reset point for the soft limit
-	   upon context transitions.  See selinux_bprm_committing_creds. */
+	   upon context transitions.  See nsalinux_bprm_committing_creds. */
 	if (old_rlim->rlim_max != new_rlim->rlim_max)
 		return current_has_perm(p, PROCESS__SETRLIMIT);
 
 	return 0;
 }
 
-static int selinux_task_setscheduler(struct task_struct *p)
+static int nsalinux_task_setscheduler(struct task_struct *p)
 {
 	return current_has_perm(p, PROCESS__SETSCHED);
 }
 
-static int selinux_task_getscheduler(struct task_struct *p)
+static int nsalinux_task_getscheduler(struct task_struct *p)
 {
 	return current_has_perm(p, PROCESS__GETSCHED);
 }
 
-static int selinux_task_movememory(struct task_struct *p)
+static int nsalinux_task_movememory(struct task_struct *p)
 {
 	return current_has_perm(p, PROCESS__SETSCHED);
 }
 
-static int selinux_task_kill(struct task_struct *p, struct siginfo *info,
+static int nsalinux_task_kill(struct task_struct *p, struct siginfo *info,
 				int sig, u32 secid)
 {
 	u32 perm;
@@ -3802,12 +3802,12 @@ static int selinux_task_kill(struct task_struct *p, struct siginfo *info,
 	return rc;
 }
 
-static int selinux_task_wait(struct task_struct *p)
+static int nsalinux_task_wait(struct task_struct *p)
 {
 	return task_has_perm(p, current, PROCESS__SIGCHLD);
 }
 
-static void selinux_task_to_inode(struct task_struct *p,
+static void nsalinux_task_to_inode(struct task_struct *p,
 				  struct inode *inode)
 {
 	struct inode_security_struct *isec = inode->i_security;
@@ -3818,7 +3818,7 @@ static void selinux_task_to_inode(struct task_struct *p,
 }
 
 /* Returns error only if unable to parse addresses */
-static int selinux_parse_skb_ipv4(struct sk_buff *skb,
+static int nsalinux_parse_skb_ipv4(struct sk_buff *skb,
 			struct common_audit_data *ad, u8 *proto)
 {
 	int offset, ihlen, ret = -EINVAL;
@@ -3899,7 +3899,7 @@ out:
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

security/nsalinux/include/audit.h renamed from security/selinux/include/audit.h +15 -15
similarity index 62%
rename from security/selinux/include/audit.h
rename to security/nsalinux/include/audit.h
index 1bdf973..aab8c7c 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/avc.h renamed from security/selinux/include/avc.h +9 -9
similarity index 94%
rename from security/selinux/include/avc.h
rename to security/nsalinux/include/avc.h
index 0999df0..e7e2880 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/avc_ss.h renamed from security/selinux/include/avc_ss.h +3 -3
similarity index 84%
rename from security/selinux/include/avc_ss.h
rename to security/nsalinux/include/avc_ss.h
index d5c3284..13b2fc5 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/classmap.h renamed from security/selinux/include/classmap.h +1 -1
similarity index 99%
rename from security/selinux/include/classmap.h
rename to security/nsalinux/include/classmap.h
index ef83c4b..40d2a93 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/conditional.h renamed from security/selinux/include/conditional.h +3 -3
similarity index 85%
rename from security/selinux/include/conditional.h
rename to security/nsalinux/include/conditional.h
index 67ce7a8..2cd22cd 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/initial_sid_to_string.h renamed from security/selinux/include/initial_sid_to_string.h +0 -0
similarity index 100%
rename from security/selinux/include/initial_sid_to_string.h
rename to security/nsalinux/include/initial_sid_to_string.h
security/nsalinux/include/netif.h renamed from security/selinux/include/netif.h +3 -3
similarity index 89%
rename from security/selinux/include/netif.h
rename to security/nsalinux/include/netif.h
index c721454..8316c05 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/netlabel.h renamed from security/selinux/include/netlabel.h +28 -28
similarity index 53%
rename from security/selinux/include/netlabel.h
rename to security/nsalinux/include/netlabel.h
index 8c59b8f..2febd5a 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/netnode.h renamed from security/selinux/include/netnode.h +3 -3
similarity index 87%
rename from security/selinux/include/netnode.h
rename to security/nsalinux/include/netnode.h
index 937668d..be77a6b 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/netport.h renamed from security/selinux/include/netport.h +3 -3
similarity index 86%
rename from security/selinux/include/netport.h
rename to security/nsalinux/include/netport.h
index d1ce896..e402266 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/objsec.h renamed from security/selinux/include/objsec.h +6 -6
similarity index 92%
rename from security/selinux/include/objsec.h
rename to security/nsalinux/include/objsec.h
index a2ae054..da888c5 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/security.h renamed from security/selinux/include/security.h +20 -20
similarity index 88%
rename from security/selinux/include/security.h
rename to security/nsalinux/include/security.h
index 38feb55..85731f7 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/include/xfrm.h renamed from security/selinux/include/xfrm.h +28 -28
similarity index 37%
rename from security/selinux/include/xfrm.h
rename to security/nsalinux/include/xfrm.h
index 1450f85..fc142c6 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netif.c renamed from security/selinux/netif.c +3 -3
similarity index 98%
rename from security/selinux/netif.c
rename to security/nsalinux/netif.c
index e607b44..f929ca1 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netlabel.c renamed from security/selinux/netlabel.c +39 -39
similarity index 81%
rename from security/selinux/netlabel.c
rename to security/nsalinux/netlabel.c
index 1f989a5..5c73e02 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netlink.c renamed from security/selinux/netlink.c +5 -5
similarity index 89%
rename from security/selinux/netlink.c
rename to security/nsalinux/netlink.c
index 828fb6a..a3e94ff 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netnode.c renamed from security/selinux/netnode.c +4 -4
similarity index 97%
rename from security/selinux/netnode.c
rename to security/nsalinux/netnode.c
index da923f8..0d65209 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/netport.c renamed from security/selinux/netport.c +4 -4
similarity index 96%
rename from security/selinux/netport.c
rename to security/nsalinux/netport.c
index 3311cc3..f4dead9 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/nlmsgtab.c renamed from security/selinux/nlmsgtab.c +1 -1
similarity index 99%
rename from security/selinux/nlmsgtab.c
rename to security/nsalinux/nlmsgtab.c
index 8495b93..4c9fffb 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/nsalinuxfs.c renamed from security/selinux/selinuxfs.c +45 -45
similarity index 95%
rename from security/selinux/selinuxfs.c
rename to security/nsalinux/nsalinuxfs.c
index 1b1fd27..160b5e4 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/avtab.c renamed from security/selinux/ss/avtab.c +25 -25
similarity index 90%
rename from security/selinux/ss/avtab.c
rename to security/nsalinux/ss/avtab.c
index 3628d3a..763c92c 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/avtab.h renamed from security/selinux/ss/avtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/avtab.h
rename to security/nsalinux/ss/avtab.h
security/nsalinux/ss/conditional.c renamed from security/selinux/ss/conditional.c +8 -8
similarity index 95%
rename from security/selinux/ss/conditional.c
rename to security/nsalinux/ss/conditional.c
index 456e1a9..478fa21 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/conditional.h renamed from security/selinux/ss/conditional.h +0 -0
similarity index 100%
rename from security/selinux/ss/conditional.h
rename to security/nsalinux/ss/conditional.h
security/nsalinux/ss/constraint.h renamed from security/selinux/ss/constraint.h +0 -0
similarity index 100%
rename from security/selinux/ss/constraint.h
rename to security/nsalinux/ss/constraint.h
security/nsalinux/ss/context.h renamed from security/selinux/ss/context.h +0 -0
similarity index 100%
rename from security/selinux/ss/context.h
rename to security/nsalinux/ss/context.h
security/nsalinux/ss/ebitmap.c renamed from security/selinux/ss/ebitmap.c +9 -9
similarity index 94%
rename from security/selinux/ss/ebitmap.c
rename to security/nsalinux/ss/ebitmap.c
index 57644b1..fa25970 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/ebitmap.h renamed from security/selinux/ss/ebitmap.h +0 -0
similarity index 100%
rename from security/selinux/ss/ebitmap.h
rename to security/nsalinux/ss/ebitmap.h
security/nsalinux/ss/hashtab.c renamed from security/selinux/ss/hashtab.c +0 -0
similarity index 100%
rename from security/selinux/ss/hashtab.c
rename to security/nsalinux/ss/hashtab.c
security/nsalinux/ss/hashtab.h renamed from security/selinux/ss/hashtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/hashtab.h
rename to security/nsalinux/ss/hashtab.h
security/nsalinux/ss/mls.c renamed from security/selinux/ss/mls.c +1 -1
similarity index 99%
rename from security/selinux/ss/mls.c
rename to security/nsalinux/ss/mls.c
index e108884..7fe6606 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/mls.h renamed from security/selinux/ss/mls.h +0 -0
similarity index 100%
rename from security/selinux/ss/mls.h
rename to security/nsalinux/ss/mls.h
security/nsalinux/ss/mls_types.h renamed from security/selinux/ss/mls_types.h +0 -0
similarity index 100%
rename from security/selinux/ss/mls_types.h
rename to security/nsalinux/ss/mls_types.h
security/nsalinux/ss/policydb.c renamed from security/selinux/ss/policydb.c +38 -38
similarity index 96%
rename from security/selinux/ss/policydb.c
rename to security/nsalinux/ss/policydb.c
index 992a315..199f2f9 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/policydb.h renamed from security/selinux/ss/policydb.h +1 -1
similarity index 99%
rename from security/selinux/ss/policydb.h
rename to security/nsalinux/ss/policydb.h
index 725d594..a2d471f 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/services.c renamed from security/selinux/ss/services.c +90 -90
similarity index 94%
rename from security/selinux/ss/services.c
rename to security/nsalinux/ss/services.c
index ebda973..d3da385 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/services.h renamed from security/selinux/ss/services.h +0 -0
similarity index 100%
rename from security/selinux/ss/services.h
rename to security/nsalinux/ss/services.h
security/nsalinux/ss/sidtab.c renamed from security/selinux/ss/sidtab.c +1 -1
similarity index 98%
rename from security/selinux/ss/sidtab.c
rename to security/nsalinux/ss/sidtab.c
index 5840a35..d3d05fe 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/sidtab.h renamed from security/selinux/ss/sidtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/sidtab.h
rename to security/nsalinux/ss/sidtab.h
security/nsalinux/ss/status.c renamed from security/selinux/ss/status.c +33 -33
similarity index 58%
rename from security/selinux/ss/status.c
rename to security/nsalinux/ss/status.c
index d982365..6a9edff 100644

Lines of this file are not shown. View the raw message.

security/nsalinux/ss/symtab.c renamed from security/selinux/ss/symtab.c +0 -0
similarity index 100%
rename from security/selinux/ss/symtab.c
rename to security/nsalinux/ss/symtab.c
security/nsalinux/ss/symtab.h renamed from security/selinux/ss/symtab.h +0 -0
similarity index 100%
rename from security/selinux/ss/symtab.h
rename to security/nsalinux/ss/symtab.h
security/nsalinux/xfrm.c renamed from security/selinux/xfrm.c +54 -54
similarity index 75%
rename from security/selinux/xfrm.c
rename to security/nsalinux/xfrm.c
index 56e354f..47decd5 100644

Lines of this file are not shown. View the raw message.

security/security.c +3 -3
index 3644b03..6531d8e 100644

Lines of this file are not shown. View the raw message.

security/smack/smack_lsm.c +3 -3
index 11f7901..016a527 100644

Lines of this file are not shown. View the raw message.

security/smack/smack_netfilter.c +2 -2
index aa6bf1b..81ed436 100644

Lines of this file are not shown. View the raw message.

security/smack/smackfs.c +1 -1
index e249a66..458c1b9 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/rcutorture/bin/functions.sh +1 -1
index b325470..09e6f77 100644

Lines of this file are not shown. View the raw message.

tools/usb/usbip/README +1 -1
index 831f49f..3ae72b3 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#3 lore raw
Quoted 5 lines · On Friday 01 April 2016 08:47:53 Casey Schaufler wrote:
Quoted 4 lines · Pali Rohár

This patch helps NSA agents, so they will know easily which part of Linux kernel code and also which config options must be enabled for their "customer" kernel builds.

Quoted 8 lines
Quoted 4 lines

Patch also protects people aware of NSA activities, so they will know which part of kernel code comes from NSA and which should they disable or drop.

This patch should have been sent to the subsystem maintainer (Paul Moore), and the LSM and SELinux mail lists as an RFC before taking it to the LKML.

Oh, sorry. I will this problem for v2 in next year.

Quoted 5 lines

The proposed name change fails in its stated purpose in that it does not identify which nation the "N" refers to. To do that you would need to use USANSA instead of NSA. Remember that your understanding of an acronym is context dependent and that others will not map "NSA" to the United States National Security Agency.

Your are right, including US or USA in name should be done. We need to make sure that abbreviation is unambiguous. Maybe on the world can be another organization with letters N, S and A.

But abbreviation for "United States National Security Agency" is not USANSA, just USNSA.

Maybe we should use underscore to separate country and organization. Or other separator. If if future there is plan for code from other organizations from different countries, we should need to distinguish and make people easily build kernels for their needs.

Looks like there is currently security code only from NSA, so Linux kernel discriminate others national agencies...

Quoted 4 lines

I am generally in favor of naming things more descriptively than "Security Enhanced". In this case, the name has been in use for long enough that it is really hard to accept the notion that someone who is working in the code wouldn't know its history.

Full history is in git, so if somebody needs it then it is there...

Quoted 1 line

Or, have I just replied to an especially well done April 1st prank?

Yes. Hm.. or maybe not? :-) (see also time in Date header of first email)

Signature · 2 lines
Pali Rohár
[email protected]