Skip to contentSkip to conversation

2.4.17 support?

DISCUSSION Russell Coker 2 participants 4 messages Jan 16, 2002 – Jan 17, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

The latest kernel patch for 2.4.17 from immunix uses version 8 of the Policy DB, while the latest utilities on the NSA site are clearly designed for version 7 only (compile errors when trying to compile with version 8 headers).

Could someone please post a patch to selinux-small to make it compile with the latest headers? I am anticipating that the NSA web site won't be updated as quickly as we would like so it'd be good to get a patch on the list...

Signature · 9 lines
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 3 lines · Russell Coker

The latest kernel patch for 2.4.17 from immunix uses version 8 of the Policy DB, while the latest utilities on the NSA site are clearly designed for version 7 only (compile errors when trying to compile with version 8 headers).

The NSA SELinux web site states that you should use the version of the LSM kernel patch that is on it, since the one from lsm.immunix.org may not always be compatible. The policydb change was pushed to the lsm.immunix.org tree (with a comment in the ChangeLog about the need for a corresponding patch to the checkpolicy program) in preparation for a new SELinux release on the NSA web site. So just be patient and wait for the new release.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 6 lines · Stephen Smalley
Quoted 4 lines · Russell Coker

The latest kernel patch for 2.4.17 from immunix uses version 8 of the Policy DB, while the latest utilities on the NSA site are clearly designed for version 7 only (compile errors when trying to compile with version 8 headers).

Quoted 7 lines

The NSA SELinux web site states that you should use the version of the LSM kernel patch that is on it, since the one from lsm.immunix.org may not always be compatible. The policydb change was pushed to the lsm.immunix.org tree (with a comment in the ChangeLog about the need for a corresponding patch to the checkpolicy program) in preparation for a new SELinux release on the NSA web site. So just be patient and wait for the new release.

OK.

BTW Could documentation be added as to which kernel supports which version of the policydb?

Signature · 9 lines
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
In reply to Russell Coker
Quoted 7 lines · Russell Coker

The latest kernel patch for 2.4.17 from immunix uses version 8 of the Policy DB, while the latest utilities on the NSA site are clearly designed for version 7 only (compile errors when trying to compile with version 8 headers).

Could someone please post a patch to selinux-small to make it compile with the latest headers? I am anticipating that the NSA web site won't be updated as quickly as we would like so it'd be good to get a patch on the list...

Here is a patch (relative to the 2001121010 release) to update your selinux/module directory so that you can build with lsm-full-2002_01_15-2.4.17 if you need to upgrade now (cd selinux; patch -p1 < ~/module.patch). These changes, plus other updates, will be included in a new public release on the NSA SELinux web site that should be available very soon, so most people should ignore this patch and just wait for the next release.

--
Stephen D. Smalley, NAI Labs
[email protected]

Index: selinux/module/Makefile

module/Makefile renamed from module/Makefile:1.11 +12 -22
diff -u selinux/module/Makefile:1.11 selinux/module/Makefile:1.13
@@ -1,5 +1,4 @@
-LSMDIR=../../lsm
-LSM25DIR=../../lsm-2.5
+LSMDIR=../../lsm$(LSMVER)
 PATCHDIR=../selinux/module
 FLASKDIR=/usr/local/selinux/flask
 INCDIR=/usr/local/selinux/include
@@ -7,28 +6,12 @@
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
-# Patch the 2.4 kernel defconfig and Makefile.
-insert: 
-	cd $(LSMDIR); patch -p0 < $(PATCHDIR)/lsm-patch
-
-# Unpatch the 2.4 kernel defconfig and Makefile.
-remove: 
-	cd $(LSMDIR); patch -p0 -R < $(PATCHDIR)/lsm-patch
-
-# Patch the 2.5 kernel defconfig and Makefile.
-insert25: 
-	cd $(LSM25DIR); patch -p0 < $(PATCHDIR)/lsm25-patch
-
-# Unpatch the 2.5 kernel defconfig and Makefile.
-remove25: 
-	cd $(LSM25DIR); patch -p0 -R < $(PATCHDIR)/lsm25-patch
-
 # Build the checkpolicy program.
-checkpolicy/checkpolicy:
-	$(MAKE) -C checkpolicy 
+all:
+	$(MAKE) -C checkpolicy LSMDIR=../$(LSMDIR)
 
 # Install files used by other components into /usr/local/selinux.
