Skip to contentSkip to conversation

SELinux Buildroot Additions

PATCH Superseded Clayton Shotwell 2 participants 22 messages Sep 25, 2013 – Oct 1, 2013

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover SELinux Buildroot Additions

This is Round 3 for the SELinux package additions.
General changes in this version:
- Reordered patches to ensure dependencies come before the packages.
- Removed the libsepol package since it has already been applied.
- Incorporated changes from Thomas and Arnout on many of the packages.

Per Thomas Petazzoni's <[email protected]> email, here is a brief overview of SELinux and how I have implemented it in buildroot.

SELinux is made up of several packages and Linux kernel configurations. The best reference, at least the most complete, is probably the SELinux Notebook at the link below. The notebook details how SELinux works and gives very good examples on how to implement SELinux policies.

http://www.freetechbooks.com/the-selinux-notebook-the-foundations-t785.html

Packages:
libsepol
libselinux
libsemanage
checkpolicy
sepolgen
setools
policycoreutils
refpolicy

For this implementation, I have added a package hierarchy that will allow for both a debugging and a paired down release version. The debugging version required Python support, and is therefore much larger while the release version does not. To enable the release version, simply select the refpolicy package (BR2_PACKAGE_REFPOLICY) and it selects all of the necessary packages to enable SELinux. For the debugging version, select the policycoreutils debugging configure option (BR2_PACKAGE_POLICYCOREUTILS_POLICY_DEBUGGING). This will pull in Python and a bunch of other packages into the build to debug the SELinux policy on target.

Caveats:
1. The Linux kernel config will need to be changed to enable SELinux support and extended attribute support on the file systems
2. The busybox config will need to be changed to remove some packages or to build each executable as a stand-alone package. The busybox symlinks don't work well with the default refpolicy.
3. The audit package will need to be enabled to log issues with the SELinux policy, especially if it is in enforcing mode.
4. If a modular SELinux policy is selected, BR2_PACKAGE_REFPOLICY_MONOLITHIC = n, then the policy will be compiled on target during the first boot which will take a long time (about a half hour on a pandaboard).

Clayton Shotwell (16):
pcre: Add host build support
libselinux: new package
ustr: new package
bzip2: Add host build shared library installation
libsemanage: new package
checkpolicy: new package
sepolgen: new package
sqlite: Add host build support
setools: new package
libcgroup: new package
python-pyparsing: Add host build option
audit: new package
policycoreutils: new package
python-pyxml: new package
refpolicy: new package
shadow: new package

 package/Config.in                                  |   16 +
 package/Config.in.host                             |    1 +
 package/audit/Config.in                            |   10 +
 package/audit/S14auditd                            |  172 +++
 ...it-0001-cross-compile-header-creation-fix.patch | 1424 ++++++++++++++++++++
 package/audit/audit-0002-remove-zos-plugin.patch   |   35 +
 package/audit/audit.mk                             |   58 +
 package/bzip2/bzip2.mk                             |    2 +
 package/checkpolicy/Config.in.host                 |   10 +
 package/checkpolicy/checkpolicy.mk                 |   30 +
 package/libcgroup/Config.in                        |    4 +
 package/libcgroup/libcgroup.mk                     |   38 +
 package/libselinux/Config.in                       |   19 +
 package/libselinux/libselinux.mk                   |   94 ++
 package/libsemanage/Config.in                      |   20 +
 .../libsemanage-0001-execption-lib-path-fix.patch  |   14 +
 package/libsemanage/libsemanage.mk                 |   80 ++
 package/pcre/pcre.mk                               |    1 +
 package/policycoreutils/Config.in                  |   76 ++
 package/policycoreutils/S15restorecond             |   85 ++
 .../policycoreutils-0001-cross-compile-fixes.patch |  332 +++++
 package/policycoreutils/policycoreutils.mk         |  230 ++++
 package/python-pyparsing/python-pyparsing.mk       |   47 +-
 package/python-pyxml/Config.in                     |   11 +
 package/python-pyxml/python-xml.mk                 |   58 +
 package/refpolicy/Config.in                        |   58 +
 package/refpolicy/S12selinux                       |  134 ++
 package/refpolicy/config                           |    8 +
 .../refpolicy-0001-gentoo-hardened-fixes.patch     | 1250 +++++++++++++++++
 package/refpolicy/refpolicy.mk                     |   80 ++
 package/sepolgen/Config.in                         |    8 +
 package/sepolgen/sepolgen.mk                       |   35 +
 package/setools/Config.in                          |   21 +
 .../setools/setools-0001-cross-compile-fixes.patch |  121 ++
 .../setools-0002-swig-typedef-python-fixes.patch   | 1014 ++++++++++++++
 package/setools/setools.mk                         |   85 ++
 package/shadow/Config.in                           |   13 +
 package/shadow/shadow.mk                           |   49 +
 package/sqlite/sqlite.mk                           |    1 +
 package/ustr/Config.in                             |   11 +
 .../ustr-0001-cross-compile-modifications.patch    |  144 ++
 package/ustr/ustr.mk                               |   55 +
 42 files changed, 5941 insertions(+), 13 deletions(-)
 create mode 100644 package/audit/Config.in
 create mode 100755 package/audit/S14auditd
 create mode 100644 package/audit/audit-0001-cross-compile-header-creation-fix.patch
 create mode 100644 package/audit/audit-0002-remove-zos-plugin.patch
 create mode 100644 package/audit/audit.mk
 create mode 100644 package/checkpolicy/Config.in.host
 create mode 100644 package/checkpolicy/checkpolicy.mk
 create mode 100644 package/libcgroup/Config.in
 create mode 100644 package/libcgroup/libcgroup.mk
 create mode 100644 package/libselinux/Config.in
 create mode 100644 package/libselinux/libselinux.mk
 create mode 100644 package/libsemanage/Config.in
 create mode 100644 package/libsemanage/libsemanage-0001-execption-lib-path-fix.patch
 create mode 100644 package/libsemanage/libsemanage.mk
 create mode 100644 package/policycoreutils/Config.in
 create mode 100755 package/policycoreutils/S15restorecond
 create mode 100644 package/policycoreutils/policycoreutils-0001-cross-compile-fixes.patch
 create mode 100644 package/policycoreutils/policycoreutils.mk
 create mode 100644 package/python-pyxml/Config.in
 create mode 100644 package/python-pyxml/python-xml.mk
 create mode 100644 package/refpolicy/Config.in
 create mode 100644 package/refpolicy/S12selinux
 create mode 100755 package/refpolicy/config
 create mode 100644 package/refpolicy/refpolicy-0001-gentoo-hardened-fixes.patch
 create mode 100644 package/refpolicy/refpolicy.mk
 create mode 100644 package/sepolgen/Config.in
 create mode 100644 package/sepolgen/sepolgen.mk
 create mode 100644 package/setools/Config.in
 create mode 100644 package/setools/setools-0001-cross-compile-fixes.patch
 create mode 100644 package/setools/setools-0002-swig-typedef-python-fixes.patch
 create mode 100644 package/setools/setools.mk
 create mode 100644 package/shadow/Config.in
 create mode 100644 package/shadow/shadow.mk
 create mode 100644 package/ustr/Config.in
 create mode 100644 package/ustr/ustr-0001-cross-compile-modifications.patch
 create mode 100644 package/ustr/ustr.mk
