diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2019-11-14 09:48:48 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2019-12-19 11:09:21 -0500 |
commit | 41f8c2e5ba2cee972ba1d1a958275ac543f9d773 (patch) | |
tree | 65fc036b5aca5fbb5f41872cd3eaebebb2d7bbe6 | |
parent | 7bb1507928f2e0f54ff8eac4135e15e821cdb1e2 (diff) | |
download | meta-selinux-41f8c2e5ba2cee972ba1d1a958275ac543f9d773.tar.gz |
libsemanage: uprev to 2.9 (20190315)
* Switch to python3
* Drop patches:
libsemanage-fix-path-nologin.patch
0001-src-Makefile-fix-includedir-in-libselinux.pc.patch
* Rebase patches
* Update policy version to 31
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
10 files changed, 70 insertions, 128 deletions
diff --git a/recipes-security/selinux/libsemanage.inc b/recipes-security/selinux/libsemanage.inc index be0a5f1..9dc1095 100644 --- a/recipes-security/selinux/libsemanage.inc +++ b/recipes-security/selinux/libsemanage.inc | |||
@@ -6,41 +6,39 @@ on binary policies such as customizing policy boolean settings." | |||
6 | SECTION = "base" | 6 | SECTION = "base" |
7 | LICENSE = "LGPLv2.1+" | 7 | LICENSE = "LGPLv2.1+" |
8 | 8 | ||
9 | inherit lib_package python-dir | 9 | inherit lib_package python3-dir |
10 | 10 | ||
11 | DEPENDS += "libsepol libselinux bzip2 python bison-native flex-native swig-native" | 11 | DEPENDS += "libsepol libselinux bzip2 python3 bison-native flex-native swig-native" |
12 | DEPENDS_append_class-target += "audit" | 12 | DEPENDS_append_class-target = " audit" |
13 | 13 | ||
14 | PACKAGES =+ "${PN}-python" | 14 | PACKAGES =+ "${PN}-python" |
15 | 15 | ||
16 | # For /usr/libexec/selinux/semanage_migrate_store | 16 | # For /usr/libexec/selinux/semanage_migrate_store |
17 | RDEPENDS_${PN}-python += "python" | 17 | RDEPENDS_${PN}-python += "python3-core" |
18 | 18 | ||
19 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ | 19 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ |
20 | ${libexecdir}/selinux/semanage_migrate_store" | 20 | ${libexecdir}/selinux/semanage_migrate_store" |
21 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" | 21 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" |
22 | 22 | ||
23 | FILES_${PN} += "${libexecdir}" | ||
24 | |||
23 | EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y" | 25 | EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y" |
24 | 26 | ||
25 | do_compile_append() { | 27 | do_compile_append() { |
26 | oe_runmake pywrap \ | 28 | oe_runmake pywrap \ |
27 | INCLUDEDIR='${STAGING_INCDIR}' \ | 29 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ |
28 | LIBDIR='${STAGING_LIBDIR}' \ | 30 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ |
29 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | 31 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' |
30 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
31 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
32 | PYTHONLIBDIR='${PYLIB}' | ||
33 | } | 32 | } |
34 | 33 | ||
35 | do_install_append() { | 34 | do_install_append() { |
36 | oe_runmake install-pywrap swigify \ | 35 | oe_runmake install-pywrap swigify \ |
37 | PYCEXT='.so' \ | 36 | PYCEXT='.so' \ |
38 | PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | 37 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ |
39 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | 38 | PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' |
40 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
41 | 39 | ||
42 | # Update "policy-version" for semanage.conf | 40 | # Update "policy-version" for semanage.conf |
43 | sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 30/' \ | 41 | sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 31/' \ |
44 | ${D}/etc/selinux/semanage.conf | 42 | ${D}/etc/selinux/semanage.conf |
45 | } | 43 | } |
46 | 44 | ||
diff --git a/recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch b/recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch deleted file mode 100644 index 73613d3..0000000 --- a/recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From e773c0952b06370d81e9b113f9b0b3388e323e52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 18 Feb 2016 02:39:16 +0000 | ||
4 | Subject: [PATCH] src/Makefile: fix includedir in libselinux.pc | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
9 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
10 | --- | ||
11 | src/Makefile | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/src/Makefile b/src/Makefile | ||
15 | index dea751e..4af4568 100644 | ||
16 | --- a/src/Makefile | ||
17 | +++ b/src/Makefile | ||
18 | @@ -93,6 +93,7 @@ $(LIBSO): $(LOBJS) | ||
19 | |||
20 | $(LIBPC): $(LIBPC).in ../VERSION | ||
21 | sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@ | ||
22 | + sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:${libdir}:; s:@includedir@:${prefix}/include:' < $< > $@ | ||
23 | |||
24 | semanageswig_python_exception.i: ../include/semanage/semanage.h | ||
25 | bash -e exception.sh > $@ || (rm -f $@ ; false) | ||
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch b/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch index e3c2f82..0b1f3d8 100644 --- a/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch +++ b/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c87bef28e768e2f6bc8612a768ebf9099d156576 Mon Sep 17 00:00:00 2001 | 1 | From 01a37b94a1f5605a395e8b45ee9ec653ce716c06 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Mon, 26 Mar 2012 15:15:16 +0800 | 3 | Date: Mon, 26 Mar 2012 15:15:16 +0800 |
4 | Subject: [PATCH] libsemanage: Fix execve segfaults on Ubuntu. | 4 | Subject: [PATCH] libsemanage: Fix execve segfaults on Ubuntu. |
@@ -9,15 +9,18 @@ Such as "make load" while building refpolicy. | |||
9 | 9 | ||
10 | http://oss.tresys.com/pipermail/refpolicy/2011-December/004859.html | 10 | http://oss.tresys.com/pipermail/refpolicy/2011-December/004859.html |
11 | 11 | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
12 | --- | 15 | --- |
13 | src/semanage_store.c | 2 +- | 16 | src/semanage_store.c | 2 +- |
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
15 | 18 | ||
16 | diff --git a/src/semanage_store.c b/src/semanage_store.c | 19 | diff --git a/src/semanage_store.c b/src/semanage_store.c |
17 | index 6158d08..1923f0f 100644 | 20 | index 58dded6..1a94545 100644 |
18 | --- a/src/semanage_store.c | 21 | --- a/src/semanage_store.c |
19 | +++ b/src/semanage_store.c | 22 | +++ b/src/semanage_store.c |
20 | @@ -1405,7 +1405,7 @@ static int semanage_exec_prog(semanage_handle_t * sh, | 23 | @@ -1441,7 +1441,7 @@ static int semanage_exec_prog(semanage_handle_t * sh, |
21 | if (forkval == 0) { | 24 | if (forkval == 0) { |
22 | /* child process. file descriptors will be closed | 25 | /* child process. file descriptors will be closed |
23 | * because they were set as close-on-exec. */ | 26 | * because they were set as close-on-exec. */ |
@@ -26,3 +29,6 @@ index 6158d08..1923f0f 100644 | |||
26 | _exit(EXIT_FAILURE); /* if execve() failed */ | 29 | _exit(EXIT_FAILURE); /* if execve() failed */ |
27 | } | 30 | } |
28 | 31 | ||
32 | -- | ||
33 | 2.7.4 | ||
34 | |||
diff --git a/recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch b/recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch index 205bc97..6ea9c29 100644 --- a/recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch +++ b/recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 8981b979e36afe2d8384b63c3f48fa8854d1983a Mon Sep 17 00:00:00 2001 | 1 | From 50f8f9f090425d23ecab2bedc949bc65bc4d58dc Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Mon, 20 Jan 2014 03:53:48 -0500 | 3 | Date: Mon, 20 Jan 2014 03:53:48 -0500 |
4 | Subject: [PATCH] libsemanage: allow to disable audit support | 4 | Subject: [PATCH] libsemanage: allow to disable audit support |
@@ -6,7 +6,6 @@ Subject: [PATCH] libsemanage: allow to disable audit support | |||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | 7 | ||
8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | 8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
9 | |||
10 | --- | 9 | --- |
11 | src/Makefile | 10 +++++++++- | 10 | src/Makefile | 10 +++++++++- |
12 | src/seusers_local.c | 13 +++++++++++++ | 11 | src/seusers_local.c | 13 +++++++++++++ |
@@ -14,10 +13,10 @@ Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | |||
14 | 3 files changed, 31 insertions(+), 2 deletions(-) | 13 | 3 files changed, 31 insertions(+), 2 deletions(-) |
15 | 14 | ||
16 | diff --git a/src/Makefile b/src/Makefile | 15 | diff --git a/src/Makefile b/src/Makefile |
17 | index d457208..e8831ab 100644 | 16 | index 8240c3a..1485d23 100644 |
18 | --- a/src/Makefile | 17 | --- a/src/Makefile |
19 | +++ b/src/Makefile | 18 | +++ b/src/Makefile |
20 | @@ -29,6 +29,14 @@ ifeq ($(DEBUG),1) | 19 | @@ -26,6 +26,14 @@ ifeq ($(DEBUG),1) |
21 | export LDFLAGS = -g | 20 | export LDFLAGS = -g |
22 | endif | 21 | endif |
23 | 22 | ||
@@ -32,7 +31,7 @@ index d457208..e8831ab 100644 | |||
32 | LEX = flex | 31 | LEX = flex |
33 | LFLAGS = -s | 32 | LFLAGS = -s |
34 | YACC = bison | 33 | YACC = bison |
35 | @@ -91,7 +99,7 @@ $(LIBA): $(OBJS) | 34 | @@ -88,7 +96,7 @@ $(LIBA): $(OBJS) |
36 | $(RANLIB) $@ | 35 | $(RANLIB) $@ |
37 | 36 | ||
38 | $(LIBSO): $(LOBJS) | 37 | $(LIBSO): $(LOBJS) |
@@ -42,7 +41,7 @@ index d457208..e8831ab 100644 | |||
42 | 41 | ||
43 | $(LIBPC): $(LIBPC).in ../VERSION | 42 | $(LIBPC): $(LIBPC).in ../VERSION |
44 | diff --git a/src/seusers_local.c b/src/seusers_local.c | 43 | diff --git a/src/seusers_local.c b/src/seusers_local.c |
45 | index 42c3a8b..9ee31e2 100644 | 44 | index a79e2d3..ce76dee 100644 |
46 | --- a/src/seusers_local.c | 45 | --- a/src/seusers_local.c |
47 | +++ b/src/seusers_local.c | 46 | +++ b/src/seusers_local.c |
48 | @@ -8,7 +8,11 @@ typedef struct semanage_seuser record_t; | 47 | @@ -8,7 +8,11 @@ typedef struct semanage_seuser record_t; |
@@ -57,7 +56,7 @@ index 42c3a8b..9ee31e2 100644 | |||
57 | #include <errno.h> | 56 | #include <errno.h> |
58 | #include "user_internal.h" | 57 | #include "user_internal.h" |
59 | #include "seuser_internal.h" | 58 | #include "seuser_internal.h" |
60 | @@ -51,6 +55,7 @@ static char *semanage_user_roles(semanage_handle_t * handle, const char *sename) | 59 | @@ -55,6 +59,7 @@ static char *semanage_user_roles(semanage_handle_t * handle, const char *sename) |
61 | return roles; | 60 | return roles; |
62 | } | 61 | } |
63 | 62 | ||
@@ -65,7 +64,7 @@ index 42c3a8b..9ee31e2 100644 | |||
65 | static int semanage_seuser_audit(semanage_handle_t * handle, | 64 | static int semanage_seuser_audit(semanage_handle_t * handle, |
66 | const semanage_seuser_t * seuser, | 65 | const semanage_seuser_t * seuser, |
67 | const semanage_seuser_t * previous, | 66 | const semanage_seuser_t * previous, |
68 | @@ -114,6 +119,7 @@ err: | 67 | @@ -119,6 +124,7 @@ err: |
69 | free(proles); | 68 | free(proles); |
70 | return rc; | 69 | return rc; |
71 | } | 70 | } |
@@ -73,7 +72,7 @@ index 42c3a8b..9ee31e2 100644 | |||
73 | 72 | ||
74 | int semanage_seuser_modify_local(semanage_handle_t * handle, | 73 | int semanage_seuser_modify_local(semanage_handle_t * handle, |
75 | const semanage_seuser_key_t * key, | 74 | const semanage_seuser_key_t * key, |
76 | @@ -158,8 +164,11 @@ int semanage_seuser_modify_local(semanage_handle_t * handle, | 75 | @@ -163,8 +169,11 @@ int semanage_seuser_modify_local(semanage_handle_t * handle, |
77 | (void) semanage_seuser_query(handle, key, &previous); | 76 | (void) semanage_seuser_query(handle, key, &previous); |
78 | handle->msg_callback = callback; | 77 | handle->msg_callback = callback; |
79 | rc = dbase_modify(handle, dconfig, key, new); | 78 | rc = dbase_modify(handle, dconfig, key, new); |
@@ -85,7 +84,7 @@ index 42c3a8b..9ee31e2 100644 | |||
85 | err: | 84 | err: |
86 | if (previous) | 85 | if (previous) |
87 | semanage_seuser_free(previous); | 86 | semanage_seuser_free(previous); |
88 | @@ -175,8 +184,12 @@ int semanage_seuser_del_local(semanage_handle_t * handle, | 87 | @@ -180,8 +189,12 @@ int semanage_seuser_del_local(semanage_handle_t * handle, |
89 | dbase_config_t *dconfig = semanage_seuser_dbase_local(handle); | 88 | dbase_config_t *dconfig = semanage_seuser_dbase_local(handle); |
90 | rc = dbase_del(handle, dconfig, key); | 89 | rc = dbase_del(handle, dconfig, key); |
91 | semanage_seuser_query(handle, key, &seuser); | 90 | semanage_seuser_query(handle, key, &seuser); |
@@ -99,10 +98,10 @@ index 42c3a8b..9ee31e2 100644 | |||
99 | semanage_seuser_free(seuser); | 98 | semanage_seuser_free(seuser); |
100 | return rc; | 99 | return rc; |
101 | diff --git a/tests/Makefile b/tests/Makefile | 100 | diff --git a/tests/Makefile b/tests/Makefile |
102 | index 2ef8d30..50d582a 100644 | 101 | index 324766a..5732ec7 100644 |
103 | --- a/tests/Makefile | 102 | --- a/tests/Makefile |
104 | +++ b/tests/Makefile | 103 | +++ b/tests/Makefile |
105 | @@ -6,10 +6,18 @@ SOURCES = $(sort $(wildcard *.c)) | 104 | @@ -3,10 +3,18 @@ SOURCES = $(sort $(wildcard *.c)) |
106 | 105 | ||
107 | ########################################################################### | 106 | ########################################################################### |
108 | 107 | ||
@@ -122,3 +121,6 @@ index 2ef8d30..50d582a 100644 | |||
122 | 121 | ||
123 | OBJECTS = $(SOURCES:.c=.o) | 122 | OBJECTS = $(SOURCES:.c=.o) |
124 | 123 | ||
124 | -- | ||
125 | 2.7.4 | ||
126 | |||
diff --git a/recipes-security/selinux/libsemanage/libsemanage-define-FD_CLOEXEC-as-necessary.patch b/recipes-security/selinux/libsemanage/libsemanage-define-FD_CLOEXEC-as-necessary.patch index 8b15a80..0c77c7a 100644 --- a/recipes-security/selinux/libsemanage/libsemanage-define-FD_CLOEXEC-as-necessary.patch +++ b/recipes-security/selinux/libsemanage/libsemanage-define-FD_CLOEXEC-as-necessary.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0e97e4d19627f78bf04445cd51902ccf4f7cf239 Mon Sep 17 00:00:00 2001 | 1 | From 81f2e8b62ad2298a197c4b16e7182a133c1e116f Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe.macdonald@windriver.com> | 2 | From: Joe MacDonald <joe.macdonald@windriver.com> |
3 | Date: Tue, 15 Oct 2013 10:17:38 -0400 | 3 | Date: Tue, 15 Oct 2013 10:17:38 -0400 |
4 | Subject: [PATCH] libsemanage: define FD_CLOEXEC as necessary | 4 | Subject: [PATCH] libsemanage: define FD_CLOEXEC as necessary |
@@ -10,15 +10,14 @@ asm-generic/fcntl.h on more modern platforms. | |||
10 | Uptream-Status: Inappropriate | 10 | Uptream-Status: Inappropriate |
11 | 11 | ||
12 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | 12 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> |
13 | |||
14 | --- | 13 | --- |
15 | libsemanage/src/semanage_store.c | 5 +++++ | 14 | src/semanage_store.c | 5 +++++ |
16 | 1 file changed, 5 insertions(+) | 15 | 1 file changed, 5 insertions(+) |
17 | 16 | ||
18 | diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c | 17 | diff --git a/src/semanage_store.c b/src/semanage_store.c |
19 | index 1923f0f..f7a8760 100644 | 18 | index 1a94545..b586a8f 100644 |
20 | --- a/libsemanage/src/semanage_store.c | 19 | --- a/src/semanage_store.c |
21 | +++ b/libsemanage/src/semanage_store.c | 20 | +++ b/src/semanage_store.c |
22 | @@ -66,6 +66,11 @@ typedef struct dbase_policydb dbase_t; | 21 | @@ -66,6 +66,11 @@ typedef struct dbase_policydb dbase_t; |
23 | 22 | ||
24 | #define TRUE 1 | 23 | #define TRUE 1 |
@@ -31,3 +30,6 @@ index 1923f0f..f7a8760 100644 | |||
31 | enum semanage_file_defs { | 30 | enum semanage_file_defs { |
32 | SEMANAGE_ROOT, | 31 | SEMANAGE_ROOT, |
33 | SEMANAGE_TRANS_LOCK, | 32 | SEMANAGE_TRANS_LOCK, |
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/recipes-security/selinux/libsemanage/libsemanage-disable-expand-check-on-policy-load.patch b/recipes-security/selinux/libsemanage/libsemanage-disable-expand-check-on-policy-load.patch index ea7ba20..d1e5720 100644 --- a/recipes-security/selinux/libsemanage/libsemanage-disable-expand-check-on-policy-load.patch +++ b/recipes-security/selinux/libsemanage/libsemanage-disable-expand-check-on-policy-load.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4376342a5382df384cb387e2a63eaf0bddb51d26 Mon Sep 17 00:00:00 2001 | 1 | From 35196d58cd37fec89fcf95e3d43b41de7008f0be Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe@deserted.net> | 2 | From: Joe MacDonald <joe@deserted.net> |
3 | Date: Wed, 7 May 2014 11:36:27 -0400 | 3 | Date: Wed, 7 May 2014 11:36:27 -0400 |
4 | Subject: [PATCH] libsemanage: disable expand-check on policy load | 4 | Subject: [PATCH] libsemanage: disable expand-check on policy load |
@@ -12,7 +12,6 @@ Upstream-Status: Denied [upstream developers want to preserve the default | |||
12 | checking: http://marc.info/?l=selinux&m=121794804217721&w=2] | 12 | checking: http://marc.info/?l=selinux&m=121794804217721&w=2] |
13 | 13 | ||
14 | Signed-off-by: Joe MacDonald <joe@deserted.net> | 14 | Signed-off-by: Joe MacDonald <joe@deserted.net> |
15 | |||
16 | --- | 15 | --- |
17 | src/semanage.conf | 4 ++++ | 16 | src/semanage.conf | 4 ++++ |
18 | 1 file changed, 4 insertions(+) | 17 | 1 file changed, 4 insertions(+) |
@@ -29,3 +28,6 @@ index dc8d46b..254f156 100644 | |||
29 | +# Don't check the entire policy hierarchy when inserting / expanding a policy | 28 | +# Don't check the entire policy hierarchy when inserting / expanding a policy |
30 | +# module. This results in a significant speed-up in policy loading. | 29 | +# module. This results in a significant speed-up in policy loading. |
31 | +expand-check=0 | 30 | +expand-check=0 |
31 | -- | ||
32 | 2.7.4 | ||
33 | |||
diff --git a/recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch b/recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch index cf88150..de71e27 100644 --- a/recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch +++ b/recipes-security/selinux/libsemanage/libsemanage-drop-Wno-unused-but-set-variable.patch | |||
@@ -1,21 +1,20 @@ | |||
1 | From 3f65789f172003c499f24f00d73a42867fccd277 Mon Sep 17 00:00:00 2001 | 1 | From 90a2459d1683e53f4a896b977e6b396db562c903 Mon Sep 17 00:00:00 2001 |
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> |
3 | Date: Tue, 30 Apr 2013 23:15:57 -0400 | 3 | Date: Tue, 30 Apr 2013 23:15:57 -0400 |
4 | Subject: [PATCH] libselinux: drop flag: -Wno-unused-but-set-variable | 4 | Subject: [PATCH] libselinux: drop flag: -Wno-unused-but-set-variable |
5 | 5 | ||
6 | Upstream status: inappropriate (older compilers only). | 6 | Upstream-Status: Inappropriate (older compilers only). |
7 | 7 | ||
8 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | 8 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> |
9 | |||
10 | --- | 9 | --- |
11 | src/Makefile | 2 +- | 10 | src/Makefile | 2 +- |
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
13 | 12 | ||
14 | diff --git a/src/Makefile b/src/Makefile | 13 | diff --git a/src/Makefile b/src/Makefile |
15 | index fdb178f..d457208 100644 | 14 | index e029f09..8240c3a 100644 |
16 | --- a/src/Makefile | 15 | --- a/src/Makefile |
17 | +++ b/src/Makefile | 16 | +++ b/src/Makefile |
18 | @@ -58,7 +58,7 @@ OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o | 17 | @@ -55,7 +55,7 @@ OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o |
19 | LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo | 18 | LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo |
20 | CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute | 19 | CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute |
21 | 20 | ||
@@ -24,3 +23,6 @@ index fdb178f..d457208 100644 | |||
24 | -Wno-unused-parameter | 23 | -Wno-unused-parameter |
25 | 24 | ||
26 | override CFLAGS += -I../include -D_GNU_SOURCE | 25 | override CFLAGS += -I../include -D_GNU_SOURCE |
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch b/recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch deleted file mode 100644 index 43c5382..0000000 --- a/recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 1f8164e044f2f727b08c28a69bea19cbf49b071b Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Fri, 8 Feb 2013 15:16:07 +0800 | ||
4 | Subject: [PATCH] libsemange: fix incorrect path for nologin | ||
5 | |||
6 | shadow package of oe-core and Debian has installed nologin into | ||
7 | /usr/sbin, so fix this path. | ||
8 | |||
9 | Upstream-Status: Inappropriate [configuration] | ||
10 | |||
11 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | |||
14 | --- | ||
15 | src/genhomedircon.c | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/src/genhomedircon.c b/src/genhomedircon.c | ||
19 | index b9a74b7..d574ee2 100644 | ||
20 | --- a/src/genhomedircon.c | ||
21 | +++ b/src/genhomedircon.c | ||
22 | @@ -60,7 +60,7 @@ | ||
23 | |||
24 | /* other paths */ | ||
25 | #define PATH_SHELLS_FILE "/etc/shells" | ||
26 | -#define PATH_NOLOGIN_SHELL "/sbin/nologin" | ||
27 | +#define PATH_NOLOGIN_SHELL "/usr/sbin/nologin" | ||
28 | |||
29 | /* comments written to context file */ | ||
30 | #define COMMENT_FILE_CONTEXT_HEADER "#\n#\n# " \ | ||
31 | @@ -395,7 +395,7 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s) | ||
32 | |||
33 | /* NOTE: old genhomedircon printed a warning on match */ | ||
34 | if (hand.matched) { | ||
35 | - WARN(s->h_semanage, "%s homedir %s or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than %u or greater than %u or its login shell is /sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid, maxuid); | ||
36 | + WARN(s->h_semanage, "%s homedir %s or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than %u or greater than %u or its login shell is /usr/sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid, maxuid); | ||
37 | } else { | ||
38 | if (semanage_list_push(&homedir_list, path)) | ||
39 | goto fail; | ||
diff --git a/recipes-security/selinux/libsemanage_2.8.bb b/recipes-security/selinux/libsemanage_2.8.bb deleted file mode 100644 index 38942e3..0000000 --- a/recipes-security/selinux/libsemanage_2.8.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | include selinux_20180524.inc | ||
2 | include ${BPN}.inc | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
5 | |||
6 | SRC_URI[md5sum] = "62ed7bb2ede677a735f2750751677a4f" | ||
7 | SRC_URI[sha256sum] = "1c0de8d2c51e5460926c21e371105c84a39087dfd8f8e9f0cc1d017e4cbea8e2" | ||
8 | |||
9 | SRC_URI += "\ | ||
10 | file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ | ||
11 | file://libsemanage-fix-path-nologin.patch \ | ||
12 | file://libsemanage-drop-Wno-unused-but-set-variable.patch \ | ||
13 | file://libsemanage-define-FD_CLOEXEC-as-necessary.patch;striplevel=2 \ | ||
14 | file://libsemanage-allow-to-disable-audit-support.patch \ | ||
15 | file://libsemanage-disable-expand-check-on-policy-load.patch \ | ||
16 | file://0001-src-Makefile-fix-includedir-in-libselinux.pc.patch \ | ||
17 | " | ||
18 | FILES_${PN} += "/usr/libexec" | ||
diff --git a/recipes-security/selinux/libsemanage_2.9.bb b/recipes-security/selinux/libsemanage_2.9.bb new file mode 100644 index 0000000..83320a1 --- /dev/null +++ b/recipes-security/selinux/libsemanage_2.9.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | require selinux_20190315.inc | ||
2 | require ${BPN}.inc | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
5 | |||
6 | SRC_URI[md5sum] = "25f086ff66175a0ca0e7b34dbe8586b7" | ||
7 | SRC_URI[sha256sum] = "2576349d344492e73b468059767268dec1dabd8c35f3c7222c3ec2448737bc1c" | ||
8 | |||
9 | SRC_URI += "\ | ||
10 | file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ | ||
11 | file://libsemanage-drop-Wno-unused-but-set-variable.patch \ | ||
12 | file://libsemanage-define-FD_CLOEXEC-as-necessary.patch \ | ||
13 | file://libsemanage-allow-to-disable-audit-support.patch \ | ||
14 | file://libsemanage-disable-expand-check-on-policy-load.patch \ | ||
15 | " | ||