mirror of
https://github.com/SELinuxProject/setools
synced 2025-04-11 03:51:26 +00:00
Add patch to libsepol to fix semantic level issue.
This commit is contained in:
parent
fd8aff429d
commit
f37809937c
@ -41,6 +41,7 @@ before_install:
|
|||||||
# Download current SELinux userspace tools and libraries
|
# Download current SELinux userspace tools and libraries
|
||||||
- curl -sS -L https://github.com/SELinuxProject/selinux/archive/20150202.tar.gz | tar xz
|
- curl -sS -L https://github.com/SELinuxProject/selinux/archive/20150202.tar.gz | tar xz
|
||||||
- mv selinux-20150202 selinux-src
|
- mv selinux-20150202 selinux-src
|
||||||
|
- patch -p1 -d selinux-src < patches/sepol-2.4-mls-semantic-level-expand.patch
|
||||||
|
|
||||||
# Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
|
# Ubuntu 12.04 coreutils is too old to provide "ln --relative" :(
|
||||||
- sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libsepol/src/Makefile
|
- sed 's/ln -sf --relative /ln -sf /' -i selinux-src/libsepol/src/Makefile
|
||||||
|
1
patches/README
Normal file
1
patches/README
Normal file
@ -0,0 +1 @@
|
|||||||
|
If there is a bug in one of SETools' dependencies, patches can be put here.
|
20
patches/libsepol-2.4-mls-semantic-level-expand.patch
Normal file
20
patches/libsepol-2.4-mls-semantic-level-expand.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/libsepol/src/expand.c b/libsepol/src/expand.c
|
||||||
|
index 467f7a7..3193ef5 100644
|
||||||
|
--- a/libsepol/src/expand.c
|
||||||
|
+++ b/libsepol/src/expand.c
|
||||||
|
@@ -914,10 +914,11 @@ int mls_semantic_level_expand(mls_semantic_level_t * sl, mls_level_t * l,
|
||||||
|
}
|
||||||
|
for (i = cat->low - 1; i < cat->high; i++) {
|
||||||
|
if (!ebitmap_get_bit(&levdatum->level->cat, i)) {
|
||||||
|
- ERR(h, "Category %s can not be associate with "
|
||||||
|
+ ERR(h, "Category %s can not be associated with "
|
||||||
|
"level %s",
|
||||||
|
p->p_cat_val_to_name[i],
|
||||||
|
p->p_sens_val_to_name[l->sens - 1]);
|
||||||
|
+ return -1;
|
||||||
|
}
|
||||||
|
if (ebitmap_set_bit(&l->cat, i, 1)) {
|
||||||
|
ERR(h, "Out of memory!");
|
||||||
|
--
|
||||||
|
2.3.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user