#1 lore raw

PATCH v3 1/16 pcre: Add host build support

---
Changes v2 -> v3:
- Changed order of patch to correct dependency issue (suggested by Thomas).
Changes v1 -> v2:
- No changes

 package/pcre/pcre.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
package/pcre/pcre.mk +1 -0
index bf86a3d..1b59dbc 100644
@@ -21,3 +21,4 @@ PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_16),--enable-pcre16,--disable-pcre16)
 PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32)
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
1.7.1
#2 lore raw

PATCH v3 2/16 libselinux: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Added dependencies on BR2_TOOLCHAIN_HAS_THREADS and BR2_LARGEFILE (suggested by Thomas).
- Corrected a minor issue in the mk file found during testing.
Changes v1 -> v2:
- Move Config.in entry into the libraries section since this is a
library.
- General cleanup to the mk file to conform to the standard format.
- Removed a dependency on the Linux kernel.
- Changed the original Python select in the Config.in to be a check
in the libselinux.mk file.
- Added a select for libsepol and pcre in the menuconfig instead of
just having package dependencies.
- Removed building the python bindings in the host configuration.

 package/Config.in                |    1 +
 package/libselinux/Config.in     |   19 ++++++++
 package/libselinux/libselinux.mk |   94 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 114 insertions(+), 0 deletions(-)
 create mode 100644 package/libselinux/Config.in
 create mode 100644 package/libselinux/libselinux.mk
package/Config.in +1 -0
index 1dd60d1..d2f651e 100644
@@ -695,6 +695,7 @@ source "package/tzdata/Config.in"
 endmenu
 
 menu "Security"
+source "package/libselinux/Config.in"
 source "package/libsepol/Config.in"
 endmenu
 
package/libselinux/Config.in new file +19 -0
new file mode 100644
index 0000000..503805f
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LIBSELINUX
+	bool "libselinux"
+	select BR2_PACKAGE_LIBSEPOL
+	select BR2_PACKAGE_PCRE
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  libselinux is the runtime SELinux library that provides interfaces 
+	  (e.g. library functions for the SELinux kernel APIs like getcon(), 
+	  other support functions like getseuserbyname()) to SELinux-aware 
+	  applications. libselinux may use the shared libsepol to manipulate 
+	  the binary policy if necessary (e.g. to downgrade the policy format 
+	  to an older version supported by the kernel) when loading policy.
+	  
+	  http://selinuxproject.org/page/Main_Page
+
+comment "libselinux support requires a toolchain with large file and threading support"
+        depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE
+
package/libselinux/libselinux.mk new file +94 -0

94 lines not on this page · raw message

Signature · 1 line
1.7.1
#3 lore raw

PATCH v3 3/16 ustr: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changes patch naming convention (suggested by Thomas).
- Added a dependency on BR2_LARGEFILE (suggested by Thomas).
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Fixed the patch naming to avoid using the version number.
- Cleaned up the patch to include a signed-off-by line.
- Added a check to only build static libraries if selected.

 package/Config.in                                  |    1 +
 package/ustr/Config.in                             |   11 ++
 .../ustr-0001-cross-compile-modifications.patch    |  144 ++++++++++++++++++++
 package/ustr/ustr.mk                               |   55 ++++++++
 4 files changed, 211 insertions(+), 0 deletions(-)
 create mode 100644 package/ustr/Config.in
 create mode 100644 package/ustr/ustr-0001-cross-compile-modifications.patch
 create mode 100644 package/ustr/ustr.mk
package/Config.in +1 -0
index d2f651e..a9fd388 100644
@@ -712,6 +712,7 @@ source "package/pcre/Config.in"
 source "package/popt/Config.in"
 source "package/readline/Config.in"
 source "package/slang/Config.in"
+source "package/ustr/Config.in"
 endmenu
 
 menu "JSON/XML"
package/ustr/Config.in new file +11 -0
new file mode 100644
index 0000000..0aa2251
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_USTR
+	bool "ustr"
+	depends on BR2_LARGEFILE
+	help
+	  A small, safe string library.
+	  
+	  http://www.and.org/ustr/
+
+comment "ustr requires a toolchain with large file support"
+	depends on !BR2_LARGEFILE
+
package/ustr/ustr-0001-cross-compile-modifications.patch new file +144 -0

144 lines not on this page · raw message

package/ustr/ustr.mk new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
1.7.1
#4 lore raw

PATCH v3 4/16 bzip2: Add host build shared library installation

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changed order of patch to correct dependency issue (suggested by Thomas).
Changes v1 -> v2:
- No changes

 package/bzip2/bzip2.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