-install: checkpolicy/checkpolicy
+install: all
 	mkdir -p $(FLASKDIR)
 	mkdir -p $(INCDIR)/linux/flask
 	mkdir -p $(INCDIR)/asm-$(ARCH)/flask
@@ -38,10 +21,17 @@
 	cd $(LSMDIR)/security/selinux/include/linux/flask; install -m 644 *.h $(INCDIR)/linux/flask
 	cd $(LSMDIR)/security/selinux/include/asm/flask; install -m 644 *.h $(INCDIR)/asm/flask
 	cd $(LSMDIR)/include/asm; install -m 644 unistd.h $(INCDIR)/asm
-	cd checkpolicy; install -m 755 checkpolicy $(BINDIR)
+	$(MAKE) -C checkpolicy install
 
 # Clean checkpolicy.
 clean:
 	$(MAKE) -C checkpolicy clean
 
+# Patch the kernel defconfig and Makefile.
+insert: 
+	cd $(LSMDIR); patch -p0 < $(PATCHDIR)/lsm$(LSMVER)-patch
+
+# Unpatch the kernel defconfig and Makefile.
+remove: 
+	cd $(LSMDIR); patch -p0 -R < $(PATCHDIR)/lsm$(LSMVER)-patch
 

Index: selinux/module/lsm-2.5-patch

module/lsm-2.5-patch new file +49 -0

49 lines not on this page · raw message

Index: selinux/module/lsm-patch

module/lsm-patch renamed from module/lsm-patch:1.11 +10 -6
diff -u selinux/module/lsm-patch:1.11 selinux/module/lsm-patch:1.13
@@ -4,18 +4,22 @@
 retrieving revision 1.1.1.10
 diff -u -r1.1.1.10 defconfig
 --- arch/i386/defconfig	2001/11/26 14:09:46	1.1.1.10
-+++ arch/i386/defconfig	2001/12/03 20:31:29
-@@ -154,7 +154,8 @@
++++ arch/i386/defconfig	2001/12/18 18:44:49
+@@ -153,8 +153,11 @@
+ #
  CONFIG_PACKET=y
  # CONFIG_PACKET_MMAP is not set
- # CONFIG_NETLINK is not set
+-# CONFIG_NETLINK is not set
 -# CONFIG_NETFILTER is not set
++CONFIG_NETLINK=y
++CONFIG_RTNETLINK=y
++# CONFIG_NETLINK_DEV is not set
 +CONFIG_NETFILTER=y
 +# CONFIG_NETFILTER_DEBUG is not set
  # CONFIG_FILTER is not set
  CONFIG_UNIX=y
  CONFIG_INET=y
-@@ -826,3 +827,11 @@
+@@ -826,3 +829,11 @@
  # Kernel hacking
  #
  # CONFIG_DEBUG_KERNEL is not set
@@ -33,11 +37,11 @@
 retrieving revision 1.16
 diff -u -r1.16 Makefile
 --- Makefile	2001/11/26 14:58:44	1.16
-+++ Makefile	2001/12/03 20:31:29
++++ Makefile	2001/12/18 18:44:49
 @@ -1,7 +1,7 @@
  VERSION = 2
  PATCHLEVEL = 4
- SUBLEVEL = 16
+ SUBLEVEL = 17
 -EXTRAVERSION = -lsm
 +EXTRAVERSION = -selinux
  

Index: selinux/module/lsm25-patch

module/lsm25-patch renamed from module/lsm25-patch:1.2 +0 -45

45 lines not on this page · raw message

Index: selinux/module/checkpolicy/Makefile

module/checkpolicy/Makefile renamed from module/checkpolicy/Makefile:1.4 +5 -0
diff -u selinux/module/checkpolicy/Makefile:1.4 selinux/module/checkpolicy/Makefile:1.5
@@ -2,6 +2,8 @@
 # Makefile for building the checkpolicy program
 #
 
+BINDIR=/usr/local/selinux/bin
+
 # Set to y if MLS is enabled in the module.
 MLS=n
 
@@ -41,6 +43,9 @@
 
 lex.yy.c: policy_scan.l
 	$(LEX) policy_scan.l
+
+install: checkpolicy
+	install -m 755 checkpolicy $(BINDIR)	
 
 clean:
 	rm -f checkpolicy $(OBJS) y.tab.c y.tab.h lex.yy.c 

Index: selinux/module/checkpolicy/policy_parse.y

module/checkpolicy/policy_parse.y renamed from module/checkpolicy/policy_parse.y:1.6 +38 -34

173 lines not on this page · raw message