Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
237
.gitignore
vendored
237
.gitignore
vendored
@ -1 +1,236 @@
|
||||
SOURCES/libselinux-2.9.tar.gz
|
||||
libselinux-1.17.9.tgz
|
||||
libselinux-1.17.10.tgz
|
||||
libselinux-1.17.11.tgz
|
||||
libselinux-1.17.12.tgz
|
||||
libselinux-1.17.13.tgz
|
||||
libselinux-1.17.14.tgz
|
||||
libselinux-1.17.15.tgz
|
||||
libselinux-1.17.16.tgz
|
||||
libselinux-1.18.1.tgz
|
||||
libselinux-1.19.1.tgz
|
||||
libselinux-1.19.2.tgz
|
||||
libselinux-1.19.3.tgz
|
||||
libselinux-1.19.4.tgz
|
||||
libselinux-1.20.1.tgz
|
||||
libselinux-1.21.1.tgz
|
||||
libselinux-1.21.2.tgz
|
||||
libselinux-1.21.4.tgz
|
||||
libselinux-1.21.5.tgz
|
||||
libselinux-1.21.7.tgz
|
||||
exclude
|
||||
nsadiff
|
||||
nsalibselinux
|
||||
libselinux-1.21.8.tgz
|
||||
libselinux-1.21.9.tgz
|
||||
libselinux-1.21.10.tgz
|
||||
libselinux-1.21.11.tgz
|
||||
libselinux-1.21.12.tgz
|
||||
libselinux-1.21.13.tgz
|
||||
libselinux-1.22.tgz
|
||||
libselinux-1.23.1.tgz
|
||||
libselinux-1.23.2.tgz
|
||||
libselinux-1.23.3.tgz
|
||||
libselinux-1.23.4.tgz
|
||||
libselinux-1.23.5.tgz
|
||||
libselinux-1.23.6.tgz
|
||||
libselinux-1.23.7.tgz
|
||||
libselinux-1.23.8.tgz
|
||||
libselinux-1.23.10.tgz
|
||||
libselinux-1.23.11.tgz
|
||||
libselinux-1.24.1.tgz
|
||||
libselinux-1.24.2.tgz
|
||||
libselinux-1.25.2.tgz
|
||||
libselinux-1.25.3.tgz
|
||||
libselinux-1.25.4.tgz
|
||||
libselinux-1.25.5.tgz
|
||||
libselinux-1.25.6.tgz
|
||||
libselinux-1.25.7.tgz
|
||||
libselinux-1.26.tgz
|
||||
libselinux-1.27.1.tgz
|
||||
libselinux-1.27.2.tgz
|
||||
libselinux-1.27.3.tgz
|
||||
libselinux-1.27.4.tgz
|
||||
libselinux-1.27.6.tgz
|
||||
libselinux-1.27.7.tgz
|
||||
libselinux-1.27.9.tgz
|
||||
libselinux-1.27.10.tgz
|
||||
libselinux-1.27.12.tgz
|
||||
libselinux-1.27.13.tgz
|
||||
libselinux-1.27.14.tgz
|
||||
libselinux-1.27.17.tgz
|
||||
libselinux-1.27.18.tgz
|
||||
libselinux-1.27.19.tgz
|
||||
libselinux-1.27.20.tgz
|
||||
libselinux-1.27.21.tgz
|
||||
libselinux-1.27.22.tgz
|
||||
libselinux-1.27.23.tgz
|
||||
libselinux-1.27.25.tgz
|
||||
libselinux-1.27.26.tgz
|
||||
libselinux-1.27.28.tgz
|
||||
libselinux-1.28.tgz
|
||||
libselinux-1.29.1.tgz
|
||||
libselinux-1.29.2.tgz
|
||||
libselinux-1.29.3.tgz
|
||||
libselinux-1.29.4.tgz
|
||||
libselinux-1.29.5.tgz
|
||||
libselinux-1.29.6.tgz
|
||||
libselinux-1.29.7.tgz
|
||||
libselinux-1.29.8.tgz
|
||||
libselinux-1.30.tgz
|
||||
libselinux-1.30.1.tgz
|
||||
libselinux-1.30.3.tgz
|
||||
libselinux-1.30.5.tgz
|
||||
libselinux-1.30.6.tgz
|
||||
libselinux-1.30.7.tgz
|
||||
libselinux-1.30.8.tgz
|
||||
libselinux-1.30.10.tgz
|
||||
libselinux-1.30.11.tgz
|
||||
libselinux-1.30.12.tgz
|
||||
libselinux-1.30.15.tgz
|
||||
libselinux-1.30.19.tgz
|
||||
libselinux-1.30.20.tgz
|
||||
libselinux-1.30.22.tgz
|
||||
libselinux-1.30.24.tgz
|
||||
libselinux-1.30.26.tgz
|
||||
libselinux-1.30.27.tgz
|
||||
libselinux-1.30.28.tgz
|
||||
libselinux-1.30.29.tgz
|
||||
libselinux-1.30.30.tgz
|
||||
libselinux-1.32.tgz
|
||||
libselinux-1.33.1.tgz
|
||||
libselinux-1.33.2.tgz
|
||||
libselinux-1.33.3.tgz
|
||||
libselinux-1.33.4.tgz
|
||||
libselinux-1.33.5.tgz
|
||||
libselinux-1.33.6.tgz
|
||||
libselinux-1.34.0.tgz
|
||||
libselinux-1.34.1.tgz
|
||||
libselinux-2.0.0.tgz
|
||||
libselinux-2.0.1.tgz
|
||||
libselinux-2.0.2.tgz
|
||||
libselinux-2.0.3.tgz
|
||||
libselinux-2.0.4.tgz
|
||||
libselinux-2.0.5.tgz
|
||||
libselinux-2.0.7.tgz
|
||||
libselinux-2.0.8.tgz
|
||||
libselinux-2.0.9.tgz
|
||||
libselinux-2.0.11.tgz
|
||||
libselinux-2.0.12.tgz
|
||||
libselinux-2.0.13.tgz
|
||||
libselinux-2.0.14.tgz
|
||||
libselinux-2.0.16.tgz
|
||||
libselinux-2.0.18.tgz
|
||||
libselinux-2.0.21.tgz
|
||||
libselinux-2.0.22.tgz
|
||||
libselinux-2.0.23.tgz
|
||||
libselinux-2.0.24.tgz
|
||||
libselinux-2.0.29.tgz
|
||||
libselinux-2.0.30.tgz
|
||||
libselinux-2.0.31.tgz
|
||||
libselinux-2.0.33.tgz
|
||||
libselinux-2.0.34.tgz
|
||||
libselinux-2.0.35.tgz
|
||||
libselinux-2.0.36.tgz
|
||||
libselinux-2.0.37.tgz
|
||||
libselinux-2.0.40.tgz
|
||||
libselinux-2.0.42.tgz
|
||||
libselinux-2.0.43.tgz
|
||||
libselinux-2.0.45.tgz
|
||||
libselinux-2.0.46.tgz
|
||||
libselinux-2.0.47.tgz
|
||||
libselinux-2.0.48.tgz
|
||||
libselinux-2.0.49.tgz
|
||||
libselinux-2.0.50.tgz
|
||||
libselinux-2.0.52.tgz
|
||||
libselinux-2.0.53.tgz
|
||||
libselinux-2.0.55.tgz
|
||||
libselinux-2.0.56.tgz
|
||||
libselinux-2.0.57.tgz
|
||||
libselinux-2.0.58.tgz
|
||||
libselinux-2.0.59.tgz
|
||||
libselinux-2.0.60.tgz
|
||||
libselinux-2.0.61.tgz
|
||||
libselinux-2.0.64.tgz
|
||||
libselinux-2.0.65.tgz
|
||||
libselinux-2.0.67.tgz
|
||||
libselinux-2.0.69.tgz
|
||||
libselinux-2.0.70.tgz
|
||||
libselinux-2.0.71.tgz
|
||||
libselinux-2.0.73.tgz
|
||||
libselinux-2.0.74.tgz
|
||||
libselinux-2.0.75.tgz
|
||||
libselinux-2.0.76.tgz
|
||||
libselinux-2.0.77.tgz
|
||||
libselinux-2.0.78.tgz
|
||||
libselinux-2.0.79.tgz
|
||||
libselinux-2.0.80.tgz
|
||||
libselinux-2.0.81.tgz
|
||||
libselinux-2.0.82.tgz
|
||||
libselinux-2.0.83.tgz
|
||||
libselinux-2.0.84.tgz
|
||||
libselinux-2.0.85.tgz
|
||||
libselinux-2.0.86.tgz
|
||||
libselinux-2.0.87.tgz
|
||||
libselinux-2.0.88.tgz
|
||||
libselinux-2.0.89.tgz
|
||||
libselinux-2.0.90.tgz
|
||||
libselinux-2.0.91.tgz
|
||||
libselinux-2.0.92.tgz
|
||||
libselinux-2.0.93.tgz
|
||||
libselinux-2.0.94.tgz
|
||||
libselinux-2.0.96.tgz
|
||||
/libselinux-2.0.97.tgz
|
||||
/libselinux-2.0.98.tgz
|
||||
/libselinux-2.0.99.tgz
|
||||
/libselinux-2.0.101.tgz
|
||||
/libselinux-2.0.102.tgz
|
||||
/libselinux-2.1.0.tgz
|
||||
/libselinux-2.1.4.tgz
|
||||
/libselinux-2.1.5.tgz
|
||||
/libselinux-2.1.6.tgz
|
||||
/libselinux-2.1.7.tgz
|
||||
/libselinux-2.1.8.tgz
|
||||
/libselinux-2.1.9.tgz
|
||||
/libselinux-2.1.10.tgz
|
||||
/libselinux-2.1.11.tgz
|
||||
/libselinux-2.1.12.tgz
|
||||
/libselinux-2.1.13.tgz
|
||||
/libselinux-2.2.tgz
|
||||
/libselinux-2.2.1.tgz
|
||||
/libselinux-2.2.2.tgz
|
||||
/libselinux-2.3.tgz
|
||||
/libselinux-2.3.tar.gz
|
||||
/libselinux-2.4.tar.gz
|
||||
/libselinux-2.5-rc1.tar.gz
|
||||
/libselinux-2.5.tar.gz
|
||||
/libselinux-2.6.tar.gz
|
||||
/libselinux-2.7.tar.gz
|
||||
/libselinux-2.8-rc1.tar.gz
|
||||
/libselinux-2.8-rc2.tar.gz
|
||||
/libselinux-2.8-rc3.tar.gz
|
||||
/libselinux-2.8.tar.gz
|
||||
/libselinux-2.9-rc1.tar.gz
|
||||
/libselinux-2.9-rc2.tar.gz
|
||||
/libselinux-2.9.tar.gz
|
||||
/libselinux-3.0-rc1.tar.gz
|
||||
/libselinux-3.0.tar.gz
|
||||
/libselinux-3.1.tar.gz
|
||||
/libselinux-3.2-rc1.tar.gz
|
||||
/libselinux-3.2-rc2.tar.gz
|
||||
/libselinux-3.2.tar.gz
|
||||
/libselinux-3.3-rc2.tar.gz
|
||||
/libselinux-3.3-rc3.tar.gz
|
||||
/libselinux-3.3.tar.gz
|
||||
/libselinux-3.4-rc1.tar.gz
|
||||
/libselinux-3.4-rc2.tar.gz
|
||||
/libselinux-3.4-rc3.tar.gz
|
||||
/libselinux-3.4.tar.gz
|
||||
/libselinux-3.5-rc1.tar.gz
|
||||
/libselinux-3.5-rc2.tar.gz
|
||||
/libselinux-3.5-rc3.tar.gz
|
||||
/libselinux-3.5.tar.gz
|
||||
/libselinux-3.6-rc1.tar.gz
|
||||
/libselinux-3.6-rc2.tar.gz
|
||||
/libselinux-3.6.tar.gz
|
||||
/libselinux-3.7.tar.gz
|
||||
/libselinux-3.7.tar.gz.asc
|
||||
|
@ -1 +0,0 @@
|
||||
c53911ee9da673f7653ab1afe66c0b2bf5fb5ac9 SOURCES/libselinux-2.9.tar.gz
|
1362
0001-Use-SHA-2-instead-of-SHA-1.patch
Normal file
1362
0001-Use-SHA-2-instead-of-SHA-1.patch
Normal file
File diff suppressed because it is too large
Load Diff
78
0002-libselinux-set-free-d-data-to-NULL.patch
Normal file
78
0002-libselinux-set-free-d-data-to-NULL.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From bd6a803553a82238a9f618d1bb22f288682f8195 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <lautrbach@redhat.com>
|
||||
Date: Tue, 9 Jul 2024 21:13:36 +0200
|
||||
Subject: [PATCH] libselinux: set free'd data to NULL
|
||||
Content-type: text/plain
|
||||
|
||||
Fixes segfault in selabel_open() on systems with SELinux disabled and without any
|
||||
SELinux policy installed introduced by commit 5876aca0484f ("libselinux: free
|
||||
data on selabel open failure"):
|
||||
|
||||
$ sestatus
|
||||
SELinux status: disabled
|
||||
|
||||
$ cat /etc/selinux/config
|
||||
cat: /etc/selinux/config: No such file or directory
|
||||
|
||||
$ matchpathcon /abc
|
||||
[1] 907999 segmentation fault (core dumped) matchpathcon /abc
|
||||
|
||||
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
|
||||
---
|
||||
libselinux/src/label_backends_android.c | 1 +
|
||||
libselinux/src/label_file.c | 1 +
|
||||
libselinux/src/label_media.c | 1 +
|
||||
libselinux/src/label_x.c | 1 +
|
||||
4 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/libselinux/src/label_backends_android.c b/libselinux/src/label_backends_android.c
|
||||
index 49a87686de4c..5bad24f20d73 100644
|
||||
--- a/libselinux/src/label_backends_android.c
|
||||
+++ b/libselinux/src/label_backends_android.c
|
||||
@@ -260,6 +260,7 @@ static void closef(struct selabel_handle *rec)
|
||||
free(data->spec_arr);
|
||||
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
static struct selabel_lookup_rec *property_lookup(struct selabel_handle *rec,
|
||||
diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
|
||||
index 6c6fe328b353..87dbd0e90f2b 100644
|
||||
--- a/libselinux/src/label_file.c
|
||||
+++ b/libselinux/src/label_file.c
|
||||
@@ -942,6 +942,7 @@ static void closef(struct selabel_handle *rec)
|
||||
free(last_area);
|
||||
}
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
// Finds all the matches of |key| in the given context. Returns the result in
|
||||
diff --git a/libselinux/src/label_media.c b/libselinux/src/label_media.c
|
||||
index 852aeada8ff4..bae065c12a55 100644
|
||||
--- a/libselinux/src/label_media.c
|
||||
+++ b/libselinux/src/label_media.c
|
||||
@@ -183,6 +183,7 @@ static void close(struct selabel_handle *rec)
|
||||
free(spec_arr);
|
||||
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
static struct selabel_lookup_rec *lookup(struct selabel_handle *rec,
|
||||
diff --git a/libselinux/src/label_x.c b/libselinux/src/label_x.c
|
||||
index a8decc7a0093..ddae4f6c22b6 100644
|
||||
--- a/libselinux/src/label_x.c
|
||||
+++ b/libselinux/src/label_x.c
|
||||
@@ -210,6 +210,7 @@ static void close(struct selabel_handle *rec)
|
||||
free(spec_arr);
|
||||
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
static struct selabel_lookup_rec *lookup(struct selabel_handle *rec,
|
||||
--
|
||||
2.45.2
|
||||
|
48
0003-libselinux-restorecon-Include-selinux-label.h.patch
Normal file
48
0003-libselinux-restorecon-Include-selinux-label.h.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From b0d8e4c5d6f1652cb103305f773ad5fae8a91304 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Fri, 26 Jul 2024 17:59:15 +0200
|
||||
Subject: [PATCH] libselinux/restorecon: Include <selinux/label.h>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
restorecon.h uses types defined in label.h, so it needs to include
|
||||
label.h (or code using restorecon.h also needs to include label.h,
|
||||
which is not practical).
|
||||
|
||||
Fixes:
|
||||
$ make DESTDIR=~/obj install > make.out
|
||||
In file included from semanage_store.c:39:
|
||||
/home/sdsmall/obj/usr/include/selinux/restorecon.h:137:52: error:
|
||||
‘struct selabel_handle’ declared inside parameter list will not be
|
||||
visible outside of this definition or declaration [-Werror]
|
||||
137 | extern void selinux_restorecon_set_sehandle(struct
|
||||
selabel_handle *hndl);
|
||||
| ^~~~~~~~~~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
make[2]: *** [Makefile:111: semanage_store.o] Error 1
|
||||
make[1]: *** [Makefile:15: install] Error 2
|
||||
make: *** [Makefile:40: install] Error 1
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
|
||||
---
|
||||
libselinux/include/selinux/restorecon.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libselinux/include/selinux/restorecon.h b/libselinux/include/selinux/restorecon.h
|
||||
index 8df47445..210f65fd 100644
|
||||
--- a/libselinux/include/selinux/restorecon.h
|
||||
+++ b/libselinux/include/selinux/restorecon.h
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _RESTORECON_H_
|
||||
#define _RESTORECON_H_
|
||||
|
||||
+#include <selinux/label.h>
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,62 @@
|
||||
From c89965eb2854db11b7b484b171beae092476ef0b Mon Sep 17 00:00:00 2001
|
||||
From: James Carter <jwcart2@gmail.com>
|
||||
Date: Mon, 1 Jul 2024 14:27:32 -0400
|
||||
Subject: [PATCH] libselinux: Fix integer comparison issues when compiling for
|
||||
32-bit
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Trying to compile libselinux for 32-bit produces the following error:
|
||||
|
||||
selinux_restorecon.c:1194:31: error: comparison of integer expressions of different signedness: ‘__fsword_t’ {aka ‘int’} and ‘unsigned int’ [-Werror=sign-compare]
|
||||
1194 | if (state.sfsb.f_type == RAMFS_MAGIC || state.sfsb.f_type == TMPFS_MAGIC ||
|
||||
| ^~
|
||||
|
||||
Since RAMFS_MAGIC = 0x858458f6 == 2240043254, which > 2^31, but < 2^32,
|
||||
cast both as uint32_t for the comparison.
|
||||
|
||||
Reported-by: Daniel Schepler
|
||||
Signed-off-by: James Carter <jwcart2@gmail.com>
|
||||
Reviewed-by: Christian Göttsche <cgzones@googlemail.com>
|
||||
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
|
||||
---
|
||||
libselinux/src/selinux_restorecon.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
|
||||
index 2422b415..93bd7779 100644
|
||||
--- a/libselinux/src/selinux_restorecon.c
|
||||
+++ b/libselinux/src/selinux_restorecon.c
|
||||
@@ -1191,8 +1191,8 @@ static int selinux_restorecon_common(const char *pathname_orig,
|
||||
}
|
||||
|
||||
/* Skip digest on in-memory filesystems and /sys */
|
||||
- if (state.sfsb.f_type == RAMFS_MAGIC || state.sfsb.f_type == TMPFS_MAGIC ||
|
||||
- state.sfsb.f_type == SYSFS_MAGIC)
|
||||
+ if ((uint32_t)state.sfsb.f_type == (uint32_t)RAMFS_MAGIC ||
|
||||
+ state.sfsb.f_type == TMPFS_MAGIC || state.sfsb.f_type == SYSFS_MAGIC)
|
||||
state.setrestorecondigest = false;
|
||||
|
||||
if (state.flags.set_xdev)
|
||||
@@ -1490,7 +1490,7 @@ int selinux_restorecon_xattr(const char *pathname, unsigned int xattr_flags,
|
||||
|
||||
if (!recurse) {
|
||||
if (statfs(pathname, &sfsb) == 0) {
|
||||
- if (sfsb.f_type == RAMFS_MAGIC ||
|
||||
+ if ((uint32_t)sfsb.f_type == (uint32_t)RAMFS_MAGIC ||
|
||||
sfsb.f_type == TMPFS_MAGIC)
|
||||
return 0;
|
||||
}
|
||||
@@ -1525,7 +1525,7 @@ int selinux_restorecon_xattr(const char *pathname, unsigned int xattr_flags,
|
||||
continue;
|
||||
case FTS_D:
|
||||
if (statfs(ftsent->fts_path, &sfsb) == 0) {
|
||||
- if (sfsb.f_type == RAMFS_MAGIC ||
|
||||
+ if ((uint32_t)sfsb.f_type == (uint32_t)RAMFS_MAGIC ||
|
||||
sfsb.f_type == TMPFS_MAGIC)
|
||||
continue;
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
95
0005-libselinux-deprecate-security_disable-3.patch
Normal file
95
0005-libselinux-deprecate-security_disable-3.patch
Normal file
@ -0,0 +1,95 @@
|
||||
From b4b002ffef9431cc3af8409a32e243cd7b057feb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
||||
Date: Sun, 23 Jun 2024 14:26:04 +0200
|
||||
Subject: [PATCH] libselinux: deprecate security_disable(3)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The runtime disable functionality has been removed in Linux 6.4. Thus
|
||||
security_disable(3) will no longer work on these kernels.
|
||||
|
||||
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
|
||||
Acked-by: James Carter <jwcart2@gmail.com>
|
||||
---
|
||||
libselinux/include/selinux/selinux.h | 6 +++++-
|
||||
libselinux/man/man3/security_disable.3 | 3 ++-
|
||||
libselinux/src/load_policy.c | 2 ++
|
||||
libselinux/src/selinux_internal.h | 18 ++++++++++++++++++
|
||||
4 files changed, 27 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
|
||||
index 61c1422b..1318a66a 100644
|
||||
--- a/libselinux/include/selinux/selinux.h
|
||||
+++ b/libselinux/include/selinux/selinux.h
|
||||
@@ -367,7 +367,11 @@ extern int security_deny_unknown(void);
|
||||
/* Get the checkreqprot value */
|
||||
extern int security_get_checkreqprot(void);
|
||||
|
||||
-/* Disable SELinux at runtime (must be done prior to initial policy load). */
|
||||
+/* Disable SELinux at runtime (must be done prior to initial policy load).
|
||||
+ Unsupported since Linux 6.4. */
|
||||
+#ifdef __GNUC__
|
||||
+__attribute__ ((deprecated))
|
||||
+#endif
|
||||
extern int security_disable(void);
|
||||
|
||||
/* Get the policy version number. */
|
||||
diff --git a/libselinux/man/man3/security_disable.3 b/libselinux/man/man3/security_disable.3
|
||||
index 072923ce..5ad8b778 100644
|
||||
--- a/libselinux/man/man3/security_disable.3
|
||||
+++ b/libselinux/man/man3/security_disable.3
|
||||
@@ -14,7 +14,8 @@ disables the SELinux kernel code, unregisters selinuxfs from
|
||||
and then unmounts
|
||||
.IR /sys/fs/selinux .
|
||||
.sp
|
||||
-This function can only be called at runtime and prior to the initial policy
|
||||
+This function is only supported on Linux 6.3 and earlier, and can only be
|
||||
+called at runtime and prior to the initial policy
|
||||
load. After the initial policy load, the SELinux kernel code cannot be disabled,
|
||||
but only placed in "permissive" mode by using
|
||||
.BR security_setenforce(3).
|
||||
diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c
|
||||
index 57d7aaef..dc1e4b6e 100644
|
||||
--- a/libselinux/src/load_policy.c
|
||||
+++ b/libselinux/src/load_policy.c
|
||||
@@ -326,7 +326,9 @@ int selinux_init_load_policy(int *enforce)
|
||||
|
||||
if (seconfig == -1) {
|
||||
/* Runtime disable of SELinux. */
|
||||
+ IGNORE_DEPRECATED_DECLARATION_BEGIN
|
||||
rc = security_disable();
|
||||
+ IGNORE_DEPRECATED_DECLARATION_END
|
||||
if (rc == 0) {
|
||||
/* Successfully disabled, so umount selinuxfs too. */
|
||||
umount(selinux_mnt);
|
||||
diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h
|
||||
index b134808e..450a42c2 100644
|
||||
--- a/libselinux/src/selinux_internal.h
|
||||
+++ b/libselinux/src/selinux_internal.h
|
||||
@@ -113,4 +113,22 @@ void *reallocarray(void *ptr, size_t nmemb, size_t size);
|
||||
#define ignore_unsigned_overflow_
|
||||
#endif
|
||||
|
||||
+/* Ignore usage of deprecated declaration */
|
||||
+#ifdef __clang__
|
||||
+#define IGNORE_DEPRECATED_DECLARATION_BEGIN \
|
||||
+ _Pragma("clang diagnostic push") \
|
||||
+ _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
+#define IGNORE_DEPRECATED_DECLARATION_END \
|
||||
+ _Pragma("clang diagnostic pop")
|
||||
+#elif defined __GNUC__
|
||||
+#define IGNORE_DEPRECATED_DECLARATION_BEGIN \
|
||||
+ _Pragma("GCC diagnostic push") \
|
||||
+ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
+#define IGNORE_DEPRECATED_DECLARATION_END \
|
||||
+ _Pragma("GCC diagnostic pop")
|
||||
+#else
|
||||
+#define IGNORE_DEPRECATED_DECLARATION_BEGIN
|
||||
+#define IGNORE_DEPRECATED_DECLARATION_END
|
||||
+#endif
|
||||
+
|
||||
#endif /* SELINUX_INTERNAL_H_ */
|
||||
--
|
||||
2.46.0
|
||||
|
86
0006-libselinux-fix-swig-bindings-for-4.3.0.patch
Normal file
86
0006-libselinux-fix-swig-bindings-for-4.3.0.patch
Normal file
@ -0,0 +1,86 @@
|
||||
From 2ce1276a0476c7c44d3dad0423f1fde3a0f6d2ce Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <lautrbach@redhat.com>
|
||||
Date: Wed, 16 Oct 2024 19:57:10 +0200
|
||||
Subject: [PATCH] libselinux: fix swig bindings for 4.3.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-type: text/plain
|
||||
|
||||
https://github.com/swig/swig/blob/master/CHANGES.current
|
||||
|
||||
"[Python] #2907 Fix returning null from functions with output
|
||||
parameters. Ensures OUTPUT and INOUT typemaps are handled
|
||||
consistently wrt return type.
|
||||
|
||||
New declaration of SWIG_Python_AppendOutput is now:
|
||||
|
||||
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void);
|
||||
|
||||
The 3rd parameter is new and the new $isvoid special variable
|
||||
should be passed to it, indicating whether or not the wrapped
|
||||
function returns void.
|
||||
|
||||
Also consider replacing with:
|
||||
|
||||
SWIG_AppendOutput(PyObject* result, PyObject* obj);
|
||||
|
||||
which calls SWIG_Python_AppendOutput with same parameters but adding $isvoid
|
||||
for final parameter."
|
||||
|
||||
Fixes: https://github.com/SELinuxProject/selinux/issues/447
|
||||
|
||||
selinuxswig_python_wrap.c: In function ‘_wrap_security_compute_user’:
|
||||
selinuxswig_python_wrap.c:11499:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
|
||||
11499 | resultobj = SWIG_Python_AppendOutput(resultobj, plist);
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
selinuxswig_python_wrap.c:1248:1: note: declared here
|
||||
1248 | SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) {
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
selinuxswig_python_wrap.c: In function ‘_wrap_security_compute_user_raw’:
|
||||
selinuxswig_python_wrap.c:11570:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
|
||||
11570 | resultobj = SWIG_Python_AppendOutput(resultobj, plist);
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
selinuxswig_python_wrap.c:1248:1: note: declared here
|
||||
1248 | SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) {
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
selinuxswig_python_wrap.c: In function ‘_wrap_security_get_boolean_names’:
|
||||
selinuxswig_python_wrap.c:12470:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
|
||||
12470 | resultobj = SWIG_Python_AppendOutput(resultobj, list);
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
selinuxswig_python_wrap.c:1248:1: note: declared here
|
||||
1248 | SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) {
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
error: command '/usr/bin/gcc' failed with exit code 1
|
||||
|
||||
Suggested-by: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
|
||||
---
|
||||
libselinux/src/selinuxswig_python.i | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/selinuxswig_python.i b/libselinux/src/selinuxswig_python.i
|
||||
index 17e03b9e36a5..03ed296d5b85 100644
|
||||
--- a/libselinux/src/selinuxswig_python.i
|
||||
+++ b/libselinux/src/selinuxswig_python.i
|
||||
@@ -71,7 +71,7 @@ def install(src, dest):
|
||||
for (i = 0; i < *$2; i++) {
|
||||
PyList_SetItem(list, i, PyString_FromString((*$1)[i]));
|
||||
}
|
||||
- $result = SWIG_Python_AppendOutput($result, list);
|
||||
+ $result = SWIG_AppendOutput($result, list);
|
||||
}
|
||||
|
||||
/* return a sid along with the result */
|
||||
@@ -108,7 +108,7 @@ def install(src, dest):
|
||||
plist = PyList_New(0);
|
||||
}
|
||||
|
||||
- $result = SWIG_Python_AppendOutput($result, plist);
|
||||
+ $result = SWIG_AppendOutput($result, plist);
|
||||
}
|
||||
|
||||
/* Makes functions in get_context_list.h return a Python list of contexts */
|
||||
--
|
||||
2.47.0
|
||||
|
37
0007-libselinux-setexecfilecon-Remove-useless-rc-check.patch
Normal file
37
0007-libselinux-setexecfilecon-Remove-useless-rc-check.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From edce1de156f1daa71875e210c1d55ad8d3aefc90 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Fri, 25 Oct 2024 20:30:13 +0200
|
||||
Subject: [PATCH] libselinux/setexecfilecon: Remove useless rc check
|
||||
|
||||
Fixes:
|
||||
Error: IDENTICAL_BRANCHES (CWE-398):
|
||||
libselinux-3.6/src/setexecfilecon.c:45: implicit_else: The code from the above if-then branch is identical to the code after the if statement.
|
||||
libselinux-3.6/src/setexecfilecon.c:43: identical_branches: The same code is executed when the condition "rc < 0" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
|
||||
\# 41|
|
||||
\# 42| rc = setexeccon(newcon);
|
||||
\# 43|-> if (rc < 0)
|
||||
\# 44| goto out;
|
||||
\# 45| out:
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
Acked-by: James Carter <jwcart2@gmail.com>
|
||||
---
|
||||
libselinux/src/setexecfilecon.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/setexecfilecon.c b/libselinux/src/setexecfilecon.c
|
||||
index 2c6505a9..4b31e775 100644
|
||||
--- a/libselinux/src/setexecfilecon.c
|
||||
+++ b/libselinux/src/setexecfilecon.c
|
||||
@@ -40,8 +40,6 @@ int setexecfilecon(const char *filename, const char *fallback_type)
|
||||
}
|
||||
|
||||
rc = setexeccon(newcon);
|
||||
- if (rc < 0)
|
||||
- goto out;
|
||||
out:
|
||||
|
||||
if (rc < 0 && security_getenforce() == 0)
|
||||
--
|
||||
2.47.0
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 48bfb96d452a6893010977325940ca17619c207c Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Fri, 25 Oct 2024 20:30:14 +0200
|
||||
Subject: [PATCH] libselinux/matchpathcon: RESOURCE_LEAK: Variable "con"
|
||||
|
||||
Fixes:
|
||||
Error: RESOURCE_LEAK (CWE-772):
|
||||
libselinux-3.6/src/matchpathcon.c:519: alloc_arg: "lgetfilecon_raw" allocates memory that is stored into "con". [Note: The source code implementation of the function has been overridden by a user model.]
|
||||
libselinux-3.6/src/matchpathcon.c:528: leaked_storage: Variable "con" going out of scope leaks the storage it points to.
|
||||
\# 526|
|
||||
\# 527| if (!hnd && (matchpathcon_init_prefix(NULL, NULL) < 0))
|
||||
\# 528|-> return -1;
|
||||
\# 529|
|
||||
\# 530| if (selabel_lookup_raw(hnd, &fcontext, path, mode) != 0) {
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
Acked-by: James Carter <jwcart2@gmail.com>
|
||||
---
|
||||
libselinux/src/matchpathcon.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c
|
||||
index e44734c3..967520e4 100644
|
||||
--- a/libselinux/src/matchpathcon.c
|
||||
+++ b/libselinux/src/matchpathcon.c
|
||||
@@ -524,8 +524,10 @@ int selinux_file_context_verify(const char *path, mode_t mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (!hnd && (matchpathcon_init_prefix(NULL, NULL) < 0))
|
||||
+ if (!hnd && (matchpathcon_init_prefix(NULL, NULL) < 0)){
|
||||
+ freecon(con);
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
if (selabel_lookup_raw(hnd, &fcontext, path, mode) != 0) {
|
||||
if (errno != ENOENT)
|
||||
--
|
||||
2.47.0
|
||||
|
@ -1,31 +0,0 @@
|
||||
From f71fc47524bef3c4cd8a412e43d13daebd1c418b Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Grepl <mgrepl@redhat.com>
|
||||
Date: Wed, 16 Jul 2014 08:28:03 +0200
|
||||
Subject: [PATCH] Fix selinux man page to refer seinfo and sesearch tools.
|
||||
|
||||
---
|
||||
libselinux/man/man8/selinux.8 | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libselinux/man/man8/selinux.8 b/libselinux/man/man8/selinux.8
|
||||
index e37aee68..bf23b655 100644
|
||||
--- a/libselinux/man/man8/selinux.8
|
||||
+++ b/libselinux/man/man8/selinux.8
|
||||
@@ -91,11 +91,13 @@ This manual page was written by Dan Walsh <dwalsh@redhat.com>.
|
||||
.BR sepolicy (8),
|
||||
.BR system-config-selinux (8),
|
||||
.BR togglesebool (8),
|
||||
-.BR restorecon (8),
|
||||
.BR fixfiles (8),
|
||||
+.BR restorecon (8),
|
||||
.BR setfiles (8),
|
||||
.BR semanage (8),
|
||||
.BR sepolicy (8)
|
||||
+.BR seinfo (8),
|
||||
+.BR sesearch (8)
|
||||
|
||||
Every confined service on the system has a man page in the following format:
|
||||
.br
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,214 +0,0 @@
|
||||
From ad3d3a0bf819f5895a6884357c2d0e18ea1ef314 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Walsh <dwalsh@redhat.com>
|
||||
Date: Mon, 23 Dec 2013 09:50:54 -0500
|
||||
Subject: [PATCH] Verify context input to funtions to make sure the context
|
||||
field is not null.
|
||||
|
||||
Return errno EINVAL, to prevent segfault.
|
||||
|
||||
Rejected by upstream https://marc.info/?l=selinux&m=145036088424584&w=2
|
||||
|
||||
FIXME: use __attribute__(nonnull (arg-index, ...))
|
||||
---
|
||||
libselinux/src/avc_sidtab.c | 5 +++++
|
||||
libselinux/src/canonicalize_context.c | 5 +++++
|
||||
libselinux/src/check_context.c | 5 +++++
|
||||
libselinux/src/compute_av.c | 5 +++++
|
||||
libselinux/src/compute_create.c | 5 +++++
|
||||
libselinux/src/compute_member.c | 5 +++++
|
||||
libselinux/src/compute_relabel.c | 5 +++++
|
||||
libselinux/src/compute_user.c | 5 +++++
|
||||
libselinux/src/fsetfilecon.c | 8 ++++++--
|
||||
libselinux/src/lsetfilecon.c | 9 +++++++--
|
||||
libselinux/src/setfilecon.c | 8 ++++++--
|
||||
11 files changed, 59 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/avc_sidtab.c b/libselinux/src/avc_sidtab.c
|
||||
index 9669264d..c7754305 100644
|
||||
--- a/libselinux/src/avc_sidtab.c
|
||||
+++ b/libselinux/src/avc_sidtab.c
|
||||
@@ -81,6 +81,11 @@ sidtab_context_to_sid(struct sidtab *s,
|
||||
int hvalue, rc = 0;
|
||||
struct sidtab_node *cur;
|
||||
|
||||
+ if (! ctx) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
*sid = NULL;
|
||||
hvalue = sidtab_hash(ctx);
|
||||
|
||||
diff --git a/libselinux/src/canonicalize_context.c b/libselinux/src/canonicalize_context.c
|
||||
index ba4c9a2c..c8158725 100644
|
||||
--- a/libselinux/src/canonicalize_context.c
|
||||
+++ b/libselinux/src/canonicalize_context.c
|
||||
@@ -17,6 +17,11 @@ int security_canonicalize_context_raw(const char * con,
|
||||
size_t size;
|
||||
int fd, ret;
|
||||
|
||||
+ if (! con) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
if (!selinux_mnt) {
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
diff --git a/libselinux/src/check_context.c b/libselinux/src/check_context.c
|
||||
index 8a7997f0..5be84348 100644
|
||||
--- a/libselinux/src/check_context.c
|
||||
+++ b/libselinux/src/check_context.c
|
||||
@@ -14,6 +14,11 @@ int security_check_context_raw(const char * con)
|
||||
char path[PATH_MAX];
|
||||
int fd, ret;
|
||||
|
||||
+ if (! con) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
if (!selinux_mnt) {
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
diff --git a/libselinux/src/compute_av.c b/libselinux/src/compute_av.c
|
||||
index a47cffe9..6d285a2e 100644
|
||||
--- a/libselinux/src/compute_av.c
|
||||
+++ b/libselinux/src/compute_av.c
|
||||
@@ -27,6 +27,11 @@ int security_compute_av_flags_raw(const char * scon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if ((! scon) || (! tcon)) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
snprintf(path, sizeof path, "%s/access", selinux_mnt);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
diff --git a/libselinux/src/compute_create.c b/libselinux/src/compute_create.c
|
||||
index 0975aeac..3e6a48c1 100644
|
||||
--- a/libselinux/src/compute_create.c
|
||||
+++ b/libselinux/src/compute_create.c
|
||||
@@ -64,6 +64,11 @@ int security_compute_create_name_raw(const char * scon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if ((! scon) || (! tcon)) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
snprintf(path, sizeof path, "%s/create", selinux_mnt);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
diff --git a/libselinux/src/compute_member.c b/libselinux/src/compute_member.c
|
||||
index 4e2d221e..d1dd9772 100644
|
||||
--- a/libselinux/src/compute_member.c
|
||||
+++ b/libselinux/src/compute_member.c
|
||||
@@ -25,6 +25,11 @@ int security_compute_member_raw(const char * scon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if ((! scon) || (! tcon)) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
snprintf(path, sizeof path, "%s/member", selinux_mnt);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
diff --git a/libselinux/src/compute_relabel.c b/libselinux/src/compute_relabel.c
|
||||
index 49f77ef3..c3db7c0a 100644
|
||||
--- a/libselinux/src/compute_relabel.c
|
||||
+++ b/libselinux/src/compute_relabel.c
|
||||
@@ -25,6 +25,11 @@ int security_compute_relabel_raw(const char * scon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if ((! scon) || (! tcon)) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
snprintf(path, sizeof path, "%s/relabel", selinux_mnt);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
diff --git a/libselinux/src/compute_user.c b/libselinux/src/compute_user.c
|
||||
index 7b881215..401fd107 100644
|
||||
--- a/libselinux/src/compute_user.c
|
||||
+++ b/libselinux/src/compute_user.c
|
||||
@@ -24,6 +24,11 @@ int security_compute_user_raw(const char * scon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (! scon) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
snprintf(path, sizeof path, "%s/user", selinux_mnt);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0)
|
||||
diff --git a/libselinux/src/fsetfilecon.c b/libselinux/src/fsetfilecon.c
|
||||
index 52707d05..0cbe12d8 100644
|
||||
--- a/libselinux/src/fsetfilecon.c
|
||||
+++ b/libselinux/src/fsetfilecon.c
|
||||
@@ -9,8 +9,12 @@
|
||||
|
||||
int fsetfilecon_raw(int fd, const char * context)
|
||||
{
|
||||
- int rc = fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1,
|
||||
- 0);
|
||||
+ int rc;
|
||||
+ if (! context) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ rc = fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1, 0);
|
||||
if (rc < 0 && errno == ENOTSUP) {
|
||||
char * ccontext = NULL;
|
||||
int err = errno;
|
||||
diff --git a/libselinux/src/lsetfilecon.c b/libselinux/src/lsetfilecon.c
|
||||
index 1d3b28a1..ea6d70b7 100644
|
||||
--- a/libselinux/src/lsetfilecon.c
|
||||
+++ b/libselinux/src/lsetfilecon.c
|
||||
@@ -9,8 +9,13 @@
|
||||
|
||||
int lsetfilecon_raw(const char *path, const char * context)
|
||||
{
|
||||
- int rc = lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1,
|
||||
- 0);
|
||||
+ int rc;
|
||||
+ if (! context) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ rc = lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, 0);
|
||||
if (rc < 0 && errno == ENOTSUP) {
|
||||
char * ccontext = NULL;
|
||||
int err = errno;
|
||||
diff --git a/libselinux/src/setfilecon.c b/libselinux/src/setfilecon.c
|
||||
index d05969c6..3f0200e8 100644
|
||||
--- a/libselinux/src/setfilecon.c
|
||||
+++ b/libselinux/src/setfilecon.c
|
||||
@@ -9,8 +9,12 @@
|
||||
|
||||
int setfilecon_raw(const char *path, const char * context)
|
||||
{
|
||||
- int rc = setxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1,
|
||||
- 0);
|
||||
+ int rc;
|
||||
+ if (! context) {
|
||||
+ errno=EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ rc = setxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1, 0);
|
||||
if (rc < 0 && errno == ENOTSUP) {
|
||||
char * ccontext = NULL;
|
||||
int err = errno;
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,39 +0,0 @@
|
||||
From a6e839be2c5a77c22a8c72cad001e3f87eaedf2e Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <plautrba@redhat.com>
|
||||
Date: Mon, 11 Mar 2019 15:26:43 +0100
|
||||
Subject: [PATCH] libselinux: Allow to override OVERRIDE_GETTID from command
|
||||
line
|
||||
|
||||
$ make CFLAGS="$CFLAGS -DOVERRIDE_GETTID=0" ...
|
||||
|
||||
Drop this as soon as glibc-2.30 will become real 2.30 version, see
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1685594
|
||||
|
||||
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
|
||||
---
|
||||
libselinux/src/procattr.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libselinux/src/procattr.c b/libselinux/src/procattr.c
|
||||
index c6799ef2..cbb6824e 100644
|
||||
--- a/libselinux/src/procattr.c
|
||||
+++ b/libselinux/src/procattr.c
|
||||
@@ -24,6 +24,7 @@ static __thread char destructor_initialized;
|
||||
|
||||
/* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and
|
||||
* has a definition for it */
|
||||
+#ifndef OVERRIDE_GETTID
|
||||
#ifdef __BIONIC__
|
||||
#define OVERRIDE_GETTID 0
|
||||
#elif !defined(__GLIBC_PREREQ)
|
||||
@@ -33,6 +34,7 @@ static __thread char destructor_initialized;
|
||||
#else
|
||||
#define OVERRIDE_GETTID 0
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if OVERRIDE_GETTID
|
||||
static pid_t gettid(void)
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,55 +0,0 @@
|
||||
From be420729fbf4adc8b32ca3722fa6ca46bb51413d Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <plautrba@redhat.com>
|
||||
Date: Wed, 27 Feb 2019 09:37:17 +0100
|
||||
Subject: [PATCH] Bring some old permission and flask constants back to Python
|
||||
bindings
|
||||
|
||||
---
|
||||
libselinux/src/selinuxswig.i | 4 ++++
|
||||
libselinux/src/selinuxswig_python.i | 3 ++-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libselinux/src/selinuxswig.i b/libselinux/src/selinuxswig.i
|
||||
index dbdb4c3d..9c5b9263 100644
|
||||
--- a/libselinux/src/selinuxswig.i
|
||||
+++ b/libselinux/src/selinuxswig.i
|
||||
@@ -5,7 +5,9 @@
|
||||
%module selinux
|
||||
%{
|
||||
#include "../include/selinux/avc.h"
|
||||
+ #include "../include/selinux/av_permissions.h"
|
||||
#include "../include/selinux/context.h"
|
||||
+ #include "../include/selinux/flask.h"
|
||||
#include "../include/selinux/get_context_list.h"
|
||||
#include "../include/selinux/get_default_type.h"
|
||||
#include "../include/selinux/label.h"
|
||||
@@ -58,7 +60,9 @@
|
||||
%ignore avc_netlink_check_nb;
|
||||
|
||||
%include "../include/selinux/avc.h"
|
||||
+%include "../include/selinux/av_permissions.h"
|
||||
%include "../include/selinux/context.h"
|
||||
+%include "../include/selinux/flask.h"
|
||||
%include "../include/selinux/get_context_list.h"
|
||||
%include "../include/selinux/get_default_type.h"
|
||||
%include "../include/selinux/label.h"
|
||||
diff --git a/libselinux/src/selinuxswig_python.i b/libselinux/src/selinuxswig_python.i
|
||||
index 4c73bf92..6eaab081 100644
|
||||
--- a/libselinux/src/selinuxswig_python.i
|
||||
+++ b/libselinux/src/selinuxswig_python.i
|
||||
@@ -1,10 +1,11 @@
|
||||
/* Author: James Athey
|
||||
*/
|
||||
|
||||
-/* Never build rpm_execcon interface */
|
||||
+/* Never build rpm_execcon interface unless you need to have ACG compatibility
|
||||
#ifndef DISABLE_RPM
|
||||
#define DISABLE_RPM
|
||||
#endif
|
||||
+*/
|
||||
|
||||
%module selinux
|
||||
%{
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 903c54bf62ffba3c95e22e74c9c43838cd3935a0 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Tue, 28 Feb 2017 16:12:43 +0100
|
||||
Subject: [PATCH] libselinux: add missing av_permission values
|
||||
|
||||
Add missing av_permission values to av_permissions.h for the sake of
|
||||
completeness (this interface is obsolete - these values are now
|
||||
obtained at runtime).
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1025931
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
---
|
||||
libselinux/include/selinux/av_permissions.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libselinux/include/selinux/av_permissions.h b/libselinux/include/selinux/av_permissions.h
|
||||
index c1269af9..631f0276 100644
|
||||
--- a/libselinux/include/selinux/av_permissions.h
|
||||
+++ b/libselinux/include/selinux/av_permissions.h
|
||||
@@ -876,6 +876,8 @@
|
||||
#define NSCD__SHMEMHOST 0x00000080UL
|
||||
#define NSCD__GETSERV 0x00000100UL
|
||||
#define NSCD__SHMEMSERV 0x00000200UL
|
||||
+#define NSCD__GETNETGRP 0x00000400UL
|
||||
+#define NSCD__SHMEMNETGRP 0x00000800UL
|
||||
#define ASSOCIATION__SENDTO 0x00000001UL
|
||||
#define ASSOCIATION__RECVFROM 0x00000002UL
|
||||
#define ASSOCIATION__SETCONTEXT 0x00000004UL
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,177 +0,0 @@
|
||||
From 67d490a38a319126f371eaf66a5fc922d7005b1f Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <plautrba@redhat.com>
|
||||
Date: Thu, 16 May 2019 15:01:59 +0200
|
||||
Subject: [PATCH] libselinux: Use Python distutils to install SELinux python
|
||||
bindings
|
||||
|
||||
SWIG-4.0 changed its behavior so that it uses: from . import _selinux which
|
||||
looks for _selinux module in the same directory as where __init__.py is -
|
||||
$(PYLIBDIR)/site-packages/selinux. But _selinux module is installed into
|
||||
$(PYLIBDIR)/site-packages/ since a9604c30a5e2f ("libselinux: Change the location
|
||||
of _selinux.so").
|
||||
|
||||
In order to prevent such breakage in future use Python's distutils instead of
|
||||
building and installing python bindings manually in Makefile.
|
||||
|
||||
Fixes:
|
||||
>>> import selinux
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
File "/usr/lib64/python3.7/site-packages/selinux/__init__.py", line 13, in <module>
|
||||
from . import _selinux
|
||||
ImportError: cannot import name '_selinux' from 'selinux' (/usr/lib64/python3.7/site-packages/selinux/__init__.py)
|
||||
>>>
|
||||
|
||||
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
|
||||
---
|
||||
libselinux/src/.gitignore | 2 +-
|
||||
libselinux/src/Makefile | 37 ++++++++-----------------------------
|
||||
libselinux/src/setup.py | 24 ++++++++++++++++++++++++
|
||||
3 files changed, 33 insertions(+), 30 deletions(-)
|
||||
create mode 100644 libselinux/src/setup.py
|
||||
|
||||
diff --git a/libselinux/src/.gitignore b/libselinux/src/.gitignore
|
||||
index 4dcc3b3b..428afe5a 100644
|
||||
--- a/libselinux/src/.gitignore
|
||||
+++ b/libselinux/src/.gitignore
|
||||
@@ -1,4 +1,4 @@
|
||||
selinux.py
|
||||
-selinuxswig_wrap.c
|
||||
+selinuxswig_python_wrap.c
|
||||
selinuxswig_python_exception.i
|
||||
selinuxswig_ruby_wrap.c
|
||||
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
|
||||
index e9ed0383..826c830c 100644
|
||||
--- a/libselinux/src/Makefile
|
||||
+++ b/libselinux/src/Makefile
|
||||
@@ -36,7 +36,7 @@ TARGET=libselinux.so
|
||||
LIBPC=libselinux.pc
|
||||
SWIGIF= selinuxswig_python.i selinuxswig_python_exception.i
|
||||
SWIGRUBYIF= selinuxswig_ruby.i
|
||||
-SWIGCOUT= selinuxswig_wrap.c
|
||||
+SWIGCOUT= selinuxswig_python_wrap.c
|
||||
SWIGPYOUT= selinux.py
|
||||
SWIGRUBYCOUT= selinuxswig_ruby_wrap.c
|
||||
SWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT))
|
||||
@@ -55,7 +55,7 @@ ifeq ($(LIBSEPOLA),)
|
||||
LDLIBS_LIBSEPOLA := -l:libsepol.a
|
||||
endif
|
||||
|
||||
-GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) selinuxswig_python_exception.i
|
||||
+GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) $(SWIGCOUT) selinuxswig_python_exception.i
|
||||
SRCS= $(filter-out $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
|
||||
|
||||
MAX_STACK_SIZE=32768
|
||||
@@ -125,25 +125,18 @@ DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
|
||||
SRCS:= $(filter-out label_backends_android.c, $(SRCS))
|
||||
endif
|
||||
|
||||
-SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(DISABLE_FLAGS)
|
||||
-
|
||||
SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
|
||||
|
||||
all: $(LIBA) $(LIBSO) $(LIBPC)
|
||||
|
||||
-pywrap: all $(SWIGFILES) $(AUDIT2WHYSO)
|
||||
+pywrap: all selinuxswig_python_exception.i
|
||||
+ CFLAGS="$(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
|
||||
|
||||
rubywrap: all $(SWIGRUBYSO)
|
||||
|
||||
-$(SWIGLOBJ): $(SWIGCOUT)
|
||||
- $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(PYINC) -fPIC -DSHARED -c -o $@ $<
|
||||
-
|
||||
$(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
|
||||
$(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
|
||||
|
||||
-$(SWIGSO): $(SWIGLOBJ)
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $< -lselinux $(PYLIBS)
|
||||
-
|
||||
$(SWIGRUBYSO): $(SWIGRUBYLOBJ)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
|
||||
|
||||
@@ -161,29 +154,15 @@ $(LIBPC): $(LIBPC).in ../VERSION
|
||||
selinuxswig_python_exception.i: ../include/selinux/selinux.h
|
||||
bash -e exception.sh > $@ || (rm -f $@ ; false)
|
||||
|
||||
-$(AUDIT2WHYLOBJ): audit2why.c
|
||||
- $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
|
||||
-
|
||||
-$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) $(LIBSEPOLA)
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(LDLIBS_LIBSEPOLA) $(PYLIBS) -Wl,-soname,audit2why.so,--version-script=audit2why.map,-z,defs
|
||||
-
|
||||
%.o: %.c policy.h
|
||||
$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
|
||||
|
||||
%.lo: %.c policy.h
|
||||
$(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
|
||||
|
||||
-$(SWIGCOUT): $(SWIGIF)
|
||||
- $(SWIG) $<
|
||||
-
|
||||
-$(SWIGPYOUT): $(SWIGCOUT)
|
||||
-
|
||||
$(SWIGRUBYCOUT): $(SWIGRUBYIF)
|
||||
$(SWIGRUBY) $<
|
||||
|
||||
-swigify: $(SWIGIF)
|
||||
- $(SWIG) $<
|
||||
-
|
||||
install: all
|
||||
test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR)
|
||||
install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR)
|
||||
@@ -194,10 +173,8 @@ install: all
|
||||
ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
|
||||
|
||||
install-pywrap: pywrap
|
||||
- test -d $(DESTDIR)$(PYTHONLIBDIR)/selinux || install -m 755 -d $(DESTDIR)$(PYTHONLIBDIR)/selinux
|
||||
- install -m 755 $(SWIGSO) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
|
||||
- install -m 755 $(AUDIT2WHYSO) $(DESTDIR)$(PYTHONLIBDIR)/selinux/audit2why$(PYCEXT)
|
||||
- install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
|
||||
+ $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
|
||||
+ install -m 644 selinux.py $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
|
||||
|
||||
install-rubywrap: rubywrap
|
||||
test -d $(DESTDIR)$(RUBYINSTALL) || install -m 755 -d $(DESTDIR)$(RUBYINSTALL)
|
||||
@@ -208,6 +185,8 @@ relabel:
|
||||
|
||||
clean-pywrap:
|
||||
-rm -f $(SWIGLOBJ) $(SWIGSO) $(AUDIT2WHYLOBJ) $(AUDIT2WHYSO)
|
||||
+ $(PYTHON) setup.py clean
|
||||
+ -rm -rf build *~ \#* *pyc .#*
|
||||
|
||||
clean-rubywrap:
|
||||
-rm -f $(SWIGRUBYLOBJ) $(SWIGRUBYSO)
|
||||
diff --git a/libselinux/src/setup.py b/libselinux/src/setup.py
|
||||
new file mode 100644
|
||||
index 00000000..b12e7869
|
||||
--- /dev/null
|
||||
+++ b/libselinux/src/setup.py
|
||||
@@ -0,0 +1,24 @@
|
||||
+#!/usr/bin/python3
|
||||
+
|
||||
+from distutils.core import Extension, setup
|
||||
+
|
||||
+setup(
|
||||
+ name="selinux",
|
||||
+ version="2.9",
|
||||
+ description="SELinux python 3 bindings",
|
||||
+ author="SELinux Project",
|
||||
+ author_email="selinux@vger.kernel.org",
|
||||
+ ext_modules=[
|
||||
+ Extension('selinux._selinux',
|
||||
+ sources=['selinuxswig_python.i'],
|
||||
+ include_dirs=['../include'],
|
||||
+ library_dirs=['.'],
|
||||
+ libraries=['selinux']),
|
||||
+ Extension('selinux.audit2why',
|
||||
+ sources=['audit2why.c'],
|
||||
+ include_dirs=['../include'],
|
||||
+ library_dirs=['.'],
|
||||
+ libraries=['selinux'],
|
||||
+ extra_link_args=['-l:libsepol.a'])
|
||||
+ ],
|
||||
+)
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 6ec8116ee64a25a0c5eb543f0b12ed25f1348c45 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <plautrba@redhat.com>
|
||||
Date: Thu, 27 Jun 2019 11:17:13 +0200
|
||||
Subject: [PATCH] libselinux: Do not use SWIG_CFLAGS when Python bindings are
|
||||
built
|
||||
|
||||
Fixes:
|
||||
https://rpmdiff.engineering.redhat.com/run/410372/7/
|
||||
|
||||
Detecting usr/lib64/python3.6/site-packages/selinux/audit2why.cpython-36m-x86_64-linux-gnu.so with not-hardened warnings '
|
||||
Hardened: audit2why.cpython-36m-x86_64-linux-gnu.so: FAIL: Gaps were detected in the annobin coverage. Run with -v to list.
|
||||
' on x86_64
|
||||
|
||||
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
|
||||
---
|
||||
libselinux/src/Makefile | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
|
||||
index 826c830c..f64f23a8 100644
|
||||
--- a/libselinux/src/Makefile
|
||||
+++ b/libselinux/src/Makefile
|
||||
@@ -104,9 +104,6 @@ FTS_LDLIBS ?=
|
||||
|
||||
override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
|
||||
|
||||
-SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
|
||||
- -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations
|
||||
-
|
||||
RANLIB ?= ranlib
|
||||
|
||||
ARCH := $(patsubst i%86,i386,$(shell uname -m))
|
||||
@@ -130,7 +127,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
|
||||
all: $(LIBA) $(LIBSO) $(LIBPC)
|
||||
|
||||
pywrap: all selinuxswig_python_exception.i
|
||||
- CFLAGS="$(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
|
||||
+ $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
|
||||
|
||||
rubywrap: all $(SWIGRUBYSO)
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,66 +0,0 @@
|
||||
From 90a4f2b9a5194a2d1ab4c45b7a90bbb6c8099a68 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Tue, 2 Jul 2019 14:09:05 +0200
|
||||
Subject: [PATCH] Fix mcstrans secolor examples
|
||||
|
||||
According to "check_dominance" function:
|
||||
Range defined as "s15:c0.c1023" does not dominate any other range than
|
||||
"s15:c0.c1023" (does not dominate "s15", "s15:c0.c200", etc.).
|
||||
While range defined as "s15-s15:c0.c1023" dominates all of the above.
|
||||
|
||||
This is either a bug, or "s15:c0.c1023" should not be used in the
|
||||
examples.
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
---
|
||||
libselinux/man/man5/secolor.conf.5 | 4 ++--
|
||||
libselinux/man/ru/man5/secolor.conf.5 | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libselinux/man/man5/secolor.conf.5 b/libselinux/man/man5/secolor.conf.5
|
||||
index b834577a..a3bf2da1 100644
|
||||
--- a/libselinux/man/man5/secolor.conf.5
|
||||
+++ b/libselinux/man/man5/secolor.conf.5
|
||||
@@ -123,7 +123,7 @@ range s7\-s7:c0.c1023 = black red
|
||||
.br
|
||||
range s9\-s9:c0.c1023 = black orange
|
||||
.br
|
||||
-range s15:c0.c1023 = black yellow
|
||||
+range s15\-s15:c0.c1023 = black yellow
|
||||
.RE
|
||||
|
||||
.sp
|
||||
@@ -165,7 +165,7 @@ type xguest_t = black green
|
||||
.br
|
||||
user sysadm_u = white black
|
||||
.br
|
||||
-range s0:c0.c1023 = black white
|
||||
+range s0-s0:c0.c1023 = black white
|
||||
.br
|
||||
user * = black white
|
||||
.br
|
||||
diff --git a/libselinux/man/ru/man5/secolor.conf.5 b/libselinux/man/ru/man5/secolor.conf.5
|
||||
index 4c1236ae..bcae80c1 100644
|
||||
--- a/libselinux/man/ru/man5/secolor.conf.5
|
||||
+++ b/libselinux/man/ru/man5/secolor.conf.5
|
||||
@@ -121,7 +121,7 @@ range s7\-s7:c0.c1023 = black red
|
||||
.br
|
||||
range s9\-s9:c0.c1023 = black orange
|
||||
.br
|
||||
-range s15:c0.c1023 = black yellow
|
||||
+range s15\-s15:c0.c1023 = black yellow
|
||||
.RE
|
||||
|
||||
.sp
|
||||
@@ -163,7 +163,7 @@ type xguest_t = black green
|
||||
.br
|
||||
user sysadm_u = white black
|
||||
.br
|
||||
-range s0:c0.c1023 = black white
|
||||
+range s0\-s0:c0.c1023 = black white
|
||||
.br
|
||||
user * = black white
|
||||
.br
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,354 +0,0 @@
|
||||
From bfee1a3131580a7b9d8a7366764b8e78d99a9f1b Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <plautrba@redhat.com>
|
||||
Date: Mon, 17 Feb 2020 21:47:35 +0100
|
||||
Subject: [PATCH] libselinux: Eliminate use of security_compute_user()
|
||||
|
||||
get_ordered_context_list() code used to ask the kernel to compute the complete
|
||||
set of reachable contexts using /sys/fs/selinux/user aka
|
||||
security_compute_user(). This set can be so huge so that it doesn't fit into a
|
||||
kernel page and security_compute_user() fails. Even if it doesn't fail,
|
||||
get_ordered_context_list() throws away the vast majority of the returned
|
||||
contexts because they don't match anything in
|
||||
/etc/selinux/targeted/contexts/default_contexts or
|
||||
/etc/selinux/targeted/contexts/users/
|
||||
|
||||
get_ordered_context_list() is rewritten to compute set of contexts based on
|
||||
/etc/selinux/targeted/contexts/users/ and
|
||||
/etc/selinux/targeted/contexts/default_contexts files and to return only valid
|
||||
contexts, using security_check_context(), from this set.
|
||||
|
||||
Fixes: https://github.com/SELinuxProject/selinux/issues/28
|
||||
|
||||
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
|
||||
---
|
||||
libselinux/src/get_context_list.c | 212 +++++++++++++-----------------
|
||||
1 file changed, 93 insertions(+), 119 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/get_context_list.c b/libselinux/src/get_context_list.c
|
||||
index 689e4658..26d7b3b9 100644
|
||||
--- a/libselinux/src/get_context_list.c
|
||||
+++ b/libselinux/src/get_context_list.c
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdio_ext.h>
|
||||
+#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -114,64 +115,41 @@ int get_default_context(const char *user,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int find_partialcon(char ** list,
|
||||
- unsigned int nreach, char *part)
|
||||
+static int is_in_reachable(char **reachable, const char *usercon_str)
|
||||
{
|
||||
- const char *conrole, *contype;
|
||||
- char *partrole, *parttype, *ptr;
|
||||
- context_t con;
|
||||
- unsigned int i;
|
||||
+ if (!reachable)
|
||||
+ return 0;
|
||||
|
||||
- partrole = part;
|
||||
- ptr = part;
|
||||
- while (*ptr && !isspace(*ptr) && *ptr != ':')
|
||||
- ptr++;
|
||||
- if (*ptr != ':')
|
||||
- return -1;
|
||||
- *ptr++ = 0;
|
||||
- parttype = ptr;
|
||||
- while (*ptr && !isspace(*ptr) && *ptr != ':')
|
||||
- ptr++;
|
||||
- *ptr = 0;
|
||||
-
|
||||
- for (i = 0; i < nreach; i++) {
|
||||
- con = context_new(list[i]);
|
||||
- if (!con)
|
||||
- return -1;
|
||||
- conrole = context_role_get(con);
|
||||
- contype = context_type_get(con);
|
||||
- if (!conrole || !contype) {
|
||||
- context_free(con);
|
||||
- return -1;
|
||||
- }
|
||||
- if (!strcmp(conrole, partrole) && !strcmp(contype, parttype)) {
|
||||
- context_free(con);
|
||||
- return i;
|
||||
+ for (; *reachable != NULL; reachable++) {
|
||||
+ if (strcmp(*reachable, usercon_str) == 0) {
|
||||
+ return 1;
|
||||
}
|
||||
- context_free(con);
|
||||
}
|
||||
-
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
-static int get_context_order(FILE * fp,
|
||||
+static int get_context_user(FILE * fp,
|
||||
char * fromcon,
|
||||
- char ** reachable,
|
||||
- unsigned int nreach,
|
||||
- unsigned int *ordering, unsigned int *nordered)
|
||||
+ const char * user,
|
||||
+ char ***reachable,
|
||||
+ unsigned int *nreachable)
|
||||
{
|
||||
char *start, *end = NULL;
|
||||
char *line = NULL;
|
||||
- size_t line_len = 0;
|
||||
+ size_t line_len = 0, usercon_len;
|
||||
+ size_t user_len = strlen(user);
|
||||
ssize_t len;
|
||||
int found = 0;
|
||||
- const char *fromrole, *fromtype;
|
||||
+ const char *fromrole, *fromtype, *fromlevel;
|
||||
char *linerole, *linetype;
|
||||
- unsigned int i;
|
||||
+ char **new_reachable = NULL;
|
||||
+ char *usercon_str;
|
||||
context_t con;
|
||||
+ context_t usercon;
|
||||
+
|
||||
int rc;
|
||||
|
||||
- errno = -EINVAL;
|
||||
+ errno = EINVAL;
|
||||
|
||||
/* Extract the role and type of the fromcon for matching.
|
||||
User identity and MLS range can be variable. */
|
||||
@@ -180,6 +158,7 @@ static int get_context_order(FILE * fp,
|
||||
return -1;
|
||||
fromrole = context_role_get(con);
|
||||
fromtype = context_type_get(con);
|
||||
+ fromlevel = context_range_get(con);
|
||||
if (!fromrole || !fromtype) {
|
||||
context_free(con);
|
||||
return -1;
|
||||
@@ -243,23 +222,75 @@ static int get_context_order(FILE * fp,
|
||||
if (*end)
|
||||
*end++ = 0;
|
||||
|
||||
- /* Check for a match in the reachable list. */
|
||||
- rc = find_partialcon(reachable, nreach, start);
|
||||
- if (rc < 0) {
|
||||
- /* No match, skip it. */
|
||||
+ /* Check whether a new context is valid */
|
||||
+ if (SIZE_MAX - user_len < strlen(start) + 2) {
|
||||
+ fprintf(stderr, "%s: one of partial contexts is too big\n", __FUNCTION__);
|
||||
+ errno = EINVAL;
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ usercon_len = user_len + strlen(start) + 2;
|
||||
+ usercon_str = malloc(usercon_len);
|
||||
+ if (!usercon_str) {
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* set range from fromcon in the new usercon */
|
||||
+ snprintf(usercon_str, usercon_len, "%s:%s", user, start);
|
||||
+ usercon = context_new(usercon_str);
|
||||
+ if (!usercon) {
|
||||
+ if (errno != EINVAL) {
|
||||
+ free(usercon_str);
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ fprintf(stderr,
|
||||
+ "%s: can't create a context from %s, skipping\n",
|
||||
+ __FUNCTION__, usercon_str);
|
||||
+ free(usercon_str);
|
||||
start = end;
|
||||
continue;
|
||||
}
|
||||
+ free(usercon_str);
|
||||
+ if (context_range_set(usercon, fromlevel) != 0) {
|
||||
+ context_free(usercon);
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ usercon_str = context_str(usercon);
|
||||
+ if (!usercon_str) {
|
||||
+ context_free(usercon);
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
- /* If a match is found and the entry is not already ordered
|
||||
- (e.g. due to prior match in prior config file), then set
|
||||
- the ordering for it. */
|
||||
- i = rc;
|
||||
- if (ordering[i] == nreach)
|
||||
- ordering[i] = (*nordered)++;
|
||||
+ /* check whether usercon is already in reachable */
|
||||
+ if (is_in_reachable(*reachable, usercon_str)) {
|
||||
+ context_free(usercon);
|
||||
+ start = end;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (security_check_context(usercon_str) == 0) {
|
||||
+ new_reachable = realloc(*reachable, (*nreachable + 2) * sizeof(char *));
|
||||
+ if (!new_reachable) {
|
||||
+ context_free(usercon);
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ *reachable = new_reachable;
|
||||
+ new_reachable[*nreachable] = strdup(usercon_str);
|
||||
+ if (new_reachable[*nreachable] == NULL) {
|
||||
+ context_free(usercon);
|
||||
+ rc = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ new_reachable[*nreachable + 1] = 0;
|
||||
+ *nreachable += 1;
|
||||
+ }
|
||||
+ context_free(usercon);
|
||||
start = end;
|
||||
}
|
||||
-
|
||||
rc = 0;
|
||||
|
||||
out:
|
||||
@@ -313,21 +344,6 @@ static int get_failsafe_context(const char *user, char ** newcon)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-struct context_order {
|
||||
- char * con;
|
||||
- unsigned int order;
|
||||
-};
|
||||
-
|
||||
-static int order_compare(const void *A, const void *B)
|
||||
-{
|
||||
- const struct context_order *c1 = A, *c2 = B;
|
||||
- if (c1->order < c2->order)
|
||||
- return -1;
|
||||
- else if (c1->order > c2->order)
|
||||
- return 1;
|
||||
- return strcmp(c1->con, c2->con);
|
||||
-}
|
||||
-
|
||||
int get_ordered_context_list_with_level(const char *user,
|
||||
const char *level,
|
||||
char * fromcon,
|
||||
@@ -395,11 +411,8 @@ int get_ordered_context_list(const char *user,
|
||||
char *** list)
|
||||
{
|
||||
char **reachable = NULL;
|
||||
- unsigned int *ordering = NULL;
|
||||
- struct context_order *co = NULL;
|
||||
- char **ptr;
|
||||
int rc = 0;
|
||||
- unsigned int nreach = 0, nordered = 0, freefrom = 0, i;
|
||||
+ unsigned nreachable = 0, freefrom = 0;
|
||||
FILE *fp;
|
||||
char *fname = NULL;
|
||||
size_t fname_len;
|
||||
@@ -413,23 +426,6 @@ int get_ordered_context_list(const char *user,
|
||||
freefrom = 1;
|
||||
}
|
||||
|
||||
- /* Determine the set of reachable contexts for the user. */
|
||||
- rc = security_compute_user(fromcon, user, &reachable);
|
||||
- if (rc < 0)
|
||||
- goto failsafe;
|
||||
- nreach = 0;
|
||||
- for (ptr = reachable; *ptr; ptr++)
|
||||
- nreach++;
|
||||
- if (!nreach)
|
||||
- goto failsafe;
|
||||
-
|
||||
- /* Initialize ordering array. */
|
||||
- ordering = malloc(nreach * sizeof(unsigned int));
|
||||
- if (!ordering)
|
||||
- goto failsafe;
|
||||
- for (i = 0; i < nreach; i++)
|
||||
- ordering[i] = nreach;
|
||||
-
|
||||
/* Determine the ordering to apply from the optional per-user config
|
||||
and from the global config. */
|
||||
fname_len = strlen(user_contexts_path) + strlen(user) + 2;
|
||||
@@ -440,8 +436,8 @@ int get_ordered_context_list(const char *user,
|
||||
fp = fopen(fname, "re");
|
||||
if (fp) {
|
||||
__fsetlocking(fp, FSETLOCKING_BYCALLER);
|
||||
- rc = get_context_order(fp, fromcon, reachable, nreach, ordering,
|
||||
- &nordered);
|
||||
+ rc = get_context_user(fp, fromcon, user, &reachable, &nreachable);
|
||||
+
|
||||
fclose(fp);
|
||||
if (rc < 0 && errno != ENOENT) {
|
||||
fprintf(stderr,
|
||||
@@ -454,8 +450,7 @@ int get_ordered_context_list(const char *user,
|
||||
fp = fopen(selinux_default_context_path(), "re");
|
||||
if (fp) {
|
||||
__fsetlocking(fp, FSETLOCKING_BYCALLER);
|
||||
- rc = get_context_order(fp, fromcon, reachable, nreach, ordering,
|
||||
- &nordered);
|
||||
+ rc = get_context_user(fp, fromcon, user, &reachable, &nreachable);
|
||||
fclose(fp);
|
||||
if (rc < 0 && errno != ENOENT) {
|
||||
fprintf(stderr,
|
||||
@@ -463,40 +458,19 @@ int get_ordered_context_list(const char *user,
|
||||
__FUNCTION__, selinux_default_context_path());
|
||||
/* Fall through */
|
||||
}
|
||||
- rc = 0;
|
||||
}
|
||||
|
||||
- if (!nordered)
|
||||
+ if (!nreachable)
|
||||
goto failsafe;
|
||||
|
||||
- /* Apply the ordering. */
|
||||
- co = malloc(nreach * sizeof(struct context_order));
|
||||
- if (!co)
|
||||
- goto failsafe;
|
||||
- for (i = 0; i < nreach; i++) {
|
||||
- co[i].con = reachable[i];
|
||||
- co[i].order = ordering[i];
|
||||
- }
|
||||
- qsort(co, nreach, sizeof(struct context_order), order_compare);
|
||||
- for (i = 0; i < nreach; i++)
|
||||
- reachable[i] = co[i].con;
|
||||
- free(co);
|
||||
-
|
||||
- /* Only report the ordered entries to the caller. */
|
||||
- if (nordered <= nreach) {
|
||||
- for (i = nordered; i < nreach; i++)
|
||||
- free(reachable[i]);
|
||||
- reachable[nordered] = NULL;
|
||||
- rc = nordered;
|
||||
- }
|
||||
-
|
||||
out:
|
||||
- if (rc > 0)
|
||||
+ if (nreachable > 0) {
|
||||
*list = reachable;
|
||||
+ rc = nreachable;
|
||||
+ }
|
||||
else
|
||||
freeconary(reachable);
|
||||
|
||||
- free(ordering);
|
||||
if (freefrom)
|
||||
freecon(fromcon);
|
||||
|
||||
@@ -519,7 +493,7 @@ int get_ordered_context_list(const char *user,
|
||||
reachable = NULL;
|
||||
goto out;
|
||||
}
|
||||
- rc = 1; /* one context in the list */
|
||||
+ nreachable = 1; /* one context in the list */
|
||||
goto out;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.4
|
||||
|
@ -1,168 +0,0 @@
|
||||
From d4c22fcd5943fe35db648dee971f631d40b3eb94 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Date: Thu, 20 Feb 2020 10:40:19 -0500
|
||||
Subject: [PATCH] libselinux: deprecate security_compute_user(), update man
|
||||
pages
|
||||
|
||||
commit 1f89c4e7879fcf6da5d8d1b025dcc03371f30fc9 ("libselinux: Eliminate
|
||||
use of security_compute_user()") eliminated the use of
|
||||
security_compute_user() by get_ordered_context_list(). Deprecate
|
||||
all use of security_compute_user() by updating the headers and man
|
||||
pages and logging a warning message on any calls to it. Remove
|
||||
the example utility that called the interface. While here, also
|
||||
fix the documentation of correct usage of the user argument to these
|
||||
interfaces.
|
||||
|
||||
Fixes: https://github.com/SELinuxProject/selinux/issues/70
|
||||
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Acked-by: Petr Lautrbach <plautrba@redhat.com>
|
||||
---
|
||||
libselinux/include/selinux/selinux.h | 8 +++-
|
||||
.../man/man3/get_ordered_context_list.3 | 24 +++++++++---
|
||||
libselinux/man/man3/security_compute_av.3 | 5 ++-
|
||||
libselinux/src/compute_user.c | 3 ++
|
||||
libselinux/utils/compute_user.c | 38 -------------------
|
||||
5 files changed, 31 insertions(+), 47 deletions(-)
|
||||
delete mode 100644 libselinux/utils/compute_user.c
|
||||
|
||||
diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
|
||||
index a34d54fc..a5ada324 100644
|
||||
--- a/libselinux/include/selinux/selinux.h
|
||||
+++ b/libselinux/include/selinux/selinux.h
|
||||
@@ -246,8 +246,12 @@ extern int security_compute_member_raw(const char * scon,
|
||||
security_class_t tclass,
|
||||
char ** newcon);
|
||||
|
||||
-/* Compute the set of reachable user contexts and set *con to refer to
|
||||
- the NULL-terminated array of contexts. Caller must free via freeconary. */
|
||||
+/*
|
||||
+ * Compute the set of reachable user contexts and set *con to refer to
|
||||
+ * the NULL-terminated array of contexts. Caller must free via freeconary.
|
||||
+ * These interfaces are deprecated. Use get_ordered_context_list() or
|
||||
+ * one of its variant interfaces instead.
|
||||
+ */
|
||||
extern int security_compute_user(const char * scon,
|
||||
const char *username,
|
||||
char *** con);
|
||||
diff --git a/libselinux/man/man3/get_ordered_context_list.3 b/libselinux/man/man3/get_ordered_context_list.3
|
||||
index e084da40..3ed14a96 100644
|
||||
--- a/libselinux/man/man3/get_ordered_context_list.3
|
||||
+++ b/libselinux/man/man3/get_ordered_context_list.3
|
||||
@@ -26,14 +26,28 @@ get_ordered_context_list, get_ordered_context_list_with_level, get_default_conte
|
||||
.BI "int get_default_type(const char *" role ", char **" type );
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
+
|
||||
+This family of functions can be used to obtain either a prioritized list of
|
||||
+all reachable security contexts for a given SELinux user or a single default
|
||||
+(highest priority) context for a given SELinux user for use by login-like
|
||||
+programs. These functions takes a SELinux user identity that must
|
||||
+be defined in the SELinux policy as their input, not a Linux username.
|
||||
+Most callers should typically first call
|
||||
+.BR getseuserbyname(3)
|
||||
+to look up the SELinux user identity and level for a given
|
||||
+Linux username and then invoke one of
|
||||
+.BR get_ordered_context_list_with_level ()
|
||||
+or
|
||||
+.BR get_default_context_with_level ()
|
||||
+with the returned SELinux user and level as inputs.
|
||||
+
|
||||
.BR get_ordered_context_list ()
|
||||
-invokes the
|
||||
-.BR security_compute_user (3)
|
||||
-function to obtain the list of contexts for the specified
|
||||
+obtains the list of contexts for the specified
|
||||
+SELinux
|
||||
.I user
|
||||
-that are reachable from the specified
|
||||
+identity that are reachable from the specified
|
||||
.I fromcon
|
||||
-context. The function then orders the resulting list based on the global
|
||||
+context based on the global
|
||||
.I \%/etc/selinux/{SELINUXTYPE}/contexts/default_contexts
|
||||
file and the per-user
|
||||
.I \%/etc/selinux/{SELINUXTYPE}/contexts/users/<username>
|
||||
diff --git a/libselinux/man/man3/security_compute_av.3 b/libselinux/man/man3/security_compute_av.3
|
||||
index 2aade5fe..8e1f746a 100644
|
||||
--- a/libselinux/man/man3/security_compute_av.3
|
||||
+++ b/libselinux/man/man3/security_compute_av.3
|
||||
@@ -97,8 +97,9 @@ instance.
|
||||
|
||||
.BR security_compute_user ()
|
||||
is used to determine the set of user contexts that can be reached from a
|
||||
-source context. It is mainly used by
|
||||
-.BR get_ordered_context_list ().
|
||||
+source context. This function is deprecated; use
|
||||
+.BR get_ordered_context_list (3)
|
||||
+instead.
|
||||
|
||||
.BR security_get_initial_context ()
|
||||
is used to get the context of a kernel initial security identifier specified by
|
||||
diff --git a/libselinux/src/compute_user.c b/libselinux/src/compute_user.c
|
||||
index 401fd107..0f55de84 100644
|
||||
--- a/libselinux/src/compute_user.c
|
||||
+++ b/libselinux/src/compute_user.c
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "selinux_internal.h"
|
||||
#include "policy.h"
|
||||
#include <limits.h>
|
||||
+#include "callbacks.h"
|
||||
|
||||
int security_compute_user_raw(const char * scon,
|
||||
const char *user, char *** con)
|
||||
@@ -24,6 +25,8 @@ int security_compute_user_raw(const char * scon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ selinux_log(SELINUX_WARNING, "Direct use of security_compute_user() is deprecated, switch to get_ordered_context_list()\n");
|
||||
+
|
||||
if (! scon) {
|
||||
errno=EINVAL;
|
||||
return -1;
|
||||
diff --git a/libselinux/utils/compute_user.c b/libselinux/utils/compute_user.c
|
||||
deleted file mode 100644
|
||||
index cae62b26..00000000
|
||||
--- a/libselinux/utils/compute_user.c
|
||||
+++ /dev/null
|
||||
@@ -1,38 +0,0 @@
|
||||
-#include <unistd.h>
|
||||
-#include <sys/types.h>
|
||||
-#include <fcntl.h>
|
||||
-#include <stdio.h>
|
||||
-#include <stdlib.h>
|
||||
-#include <errno.h>
|
||||
-#include <string.h>
|
||||
-#include <ctype.h>
|
||||
-#include <selinux/selinux.h>
|
||||
-
|
||||
-int main(int argc, char **argv)
|
||||
-{
|
||||
- char **buf, **ptr;
|
||||
- int ret;
|
||||
-
|
||||
- if (argc != 3) {
|
||||
- fprintf(stderr, "usage: %s context user\n", argv[0]);
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
- ret = security_compute_user(argv[1], argv[2], &buf);
|
||||
- if (ret < 0) {
|
||||
- fprintf(stderr, "%s: security_compute_user(%s,%s) failed\n",
|
||||
- argv[0], argv[1], argv[2]);
|
||||
- exit(2);
|
||||
- }
|
||||
-
|
||||
- if (!buf[0]) {
|
||||
- printf("none\n");
|
||||
- exit(0);
|
||||
- }
|
||||
-
|
||||
- for (ptr = buf; *ptr; ptr++) {
|
||||
- printf("%s\n", *ptr);
|
||||
- }
|
||||
- freeconary(buf);
|
||||
- exit(0);
|
||||
-}
|
||||
--
|
||||
2.25.4
|
||||
|
@ -1,39 +0,0 @@
|
||||
From c556c6ad0b94cf3ba4b441a1a0930f2468434227 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Wed, 10 Feb 2021 18:05:29 +0100
|
||||
Subject: [PATCH] selinux(8,5): Describe fcontext regular expressions
|
||||
|
||||
Describe which type of regular expression is used in file context
|
||||
definitions and which flags are in effect.
|
||||
|
||||
Explain how local file context modifications are processed.
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
Acked-by: Petr Lautrbach <plautrba@redhat.com>
|
||||
---
|
||||
libselinux/man/man5/selabel_file.5 | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libselinux/man/man5/selabel_file.5 b/libselinux/man/man5/selabel_file.5
|
||||
index e97bd826..baba7776 100644
|
||||
--- a/libselinux/man/man5/selabel_file.5
|
||||
+++ b/libselinux/man/man5/selabel_file.5
|
||||
@@ -125,7 +125,14 @@ Where:
|
||||
.RS
|
||||
.I pathname
|
||||
.RS
|
||||
-An entry that defines the pathname that may be in the form of a regular expression.
|
||||
+An entry that defines the path to be labeled.
|
||||
+May contain either a fully qualified path,
|
||||
+or a Perl compatible regular expression (PCRE),
|
||||
+describing fully qualified path(s).
|
||||
+The only PCRE flag in use is PCRE2_DOTALL,
|
||||
+which causes a wildcard '.' to match anything, including a new line.
|
||||
+Strings representing paths are processed as bytes (as opposed to Unicode),
|
||||
+meaning that non-ASCII characters are not matched by a single wildcard.
|
||||
.RE
|
||||
.I file_type
|
||||
.RS
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,88 +0,0 @@
|
||||
From 9bf63bb85d4d2cab73181ee1d8d0b07961ce4a80 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Thu, 17 Feb 2022 14:14:15 +0100
|
||||
Subject: [PATCH] libselinux: Strip spaces before values in config
|
||||
|
||||
Spaces before values in /etc/selinux/config should be ignored just as
|
||||
spaces after them are.
|
||||
|
||||
E.g. "SELINUXTYPE= targeted" should be a valid value.
|
||||
|
||||
Fixes:
|
||||
# sed -i 's/^SELINUXTYPE=/SELINUXTYPE= /g' /etc/selinux/config
|
||||
# dnf install <any_package>
|
||||
...
|
||||
RPM: error: selabel_open: (/etc/selinux/ targeted/contexts/files/file_contexts) No such file or directory
|
||||
RPM: error: Plugin selinux: hook tsm_pre failed
|
||||
...
|
||||
Error: Could not run transaction.
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
---
|
||||
libselinux/src/selinux_config.c | 17 +++++++++++++----
|
||||
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c
|
||||
index b06cb63b..0892b87c 100644
|
||||
--- a/libselinux/src/selinux_config.c
|
||||
+++ b/libselinux/src/selinux_config.c
|
||||
@@ -91,6 +91,7 @@ int selinux_getenforcemode(int *enforce)
|
||||
FILE *cfg = fopen(SELINUXCONFIG, "re");
|
||||
if (cfg) {
|
||||
char *buf;
|
||||
+ char *tag;
|
||||
int len = sizeof(SELINUXTAG) - 1;
|
||||
buf = malloc(selinux_page_size);
|
||||
if (!buf) {
|
||||
@@ -100,21 +101,24 @@ int selinux_getenforcemode(int *enforce)
|
||||
while (fgets_unlocked(buf, selinux_page_size, cfg)) {
|
||||
if (strncmp(buf, SELINUXTAG, len))
|
||||
continue;
|
||||
+ tag = buf+len;
|
||||
+ while (isspace(*tag))
|
||||
+ tag++;
|
||||
if (!strncasecmp
|
||||
- (buf + len, "enforcing", sizeof("enforcing") - 1)) {
|
||||
+ (tag, "enforcing", sizeof("enforcing") - 1)) {
|
||||
*enforce = 1;
|
||||
ret = 0;
|
||||
break;
|
||||
} else
|
||||
if (!strncasecmp
|
||||
- (buf + len, "permissive",
|
||||
+ (tag, "permissive",
|
||||
sizeof("permissive") - 1)) {
|
||||
*enforce = 0;
|
||||
ret = 0;
|
||||
break;
|
||||
} else
|
||||
if (!strncasecmp
|
||||
- (buf + len, "disabled",
|
||||
+ (tag, "disabled",
|
||||
sizeof("disabled") - 1)) {
|
||||
*enforce = -1;
|
||||
ret = 0;
|
||||
@@ -177,7 +181,10 @@ static void init_selinux_config(void)
|
||||
|
||||
if (!strncasecmp(buf_p, SELINUXTYPETAG,
|
||||
sizeof(SELINUXTYPETAG) - 1)) {
|
||||
- type = strdup(buf_p + sizeof(SELINUXTYPETAG) - 1);
|
||||
+ buf_p += sizeof(SELINUXTYPETAG) - 1;
|
||||
+ while (isspace(*buf_p))
|
||||
+ buf_p++;
|
||||
+ type = strdup(buf_p);
|
||||
if (!type)
|
||||
return;
|
||||
end = type + strlen(type) - 1;
|
||||
@@ -199,6 +206,8 @@ static void init_selinux_config(void)
|
||||
} else if (!strncmp(buf_p, REQUIRESEUSERS,
|
||||
sizeof(REQUIRESEUSERS) - 1)) {
|
||||
value = buf_p + sizeof(REQUIRESEUSERS) - 1;
|
||||
+ while (isspace(*value))
|
||||
+ value++;
|
||||
intptr = &require_seusers;
|
||||
} else {
|
||||
continue;
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 9a04499cebedac3f585c0240e6cf68f786ae62b7 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Mon, 31 Oct 2022 17:00:43 +0100
|
||||
Subject: [PATCH] libselinux: Ignore missing directories when -i is used
|
||||
|
||||
Currently "-i" only ignores a file whose parent directory exists. Start also
|
||||
ignoring paths with missing components.
|
||||
|
||||
Fixes:
|
||||
# restorecon -i -v -R /var/log/missingdir/missingfile; echo $?
|
||||
255
|
||||
restorecon: SELinux: Could not get canonical path for /var/log/missingdir/missingfile restorecon: No such file or directory.
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
---
|
||||
libselinux/src/selinux_restorecon.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
|
||||
index 5f189235..2ff73db6 100644
|
||||
--- a/libselinux/src/selinux_restorecon.c
|
||||
+++ b/libselinux/src/selinux_restorecon.c
|
||||
@@ -820,6 +820,10 @@ int selinux_restorecon(const char *pathname_orig,
|
||||
pathname = realpath(pathname_orig, NULL);
|
||||
if (!pathname) {
|
||||
free(basename_cpy);
|
||||
+ /* missing parent directory */
|
||||
+ if (flags.ignore_noent && errno == ENOENT) {
|
||||
+ return 0;
|
||||
+ }
|
||||
goto realpatherr;
|
||||
}
|
||||
} else {
|
||||
@@ -833,6 +837,9 @@ int selinux_restorecon(const char *pathname_orig,
|
||||
free(dirname_cpy);
|
||||
if (!pathdnamer) {
|
||||
free(basename_cpy);
|
||||
+ if (flags.ignore_noent && errno == ENOENT) {
|
||||
+ return 0;
|
||||
+ }
|
||||
goto realpatherr;
|
||||
}
|
||||
if (!strcmp(pathdnamer, "/"))
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 599f1ec818d50ffc9690fea8c03b5fe278f30ed4 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Wed, 7 Dec 2022 09:19:29 +0100
|
||||
Subject: [PATCH] libselinux/restorecon: Fix memory leak - xattr_value
|
||||
|
||||
Fix memory leak introduced by commit
|
||||
9a04499cebedac3f585c0240e6cf68f786ae62b7
|
||||
libselinux: Ignore missing directories when -i is used
|
||||
|
||||
Error: RESOURCE_LEAK:
|
||||
selinux_restorecon.c:804: alloc_fn: Storage is returned from allocation function "malloc".
|
||||
selinux_restorecon.c:804: var_assign: Assigning: "xattr_value" = storage returned from "malloc(fc_digest_len)".
|
||||
selinux_restorecon.c:825: leaked_storage: Variable "xattr_value" going out of scope leaks the storage it points to.
|
||||
|
||||
Resolves: rhbz#2137965
|
||||
---
|
||||
libselinux/src/selinux_restorecon.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
|
||||
index 2ff73db6..b3702764 100644
|
||||
--- a/libselinux/src/selinux_restorecon.c
|
||||
+++ b/libselinux/src/selinux_restorecon.c
|
||||
@@ -822,6 +822,7 @@ int selinux_restorecon(const char *pathname_orig,
|
||||
free(basename_cpy);
|
||||
/* missing parent directory */
|
||||
if (flags.ignore_noent && errno == ENOENT) {
|
||||
+ free(xattr_value);
|
||||
return 0;
|
||||
}
|
||||
goto realpatherr;
|
||||
@@ -838,6 +839,7 @@ int selinux_restorecon(const char *pathname_orig,
|
||||
if (!pathdnamer) {
|
||||
free(basename_cpy);
|
||||
if (flags.ignore_noent && errno == ENOENT) {
|
||||
+ free(xattr_value);
|
||||
return 0;
|
||||
}
|
||||
goto realpatherr;
|
||||
--
|
||||
2.37.3
|
||||
|
24
STAGE1-libselinux
Normal file
24
STAGE1-libselinux
Normal file
@ -0,0 +1,24 @@
|
||||
# TLSFLAGS are set in order to avoid a bogus check in
|
||||
# libselinux/src/Makefile.
|
||||
srpm libselinux
|
||||
mcd $BUILDDIR/t-libselinux
|
||||
rsync -av $SRC/libselinux*/ ./
|
||||
# libselinux uses $prefix/include for both -I and *.pc, which
|
||||
# prevents cross compiling.
|
||||
sed 's@-I$(INCLUDEDIR)@@' < src/Makefile > src/Makefile.stage1
|
||||
mv src/Makefile.stage1 src/Makefile
|
||||
make $J \
|
||||
CC=${TARGET}-gcc \
|
||||
AS=${TARGET}-as \
|
||||
AR=${TARGET}-ar \
|
||||
STRIP=${TARGET}-strip \
|
||||
RANLIB=${TARGET}-ranlib \
|
||||
CFLAGS="" \
|
||||
TLSFLAGS="" \
|
||||
all
|
||||
ARGS="DESTDIR=${ROOTFS}"
|
||||
if [ "$SUFFIX" = "64" ]
|
||||
then
|
||||
ARGS="$ARGS LIBDIR=${ROOTFS}/usr/lib64 SHLIBDIR=${ROOTFS}/usr/lib64"
|
||||
fi
|
||||
make $J $ARGS install
|
321
bachradsusi.gpg
Normal file
321
bachradsusi.gpg
Normal file
@ -0,0 +1,321 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBE97JQcBEAC/aeBxbuToAJokMiVxtMVFoUMgCbcVQDB21YhMq4i5a/HDzFno
|
||||
qVPhQjGViGTKXQYR7SnT8CCfC3ggG7hqU0oaWKN3D003V6e/ivTJwMKrQRFqf5/A
|
||||
vN7ELulX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mr1RYcX0GkTcy
|
||||
iUskw+AoRz6svOfAWIDJY450wgD0MHZK08IfUUsYTGecoXcvWf/hITtv/Af5MpQA
|
||||
wuGEDltVDeu9EAu65SZlMkkMuQD1h3KOQjUJ6nY4a4M2CQ51ggs/c+vsemxsuYlG
|
||||
vSuhrfXt6HGD3dhsOEeyEvIcjjpP1Ku5mqrPhqXFli1swfohhYGGVO+fM7G3l7wF
|
||||
kAIi0B1szn0K13qRqBIwjnWL+orP1KLzvczCH6yD0FZY90CDdMtM0VB6AqT4BFh6
|
||||
5+ygjA4YiA7fFYBm8510ybUcNfzU3gUIJ5pF8MdGizO54tCPSK6U+iVRY4qfCFdu
|
||||
IiOZ7FUUn78VIxQUMYMrozy7kn/0PQZa7KKRbXJ8sg0sgrQapwpgUjdMwuYZPGGv
|
||||
1Jw5/+WUGWMbGxmlpHcEOmsPZpITH557M/kHyk9Ud0iKwciBI2mGLxiafCuLrUY4
|
||||
TknzOqbZgjdllcUG4cDBEQuBO/GSj1LUfg==
|
||||
=I8Dr
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
File diff suppressed because it is too large
Load Diff
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
229
libselinux.spec
Normal file
229
libselinux.spec
Normal file
@ -0,0 +1,229 @@
|
||||
%define ruby_inc %(pkg-config --cflags ruby)
|
||||
%define libsepolver 3.7-1
|
||||
|
||||
Summary: SELinux library and simple utilities
|
||||
Name: libselinux
|
||||
Version: 3.7
|
||||
Release: 5%{?dist}
|
||||
License: LicenseRef-Fedora-Public-Domain
|
||||
# https://github.com/SELinuxProject/selinux/wiki/Releases
|
||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.7/libselinux-3.7.tar.gz
|
||||
Source1: https://github.com/SELinuxProject/selinux/releases/download/3.7/libselinux-3.7.tar.gz.asc
|
||||
Source2: https://github.com/bachradsusi.gpg
|
||||
Source3: selinuxconlist.8
|
||||
Source4: selinuxdefcon.8
|
||||
|
||||
Url: https://github.com/SELinuxProject/selinux/wiki
|
||||
# $ git clone https://github.com/fedora-selinux/selinux.git
|
||||
# $ cd selinux
|
||||
# $ git format-patch -N 3.7 -- libselinux
|
||||
# $ i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
|
||||
# Patch list start
|
||||
Patch0001: 0001-Use-SHA-2-instead-of-SHA-1.patch
|
||||
Patch0002: 0002-libselinux-set-free-d-data-to-NULL.patch
|
||||
Patch0003: 0003-libselinux-restorecon-Include-selinux-label.h.patch
|
||||
Patch0004: 0004-libselinux-Fix-integer-comparison-issues-when-compil.patch
|
||||
Patch0005: 0005-libselinux-deprecate-security_disable-3.patch
|
||||
Patch0006: 0006-libselinux-fix-swig-bindings-for-4.3.0.patch
|
||||
Patch0007: 0007-libselinux-setexecfilecon-Remove-useless-rc-check.patch
|
||||
Patch0008: 0008-libselinux-matchpathcon-RESOURCE_LEAK-Variable-con.patch
|
||||
# Patch list end
|
||||
BuildRequires: gcc make
|
||||
BuildRequires: ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre2-devel
|
||||
BuildRequires: python3 python3-devel python3-setuptools python3-wheel python3-pip
|
||||
BuildRequires: systemd
|
||||
BuildRequires: gnupg2
|
||||
Requires: libsepol%{?_isa} >= %{libsepolver} pcre2
|
||||
Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138
|
||||
|
||||
%description
|
||||
Security-enhanced Linux is a feature of the Linux® kernel and a number
|
||||
of utilities with enhanced security functionality designed to add
|
||||
mandatory access controls to Linux. The Security-enhanced Linux
|
||||
kernel contains new architectural components originally developed to
|
||||
improve the security of the Flask operating system. These
|
||||
architectural components provide general support for the enforcement
|
||||
of many kinds of mandatory access control policies, including those
|
||||
based on the concepts of Type Enforcement®, Role-based Access
|
||||
Control, and Multi-level Security.
|
||||
|
||||
libselinux provides an API for SELinux applications to get and set
|
||||
process and file security contexts and to obtain security policy
|
||||
decisions. Required for any applications that use the SELinux API.
|
||||
|
||||
%package utils
|
||||
Summary: SELinux libselinux utilities
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description utils
|
||||
The libselinux-utils package contains the utilities
|
||||
|
||||
%package -n python3-libselinux
|
||||
Summary: SELinux python 3 bindings for libselinux
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-libselinux}
|
||||
# Remove before F30
|
||||
Provides: %{name}-python3 = %{version}-%{release}
|
||||
Provides: %{name}-python3%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-python3 < %{version}-%{release}
|
||||
|
||||
%description -n python3-libselinux
|
||||
The libselinux-python3 package contains python 3 bindings for developing
|
||||
SELinux applications.
|
||||
|
||||
%package ruby
|
||||
Summary: SELinux ruby bindings for libselinux
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Provides: ruby(selinux)
|
||||
|
||||
%description ruby
|
||||
The libselinux-ruby package contains the ruby bindings for developing
|
||||
SELinux applications.
|
||||
|
||||
%package devel
|
||||
Summary: Header files and libraries used to build SELinux
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: libsepol-devel%{?_isa} >= %{libsepolver}
|
||||
|
||||
%description devel
|
||||
The libselinux-devel package contains the libraries and header files
|
||||
needed for developing SELinux applications.
|
||||
|
||||
%package static
|
||||
Summary: Static libraries used to build SELinux
|
||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description static
|
||||
The libselinux-static package contains the static libraries
|
||||
needed for developing SELinux applications.
|
||||
|
||||
%prep
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%autosetup -p 2 -n libselinux-%{version}
|
||||
|
||||
%build
|
||||
export DISABLE_RPM="y"
|
||||
export USE_PCRE2="y"
|
||||
|
||||
%set_build_flags
|
||||
CFLAGS="$CFLAGS -fno-semantic-interposition"
|
||||
|
||||
# To support building the Python wrapper against multiple Python runtimes
|
||||
# Define a function, for how to perform a "build" of the python wrapper against
|
||||
# a specific runtime:
|
||||
BuildPythonWrapper() {
|
||||
BinaryName=$1
|
||||
|
||||
# Perform the build from the upstream Makefile:
|
||||
%make_build \
|
||||
PYTHON=$BinaryName \
|
||||
LIBDIR="%{_libdir}" \
|
||||
pywrap
|
||||
}
|
||||
|
||||
%make_build LIBDIR="%{_libdir}" swigify
|
||||
%make_build LIBDIR="%{_libdir}" all
|
||||
|
||||
BuildPythonWrapper %{__python3}
|
||||
|
||||
%make_build RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" rubywrap
|
||||
|
||||
%install
|
||||
InstallPythonWrapper() {
|
||||
BinaryName=$1
|
||||
|
||||
make \
|
||||
PYTHON=$BinaryName \
|
||||
DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" \
|
||||
SHLIBDIR="%{_lib}" BINDIR="%{_bindir}" \
|
||||
SBINDIR="%{_sbindir}" \
|
||||
LIBSEPOLA="%{_libdir}/libsepol.a" \
|
||||
install-pywrap
|
||||
}
|
||||
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_includedir}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
install -d -m 0755 %{buildroot}%{_rundir}/setrans
|
||||
echo "d %{_rundir}/setrans 0755 root root" > %{buildroot}%{_tmpfilesdir}/libselinux.conf
|
||||
|
||||
InstallPythonWrapper %{__python3}
|
||||
|
||||
%make_install LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" BINDIR="%{_bindir}" SBINDIR="%{_sbindir}"
|
||||
make DESTDIR="%{buildroot}" RUBYINSTALL=%{ruby_vendorarchdir} install-rubywrap
|
||||
|
||||
# Nuke the files we don't want to distribute
|
||||
rm -f %{buildroot}%{_sbindir}/compute_*
|
||||
rm -f %{buildroot}%{_sbindir}/deftype
|
||||
rm -f %{buildroot}%{_sbindir}/execcon
|
||||
rm -f %{buildroot}%{_sbindir}/getenforcemode
|
||||
rm -f %{buildroot}%{_sbindir}/getfilecon
|
||||
rm -f %{buildroot}%{_sbindir}/getpidcon
|
||||
rm -f %{buildroot}%{_sbindir}/mkdircon
|
||||
rm -f %{buildroot}%{_sbindir}/policyvers
|
||||
rm -f %{buildroot}%{_sbindir}/setfilecon
|
||||
rm -f %{buildroot}%{_sbindir}/selinuxconfig
|
||||
rm -f %{buildroot}%{_sbindir}/selinuxdisable
|
||||
rm -f %{buildroot}%{_sbindir}/getseuser
|
||||
rm -f %{buildroot}%{_sbindir}/togglesebool
|
||||
rm -f %{buildroot}%{_sbindir}/selinux_check_securetty_context
|
||||
mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon
|
||||
mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist
|
||||
install -d %{buildroot}%{_mandir}/man8/
|
||||
install -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man8/
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man8/
|
||||
rm -f %{buildroot}%{_mandir}/man8/togglesebool*
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_libdir}/libselinux.so.*
|
||||
%dir %{_rundir}/setrans/
|
||||
%{_tmpfilesdir}/libselinux.conf
|
||||
|
||||
%files utils
|
||||
%{_sbindir}/avcstat
|
||||
%{_sbindir}/getenforce
|
||||
%{_sbindir}/getpidprevcon
|
||||
%{_sbindir}/getpolicyload
|
||||
%{_sbindir}/getsebool
|
||||
%{_sbindir}/matchpathcon
|
||||
%{_sbindir}/sefcontext_compile
|
||||
%{_sbindir}/selinuxconlist
|
||||
%{_sbindir}/selinuxdefcon
|
||||
%{_sbindir}/selinuxexeccon
|
||||
%{_sbindir}/selinuxenabled
|
||||
%{_sbindir}/setenforce
|
||||
%{_sbindir}/selabel_digest
|
||||
%{_sbindir}/selabel_lookup
|
||||
%{_sbindir}/selabel_lookup_best_match
|
||||
%{_sbindir}/selabel_partial_match
|
||||
%{_sbindir}/selinux_check_access
|
||||
%{_sbindir}/selabel_get_digests_all_partial_matches
|
||||
%{_sbindir}/validatetrans
|
||||
%{_mandir}/man5/*
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libselinux.so
|
||||
%{_libdir}/pkgconfig/libselinux.pc
|
||||
%{_includedir}/selinux/
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files static
|
||||
%{_libdir}/libselinux.a
|
||||
|
||||
%files -n python3-libselinux
|
||||
%{python3_sitearch}/selinux/
|
||||
%{python3_sitearch}/selinux-%{version}*
|
||||
%{python3_sitearch}/_selinux*
|
||||
|
||||
%files ruby
|
||||
%{ruby_vendorarchdir}/selinux.so
|
||||
|
||||
%changelog
|
||||
|
||||
%autochangelog
|
7
plans/selinux.fmf
Normal file
7
plans/selinux.fmf
Normal file
@ -0,0 +1,7 @@
|
||||
summary: selinux tests - Tier 1 | libselinux
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/selinux
|
||||
filter: "tier: 1 | component: libselinux"
|
||||
execute:
|
||||
how: tmt
|
6
rubytest.rb
Normal file
6
rubytest.rb
Normal file
@ -0,0 +1,6 @@
|
||||
require 'selinux'
|
||||
print "selinux\n"
|
||||
print "Is selinux enabled? " + Selinux.is_selinux_enabled().to_s + "\n"
|
||||
print "Is selinux enforce? " + Selinux.security_getenforce().to_s + "\n"
|
||||
print "Setfscreatecon? " + Selinux.setfscreatecon("system_u:object_r:etc_t:s0").to_s + "\n"
|
||||
print "/etc -> " + Selinux.matchpathcon("/etc", 0)[1] + "\n"
|
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
||||
SHA512 (libselinux-3.7.tar.gz) = e949c20b606c50ad521b9592ce55ad6658e8c4b24d9838028f5aba0a4fc762b6d0d0d0d207f5bef7a2e41485e12d91382fa6090df27152dbb40071b273419352
|
||||
SHA512 (libselinux-3.7.tar.gz.asc) = 5be2fdc0deda62f240276413d1b95a57d467fe989ddb31b34f7743cbd03d69385ac3321af10c97aded119ae5f0a4d8ec5894f8647a45f2902c0e8ff1e96787aa
|
Loading…
Reference in New Issue
Block a user