package/bzip2/bzip2.mk +2 -0
index 45d5108..5876837 100644
@@ -71,6 +71,8 @@ endef
 define HOST_BZIP2_INSTALL_CMDS
 	$(HOST_MAKE_ENV) \
 		$(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install
+	$(HOST_MAKE_ENV) $(MAKE) \
+		-f Makefile-libbz2_so PREFIX=$(HOST_DIR)/usr -C $(@D) install
 endef
 
 $(eval $(generic-package))
Signature · 1 line
1.7.1
#5 lore raw

PATCH v3 5/16 libsemanage: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changes patch naming convention (suggested by Thomas).
- Added dependencies on BR2_TOOLCHAIN_HAS_THREADS and BR2_LARGEFILE (suggested by Thomas).
Changes v1 -> v2:
- Move Config.in entry into the libraries section since this is a
library.
- General cleanup to the mk file to conform to the standard format.
- Fixed the patch naming to avoid using the version number.
- Cleaned up the patch to include a signed-off-by line.
- Changed package dependencies into selects in the config.
- Changed the original Python select in the Config.in to be a check
in the mk file.
- Removed building the python bindings in the host configuration.

 package/Config.in                                  |    1 +
 package/libsemanage/Config.in                      |   20 +++++
 .../libsemanage-0001-execption-lib-path-fix.patch  |   14 ++++
 package/libsemanage/libsemanage.mk                 |   80 ++++++++++++++++++++
 4 files changed, 115 insertions(+), 0 deletions(-)
 create mode 100644 package/libsemanage/Config.in
 create mode 100644 package/libsemanage/libsemanage-0001-execption-lib-path-fix.patch
 create mode 100644 package/libsemanage/libsemanage.mk
package/Config.in +1 -0
index a9fd388..31eefed 100644
@@ -696,6 +696,7 @@ endmenu
 
 menu "Security"
 source "package/libselinux/Config.in"
+source "package/libsemanage/Config.in"
 source "package/libsepol/Config.in"
 endmenu
 
package/libsemanage/Config.in new file +20 -0
new file mode 100644
index 0000000..70a772d
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_LIBSEMANAGE
+	bool "libsemanage"
+	select BR2_PACKAGE_LIBSELINUX
+	select BR2_PACKAGE_USTR
+	select BR2_PACKAGE_BZIP2
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  libsemanage is the policy management library. It uses libsepol for binary 
+	  policy manipulation and libselinux for interacting with the SELinux 
+	  system. It also exec's helper programs for loading policy and for checking
+	  whether the file_contexts configuration is valid (load_policy and 
+	  setfiles from policycoreutils) presently, although this may change at 
+	  least for the bootstrapping case (for rpm).
+	  
+	  http://selinuxproject.org/page/Main_Page
+
+comment "libsemanage support requires a toolchain with large file and threading support"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE
+
package/libsemanage/libsemanage-0001-execption-lib-path-fix.patch new file +14 -0
new file mode 100644
index 0000000..cbcbea5
@@ -0,0 +1,14 @@
+Patch to correct a missing header file issue.
+
+Signed-off-by Clayton Shotwell <[email protected]>
+
+--- a/src/exception.sh	2011-12-21 11:46:04.000000000 -0600
++++ b/src/exception.sh	2012-08-27 11:29:58.000000000 -0500
+@@ -9,6 +9,6 @@
+ }
+ "
+ }
+-gcc -x c -c - -aux-info temp.aux < ../include/semanage/semanage.h
++gcc -x c -c - -aux-info temp.aux -I../include < ../include/semanage/semanage.h
+ for i in `awk '/extern int/ { print $6 }' temp.aux`; do except $i ; done
+ rm -f -- temp.aux -.o
package/libsemanage/libsemanage.mk new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
1.7.1
#6 lore raw

PATCH v3 6/16 checkpolicy: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Added checkpolicy as a host package (suggested by Arnout).
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Removed the option to do a target build because it should never be needed during normal operation.
- Added checkpolicy as a host package. (Suggested by Arnout)

 package/Config.in.host             |    1 +
 package/checkpolicy/Config.in.host |   10 ++++++++++
 package/checkpolicy/checkpolicy.mk |   30 ++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 package/checkpolicy/Config.in.host
 create mode 100644 package/checkpolicy/checkpolicy.mk
package/Config.in.host +1 -0
index 5fd2570..1b3e11b 100644
@@ -1,5 +1,6 @@
 menu "Host utilities"
 
+source "package/checkpolicy/Config.in.host"
 source "package/dfu-util/Config.in.host"
 source "package/dosfstools/Config.in.host"
 source "package/e2fsprogs/Config.in.host"
package/checkpolicy/Config.in.host new file +10 -0
new file mode 100644
index 0000000..75794be
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_CHECKPOLICY
+	bool "host checkpolicy"
+	help
+	  checkpolicy is the policy compiler. It uses libsepol to 
+	  generate the binary policy. checkpolicy uses the static 
+	  libsepol since it deals with low level details of the policy 
+	  that have not been encapsulated/abstracted by a proper 
+	  shared library interface. 
+	  
+	  http://selinuxproject.org/page/Main_Page
package/checkpolicy/checkpolicy.mk new file +30 -0
new file mode 100644
index 0000000..0c82d63
@@ -0,0 +1,30 @@
+################################################################################
+#
+# checkpolicy
+#
+################################################################################
+
+CHECKPOLICY_VERSION = 2.1.12
+CHECKPOLICY_SITE = http://userspace.selinuxproject.org/releases/20130423/
+CHECKPOLICY_LICENSE = GPLv2
+CHECKPOLICY_LICENSE_FILES = COPYING
+
+HOST_CHECKPOLICY_DEPENDENCIES = host-libselinux host-flex host-bison
+
+HOST_CHECKPOLICY_MAKE_OPTS = $(HOST_CONFIGURE_OPTS) \
+	LEX="$(HOST_DIR)/usr/bin/flex" \
+	YACC="$(HOST_DIR)/usr/bin/bison -y"
+
+define HOST_CHECKPOLICY_BUILD_CMDS
+	$(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_CHECKPOLICY_INSTALL_CMDS
+	$(MAKE) -C $(@D) install $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR)
+endef
+
+define HOST_CHECKPOLICY_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
1.7.1
#7 lore raw

PATCH v3 7/16 sepolgen: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- No changes.
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Changed package dependencies into selects in the config.

 package/Config.in            |    4 ++++
 package/sepolgen/Config.in   |    8 ++++++++
 package/sepolgen/sepolgen.mk |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 package/sepolgen/Config.in
 create mode 100644 package/sepolgen/sepolgen.mk
package/Config.in +4 -0
index 31eefed..056a6ef 100644
@@ -917,6 +917,10 @@ source "package/rtai/Config.in"
 source "package/xenomai/Config.in"
 endmenu
 
+menu "Security"
+source "package/sepolgen/Config.in"
+endmenu
+
 menu "Shell and utilities"
 source "package/at/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/sepolgen/Config.in new file +8 -0
new file mode 100644
index 0000000..2a4b49c
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_SEPOLGEN
+	bool "sepolgen"
+	select BR2_PACKAGE_PYTHON
+	help
+	  sepolgen is a python module/library that forms the core 
+	  of the modern audit2allow (a rewrite). 
+	  
+	  http://selinuxproject.org/page/Main_Page
package/sepolgen/sepolgen.mk new file +35 -0
new file mode 100644
index 0000000..a8c4786
@@ -0,0 +1,35 @@
+################################################################################
+#
+# sepolgen
+#
+################################################################################
+
+SEPOLGEN_VERSION = 1.1.9
+SEPOLGEN_SITE = http://userspace.selinuxproject.org/releases/20130423/
+SEPOLGEN_LICENSE = GPLv2
+SEPOLGEN_LICENSE_FILES = COPYING
+
+SEPOLGEN_DEPENDENCIES = python
+
+SEPOLGEN_INSTALL_STAGING = YES
+
+SEPOLGEN_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) \
+	PYTHONLIBDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
+
+define SEPOLGEN_BUILD_CMDS
+	$(MAKE) -C $(@D) $(SEPOLGEN_MAKE_CMDS) DESTDIR=$(STAGING_DIR)
+endef
+
+define SEPOLGEN_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D) install $(SEPOLGEN_MAKE_CMDS) DESTDIR=$(STAGING_DIR)
+endef
+
+define SEPOLGEN_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) install $(SEPOLGEN_MAKE_CMDS) DESTDIR=$(TARGET_DIR)
+endef
+
+define SEPOLGEN_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.1
#8 lore raw

PATCH v3 8/16 sqlite: Add host build support

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changed order of patch to correct dependency issue (suggested by Thomas).
Changes v1 -> v2:
- No changes

 package/sqlite/sqlite.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
package/sqlite/sqlite.mk +1 -0
index d474619..4d93172 100644
@@ -68,3 +68,4 @@ define SQLITE_UNINSTALL_STAGING_CMDS
 endef
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
\ No newline at end of file
Signature · 1 line
1.7.1
#9 lore raw

PATCH v3 9/16 setools: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changes patch naming convention (suggested by Thomas).
- Added dependencies on BR2_TOOLCHAIN_HAS_THREADS and BR2_LARGEFILE (suggested by Thomas).
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Cleaned up the patch to include a signed-off-by line.
- Changed package dependencies into selects in the config.
- Changed the original Python select in the Config.in to be a check
in the mk file.

 package/Config.in                                  |    1 +
 package/setools/Config.in                          |   21 +
 .../setools/setools-0001-cross-compile-fixes.patch |  121 +++
 .../setools-0002-swig-typedef-python-fixes.patch   | 1014 ++++++++++++++++++++
 package/setools/setools.mk                         |   85 ++
 5 files changed, 1242 insertions(+), 0 deletions(-)
 create mode 100644 package/setools/Config.in
 create mode 100644 package/setools/setools-0001-cross-compile-fixes.patch
 create mode 100644 package/setools/setools-0002-swig-typedef-python-fixes.patch
 create mode 100644 package/setools/setools.mk
package/Config.in +1 -0
index 056a6ef..a85cbdd 100644
@@ -919,6 +919,7 @@ endmenu
 
 menu "Security"
 source "package/sepolgen/Config.in"
+source "package/setools/Config.in"
 endmenu
 
 menu "Shell and utilities"
package/setools/Config.in new file +21 -0
new file mode 100644
index 0000000..acc551f
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_SETOOLS
+	bool "setools"
+	select BR2_PACKAGE_LIBSELINUX
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_LIBXML2
+	select BR2_PACKAGE_BZIP2
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  SETools is an open source project designed to facilitate SELinux policy 
+	  analysis. The primary tools are:
+	      
+	      apol - analyze a SELinux policy.
+	      seaudit - analyze audit messages from SELinux.
+	      seaudit-report - generate highly-customized audit log reports.
+	      sechecker - command line tool for performing modular checks on an SELinux policy.
+	      sediff - semantic policy difference tool for SELinux.
+	      secmds - command-line tools to analyze and search SELinux policy. 
+
+comment "setools support requires a toolchain with large file and threading support"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE
package/setools/setools-0001-cross-compile-fixes.patch new file +121 -0

121 lines not on this page · raw message

package/setools/setools-0002-swig-typedef-python-fixes.patch new file +1014 -0

1,014 lines not on this page · raw message

package/setools/setools.mk new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
1.7.1
#10 lore raw

PATCH v3 10/16 libcgroup: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- No changes.
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Corrected the license version and license file to be correct.
- Cleaned up the configure options to enable options for static libraries and linux-pam if they are selected in the configuration.

 package/Config.in              |    1 +
 package/libcgroup/Config.in    |    4 ++++
 package/libcgroup/libcgroup.mk |   38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 package/libcgroup/Config.in
 create mode 100644 package/libcgroup/libcgroup.mk
package/Config.in +1 -0
index a85cbdd..0a18d8d 100644
@@ -659,6 +659,7 @@ source "package/libatomic_ops/Config.in"
 source "package/libbsd/Config.in"
 source "package/libcap/Config.in"
 source "package/libcap-ng/Config.in"
+source "package/libcgroup/Config.in"
 source "package/libdaemon/Config.in"
 source "package/libelf/Config.in"
 source "package/libevent/Config.in"
package/libcgroup/Config.in new file +4 -0
new file mode 100644
index 0000000..17d2db2
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LIBCGROUP
+	bool "libcgroup"
+	help
+	  libcgroup is a library that abstracts the control group file system in Linux. 
package/libcgroup/libcgroup.mk new file +38 -0
new file mode 100644
index 0000000..06f1e60
@@ -0,0 +1,38 @@
+################################################################################
+#
+# libcgroup
+#
+################################################################################
+
+LIBCGROUP_VERSION = 0.38
+LIBCGROUP_SOURCE = libcgroup-$(LIBCGROUP_VERSION).tar.bz2
+LIBCGROUP_SITE = http://sourceforge.net/projects/libcg/files/latest/download
+LIBCGROUP_LICENSE = LGPLv2.1
+LIBCGROUP_LICENSE_FILES = COPYING
+
+LIBCGROUP_INSTALL_STAGING = YES
+
+# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h 
+# large file support. See https://bugzilla.redhat.com/show_bug.cgi?id=574992 
+# for more information.
+LIBCGROUP_CONF_ENV = \
+	CXXFLAGS+="-U_FILE_OFFSET_BITS" \
+	CFLAGS+="-U_FILE_OFFSET_BITS"
+
+LIBCGROUP_CONF_OPT = \
+	--disable-tools \
+	--disable-daemon \
+	--disable-initscript-install
+
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+	LIBCGROUP_CONF_OPT += --enable-static --disable-shared
+endif
+
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+	LIBCGROUP_DEPENDENCIES += linux-pam
+	LIBCGROUP_CONF_OPT += --enable-pam
+else
+	LIBCGROUP_CONF_OPT += --disable-pam
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.1
#11 lore raw

PATCH v3 10/16 libcgroup: new package

Dear Clayton Shotwell,

On this one, we're almost ready to go. A few comments below.

package/libcgroup/Config.in line 4

Quoted 10 lines · Clayton Shotwell
package/libcgroup/Config.in new file +4 -0
new file mode 100644
index 0000000..17d2db2
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LIBCGROUP
+	bool "libcgroup"
+	help
+	  libcgroup is a library that abstracts the control group file system in Linux. 

I believe this line is slightly too long. Also, the upstream URL is missing. It should probably be:

http://libcg.sourceforge.net/

Quoted 25 lines
package/libcgroup/libcgroup.mk new file +19 -0
new file mode 100644
index 0000000..06f1e60
@@ -0,0 +1,38 @@
+################################################################################
+#
+# libcgroup
+#
+################################################################################
+
+LIBCGROUP_VERSION = 0.38
+LIBCGROUP_SOURCE = libcgroup-$(LIBCGROUP_VERSION).tar.bz2
+LIBCGROUP_SITE = http://sourceforge.net/projects/libcg/files/latest/download
+LIBCGROUP_LICENSE = LGPLv2.1
+LIBCGROUP_LICENSE_FILES = COPYING
+
+LIBCGROUP_INSTALL_STAGING = YES
+
+# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h 
+# large file support. See https://bugzilla.redhat.com/show_bug.cgi?id=574992 
+# for more information.
+LIBCGROUP_CONF_ENV = \
+	CXXFLAGS+="-U_FILE_OFFSET_BITS" \

package/libcgroup/libcgroup.mk line 29

Quoted 10 lines
package/libcgroup/libcgroup.mk new file +10 -0
+	CFLAGS+="-U_FILE_OFFSET_BITS"
+
+LIBCGROUP_CONF_OPT = \
+	--disable-tools \
+	--disable-daemon \
+	--disable-initscript-install
+
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+	LIBCGROUP_CONF_OPT += --enable-static --disable-shared
+endif

This part is not needed, as it is passed by the autotools infrastructure already.

Maybe you want to resend just this patch with those fixes, so we can get it merged quickly, independently of the other SELinux changes.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#12 lore raw

PATCH v3 10/16 libcgroup: new package

Thomas,

Thomas Petazzoni <[email protected]> wrote on 10/01/2013 02:48:53 PM:

Quoted 4 lines

I believe this line is slightly too long. Also, the upstream URL is missing. It should probably be:

http://libcg.sourceforge.net/

I can fix both of those.

Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/package/libcgroup/libcgroup.mk

Quoted 7 lines

package/libcgroup/libcgroup.mk

Quoted 6 lines

new file mode 100644
index 0000000..06f1e60

package/libcgroup/libcgroup.mk new file +0 -0
@@ -0,0 +1,38 @@

+################################################################################

Quoted 5 lines

package/libcgroup/libcgroup.mk line 4

Quoted 4 lines
package/libcgroup/libcgroup.mk new file +3 -0
+#
+# libcgroup
+#

+################################################################################

Quoted 11 lines

package/libcgroup/libcgroup.mk

Quoted 4 lines
package/libcgroup/libcgroup.mk new file +4 -0
+
+LIBCGROUP_VERSION = 0.38
+LIBCGROUP_SOURCE = libcgroup-$(LIBCGROUP_VERSION).tar.bz2
+LIBCGROUP_SITE = http://sourceforge.net/projects/libcg/files/

latest/download

package/libcgroup/libcgroup.mk

Quoted 6 lines
package/libcgroup/libcgroup.mk new file +6 -0
+LIBCGROUP_LICENSE = LGPLv2.1
+LIBCGROUP_LICENSE_FILES = COPYING
+
+LIBCGROUP_INSTALL_STAGING = YES
+
+# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc 

fts.h

Quoted 18 lines

package/libcgroup/libcgroup.mk line 14

Quoted 1 line
package/libcgroup/libcgroup.mk new file +1 -0
+# large file support. See https://bugzilla.redhat.com/

show_bug.cgi?id=574992

package/libcgroup/libcgroup.mk line 29

Quoted 13 lines
package/libcgroup/libcgroup.mk new file +13 -0
+# for more information.
+LIBCGROUP_CONF_ENV = \
+   CXXFLAGS+="-U_FILE_OFFSET_BITS" \
+   CFLAGS+="-U_FILE_OFFSET_BITS"
+
+LIBCGROUP_CONF_OPT = \
+   --disable-tools \
+   --disable-daemon \
+   --disable-initscript-install
+
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+   LIBCGROUP_CONF_OPT += --enable-static --disable-shared
+endif

This part is not needed, as it is passed by the autotools infrastructure already.

I'll remove it.

Quoted 2 lines

Maybe you want to resend just this patch with those fixes, so we can get it merged quickly, independently of the other SELinux changes.

Should I do that with all of the simple patches?

Thanks,
Clayton

Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com

#13 lore raw

PATCH v3 10/16 libcgroup: new package

Clayton,

Quoted 4 lines · clshotwe at rockwellcollins.com
Quoted 2 lines

Maybe you want to resend just this patch with those fixes, so we can get it merged quickly, independently of the other SELinux changes.

Should I do that with all of the simple patches?

It's a matter of strategy. When a relatively simple patch is part of a larger, more complicated patch series, then it is unlikely to get committed until the entire patch series gets committed. So, strategically speaking, you might want to progressively reduce the size of your patch series by merging parts of it that are independent of the rest of the series, but are needed for it. Your libcgroup package is a good candidate :)

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#14 lore raw

PATCH v3 11/16 python-pyparsing: Add host build option

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changed order of patch to correct dependency issue (suggested by Thomas).
Changes v1 -> v2:
- No changes.

 package/python-pyparsing/python-pyparsing.mk |   47 ++++++++++++++++++-------
 1 files changed, 34 insertions(+), 13 deletions(-)
package/python-pyparsing/python-pyparsing.mk +34 -13
index 7814ce3..b6ba40d 100644
@@ -14,25 +14,46 @@ PYTHON_PYPARSING_DEPENDENCIES    = python
 
 # Shamelessly vampirised from python-pygame ;-)
 define PYTHON_PYPARSING_BUILD_CMDS
-	(cd $(@D);                                              \
-	 CC="$(TARGET_CC)"                                      \
-	 CFLAGS="$(TARGET_CFLAGS)"                              \
-	 LDSHARED="$(TARGET_CROSS)gcc -shared"                  \
-	 CROSS_COMPILING=yes                                    \
-	 _python_sysroot=$(STAGING_DIR)                         \
-	 _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION)    \
-	 _python_prefix=/usr                                    \
-	 _python_exec_prefix=/usr                               \
-	 $(HOST_DIR)/usr/bin/python setup.py build              \
+	(cd $(@D); \
+		CC="$(TARGET_CC)" \
+		CFLAGS="$(TARGET_CFLAGS)" \
+		LDSHARED="$(TARGET_CROSS)gcc -shared" \
+		CROSS_COMPILING=yes \
+		_python_sysroot=$(STAGING_DIR) \
+		_python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \
+		_python_prefix=/usr \
+		_python_exec_prefix=/usr \
+		$(HOST_DIR)/usr/bin/python setup.py build \
 	)
 endef
 
 # Shamelessly vampirised from python-pygame ;-)
 define PYTHON_PYPARSING_INSTALL_TARGET_CMDS
-	(cd $(@D);                                              \
-	 $(HOST_DIR)/usr/bin/python setup.py install            \
-	                            --prefix=$(TARGET_DIR)/usr  \
+	(cd $(@D); \
+		$(HOST_DIR)/usr/bin/python setup.py install \
+		--prefix=$(TARGET_DIR)/usr \
+	)
+endef
+
+HOST_PYTHON_PYPARSING_DEPENDENCIES = host-python
+
+define HOST_PYTHON_PYPARSING_BUILD_CMDS
+	(cd $(@D); \
+		_python_sysroot=$(HOST_DIR) \
+		_python_srcdir=$(BUILD_DIR)/host-python$(PYTHON_VERSION) \
+		_python_prefix=/usr \
+		_python_exec_prefix=/usr \
+		$(HOST_DIR)/usr/bin/python setup.py build \
+	)
+endef
+
+define HOST_PYTHON_PYPARSING_INSTALL_CMDS
+	(cd $(@D); \
+		$(HOST_DIR)/usr/bin/python setup.py install \
+		--prefix=$(HOST_DIR)/usr \
 	)
 endef
 
 $(eval $(generic-package))
+$(eval $(host-generic-package))
+
Signature · 1 line
1.7.1
#15 lore raw

PATCH v3 12/16 audit: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changed order of patch to correct dependency issue (suggested by Thomas).
- Changes patch naming convention (suggested by Thomas).
- Added upstream submission link for patch (suggested by Thomas).
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Fixed the patch naming to avoid using the version number.
- Cleaned up the patch to include a signed-off-by line.
- Changed the original Python select in the Config.in to be a check in the mk file.

 package/Config.in                                  |    1 +
 package/audit/Config.in                            |   10 +
 package/audit/S14auditd                            |  172 +++
 ...it-0001-cross-compile-header-creation-fix.patch | 1424 ++++++++++++++++++++
 package/audit/audit-0002-remove-zos-plugin.patch   |   35 +
 package/audit/audit.mk                             |   58 +
 6 files changed, 1700 insertions(+), 0 deletions(-)
 create mode 100644 package/audit/Config.in
 create mode 100755 package/audit/S14auditd
 create mode 100644 package/audit/audit-0001-cross-compile-header-creation-fix.patch
 create mode 100644 package/audit/audit-0002-remove-zos-plugin.patch
 create mode 100644 package/audit/audit.mk
package/Config.in +1 -0
index 0a18d8d..e551c42 100644
@@ -949,6 +949,7 @@ endmenu
 menu "System tools"
 source "package/acl/Config.in"
 source "package/attr/Config.in"
+source "package/audit/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/bootutils/Config.in"
 endif
package/audit/Config.in new file +10 -0
new file mode 100644
index 0000000..4766c10
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_AUDIT
+	bool "audit"
+	help
+	  The audit package contains the user space utilities for
+	  storing and searching the audit records generate by
+	  the audit subsystem in the Linux 2.6 kernel
+	  
+	  Note: The z/OS remote plugin is disabled in this package
+	  
+	  http://people.redhat.com/sgrubb/audit/
package/audit/S14auditd new file +172 -0

172 lines not on this page · raw message

package/audit/audit-0001-cross-compile-header-creation-fix.patch new file +1424 -0

1,424 lines not on this page · raw message

package/audit/audit-0002-remove-zos-plugin.patch new file +35 -0
new file mode 100644
index 0000000..576d8fa
@@ -0,0 +1,35 @@
+Removed the step to build the zos-remote.
+
+Signed-off-by Clayton Shotwell <[email protected]>
+---
+--- a/audisp/plugins/Makefile.am	2012-08-28 10:33:03.582396601 -0500
++++ b/audisp/plugins/Makefile.am	2012-08-28 10:33:14.162399662 -0500
+@@ -22,7 +22,7 @@
+ 
+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+ 
+-SUBDIRS = builtins zos-remote remote
++SUBDIRS = builtins remote
+ #SUBDIRS = builtins zos-remote
+ if HAVE_PRELUDE
+ SUBDIRS += prelude
+--- a/audisp/plugins/Makefile.in	2012-08-28 10:33:03.592380390 -0500
++++ b/audisp/plugins/Makefile.in	2012-08-28 10:35:38.482397668 -0500
+@@ -84,7 +84,7 @@
+ 	distdir
+ ETAGS = etags
+ CTAGS = ctags
+-DIST_SUBDIRS = builtins zos-remote remote prelude
++DIST_SUBDIRS = builtins remote prelude
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ am__relativize = \
+   dir0=`pwd`; \
+@@ -242,7 +242,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+-SUBDIRS = builtins zos-remote remote $(am__append_1)
++SUBDIRS = builtins remote $(am__append_1)
+ all: all-recursive
+ 
+ .SUFFIXES:
package/audit/audit.mk new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
1.7.1
#16 lore raw

PATCH v3 13/16 policycoreutils: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Added dependencies on BR2_TOOLCHAIN_HAS_THREADS and BR2_LARGEFILE (suggested by Thomas).
- Changes patch naming convention (suggested by Thomas).
- Added selects for linux-pam and audit.
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Fixed the patch naming to avoid using the version number.
- Cleaned up the patch to include a signed-off-by line.
- Changed package dependencies into selects in the config.

 package/Config.in                                  |    1 +
 package/policycoreutils/Config.in                  |   76 +++++
 package/policycoreutils/S15restorecond             |   85 +++++
 .../policycoreutils-0001-cross-compile-fixes.patch |  332 ++++++++++++++++++++
 package/policycoreutils/policycoreutils.mk         |  230 ++++++++++++++
 5 files changed, 724 insertions(+), 0 deletions(-)
 create mode 100644 package/policycoreutils/Config.in
 create mode 100755 package/policycoreutils/S15restorecond
 create mode 100644 package/policycoreutils/policycoreutils-0001-cross-compile-fixes.patch
 create mode 100644 package/policycoreutils/policycoreutils.mk
package/Config.in +1 -0
index e551c42..2c45e2f 100644
@@ -919,6 +919,7 @@ source "package/xenomai/Config.in"
 endmenu
 
 menu "Security"
+source "package/policycoreutils/Config.in"
 source "package/sepolgen/Config.in"
 source "package/setools/Config.in"
 endmenu
package/policycoreutils/Config.in new file +76 -0

76 lines not on this page · raw message

package/policycoreutils/S15restorecond new file +85 -0

85 lines not on this page · raw message

package/policycoreutils/policycoreutils-0001-cross-compile-fixes.patch new file +332 -0

332 lines not on this page · raw message

package/policycoreutils/policycoreutils.mk new file +230 -0

230 lines not on this page · raw message

Signature · 1 line
1.7.1
#17 lore raw

PATCH v3 14/16 python-pyxml: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- No changes.
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.

 package/Config.in                  |    1 +
 package/python-pyxml/Config.in     |   11 +++++++
 package/python-pyxml/python-xml.mk |   58 ++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pyxml/Config.in
 create mode 100644 package/python-pyxml/python-xml.mk
package/Config.in +1 -0
index 2c45e2f..538a791 100644
@@ -396,6 +396,7 @@ source "package/python-protobuf/Config.in"
 source "package/python-pygame/Config.in"
 source "package/python-pyparsing/Config.in"
 source "package/python-pyro/Config.in"
+source "package/python-pyxml/Config.in"
 source "package/python-pyzmq/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
package/python-pyxml/Config.in new file +11 -0
new file mode 100644
index 0000000..420f3ad
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_PYTHON_PYXML
+	bool "python-pyxml"
+	depends on BR2_PACKAGE_PYTHON
+	help
+	  This is the Python XML package.  The distribution contains a
+	  validating XML parser, an implementation of the SAX and DOM
+	  programming interfaces, an interface to the Expat parser (and the
+	  Expat parser itself), and a C helper module that can speed up
+	  xmllib.py by a factor of 5.  There's even documentation!
+
+	  http://pyxml.sourceforge.net/topics/index.html
package/python-pyxml/python-xml.mk new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
1.7.1
#18 lore raw

PATCH v3 15/16 refpolicy: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Changes patch naming convention (suggested by Thomas).
- Added dependencies on BR2_TOOLCHAIN_HAS_THREADS and BR2_LARGEFILE (suggested by Thomas).
- Removed configure option for a specific patch folder (suggested by Thomas).
- Removed distribution configuration option (suggested by Thomas).
- Changed the monolithic configuration option to a modular configuration option (suggested by Thomas).
- Removed the refpolicy name option (suggested by Thomas).
- Corrected gramatical and comment errors (suggested by Thomas).
- Multiple style corrections to the mk file (suggested by Thomas).
- Added a comment to clairfy the usage of the the host build options for a target build.
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.
- Fixed the patch naming to match the standard 4 digit numbering.
- Changed package dependencies into selects in the config.

 package/Config.in                                  |    1 +
 package/refpolicy/Config.in                        |   58 +
 package/refpolicy/S12selinux                       |  134 +++
 package/refpolicy/config                           |    8 +
 .../refpolicy-0001-gentoo-hardened-fixes.patch     | 1250 ++++++++++++++++++++
 package/refpolicy/refpolicy.mk                     |   80 ++
 6 files changed, 1531 insertions(+), 0 deletions(-)
 create mode 100644 package/refpolicy/Config.in
 create mode 100644 package/refpolicy/S12selinux
 create mode 100755 package/refpolicy/config
 create mode 100644 package/refpolicy/refpolicy-0001-gentoo-hardened-fixes.patch
 create mode 100644 package/refpolicy/refpolicy.mk
package/Config.in +1 -0
index 538a791..dfe6dc1 100644
@@ -921,6 +921,7 @@ endmenu
 
 menu "Security"
 source "package/policycoreutils/Config.in"
+source "package/refpolicy/Config.in"
 source "package/sepolgen/Config.in"
 source "package/setools/Config.in"
 endmenu
package/refpolicy/Config.in new file +58 -0

58 lines not on this page · raw message

package/refpolicy/S12selinux new file +134 -0

134 lines not on this page · raw message

package/refpolicy/config new file +8 -0
new file mode 100755
index 0000000..5eee807
@@ -0,0 +1,8 @@
+# This file controls the state of SELinux on the system.
+# SELINUX= can take one of these three values:
+#     enforcing - SELinux security policy is enforced.
+#     permissive - SELinux prints warnings instead of enforcing.
+#     disabled - No SELinux policy is loaded.
+SELINUX=permissive
+# SELINUXTYPE= name of the selinux policy to use
+SELINUXTYPE=refpolicy
package/refpolicy/refpolicy-0001-gentoo-hardened-fixes.patch new file +1250 -0

1,250 lines not on this page · raw message

package/refpolicy/refpolicy.mk new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
1.7.1
#19 lore raw

PATCH v3 16/16 shadow: new package

In reply to Clayton Shotwell

---
Changes v2 -> v3:
- Corrected spelling error.
Changes v1 -> v2:
- General cleanup to the mk file to conform to the standard format.

 package/Config.in        |    3 ++
 package/shadow/Config.in |   13 ++++++++++++
 package/shadow/shadow.mk |   49 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 0 deletions(-)
 create mode 100644 package/shadow/Config.in
 create mode 100644 package/shadow/shadow.mk
package/Config.in +3 -0
index dfe6dc1..e302759 100644
@@ -941,6 +941,9 @@ source "package/lockfile-progs/Config.in"
 source "package/logrotate/Config.in"
 source "package/logsurfer/Config.in"
 source "package/screen/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+source "package/shadow/Config.in"
+endif
 source "package/sudo/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/time/Config.in"
package/shadow/Config.in new file +13 -0
new file mode 100644
index 0000000..5692ac6
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_SHADOW
+	bool "shadow"
+	help
+	  The shadow-utils package includes the necessary programs for
+	  converting UNIX password files to the shadow password format, plus
+	  programs for managing user and group accounts. The pwconv command
+	  converts passwords to the shadow password format. The pwunconv command
+	  unconverts shadow passwords and generates an npasswd file (a standard
+	  UNIX password file). The pwck command checks the integrity of password
+	  and shadow files. The lastlog command prints out the last login times
+	  for all users. The useradd, userdel, and usermod commands are used for
+	  managing user accounts. The groupadd, groupdel, and groupmod commands
+	  are used for managing group accounts.
package/shadow/shadow.mk new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
1.7.1
#20 lore raw

v3 cover SELinux Buildroot Additions

In reply to Clayton Shotwell

Dear Clayton Shotwell,

Quoted 10 lines · Clayton Shotwell

For this implementation, I have added a package hierarchy that will allow for both a debugging and a paired down release version. The debugging version required Python support, and is therefore much larger while the release version does not. To enable the release version, simply select the refpolicy package (BR2_PACKAGE_REFPOLICY) and it selects all of the necessary packages to enable SELinux. For the debugging version, select the policycoreutils debugging configure option (BR2_PACKAGE_POLICYCOREUTILS_POLICY_DEBUGGING). This will pull in Python and a bunch of other packages into the build to debug the SELinux policy on target.

I still don't quite understand when Python is needed exactly. For example, in your PATCH 02/16 that adds the libselinux package, the Python support is enabled as soon as the Python interpreter is enabled.

Is this libselinux Python stuff only needed to *debug* SELinux on the target?

If so, then we clearly don't want to enable it as soon as Python is enabled in the Buildroot configuration: an user can perfectly want a Python interpreter to be installed on the target and to use SELinux, but not to have the SELinux debugging stuff.

I'd really like to understand this point before moving on with those packages.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#21 lore raw

v3 cover SELinux Buildroot Additions

Thomas,

Thomas Petazzoni <[email protected]> wrote on 10/01/2013 02:51:20 PM:

Quoted 1 line
Quoted 1 line

For this implementation, I have added a package hierarchy that will

allow

Quoted 2 lines
Quoted 2 lines

for both a debugging and a paired down release version. The debugging version required Python support, and is therefore much larger while

the

Quoted 1 line
Quoted 1 line

release version does not. To enable the release version, simply

select

Quoted 1 line
Quoted 1 line

the refpolicy package (BR2_PACKAGE_REFPOLICY) and it selects all of

the

Quoted 1 line
Quoted 1 line

necessary packages to enable SELinux. For the debugging version,

select

Quoted 2 lines
Quoted 2 lines

the policycoreutils debugging configure option (BR2_PACKAGE_POLICYCOREUTILS_POLICY_DEBUGGING). This will pull in

Python

Quoted 1 line
Quoted 1 line

and a bunch of other packages into the build to debug the SELinux

policy

Quoted 8 lines
Quoted 1 line

on target.

I still don't quite understand when Python is needed exactly. For example, in your PATCH 02/16 that adds the libselinux package, the Python support is enabled as soon as the Python interpreter is enabled.

Is this libselinux Python stuff only needed to *debug* SELinux on the target?

That is correct. The Python bindings are not used for standard system operation. The libselinux build creates the bindings that allow the audit2allow (part of they policycoreutils package) to analyze the SELinux audit logs and generate policy fixes. This is a very handy tool for creating fixes to the SELinux policy.

Quoted 4 lines

If so, then we clearly don't want to enable it as soon as Python is enabled in the Buildroot configuration: an user can perfectly want a Python interpreter to be installed on the target and to use SELinux, but not to have the SELinux debugging stuff.

There will not be many files added when Python is enabled. I could also see somebody wanting to build a Python application that leverages the libselinux bindings (less likely). I can add back in the SELinux debugging handles to each of the packages to make it a configuration option. I removed that feature after the first revision.

Quoted 2 lines

I'd really like to understand this point before moving on with those packages.

Sounds like I really need to get that documentation completed.

Thanks,
Clayton

Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com