libsepol-3.4-1.1

Bring back POLICYDB_CAPABILITY_* constants - they were removed by the
commit 0d84ebcbc475d ("libsepol: Shorten the policy capability enum
names") but they might be already used somewhere in code deployed on
RHEL 9.0

Resolves: rhbz#2079276
This commit is contained in:
Petr Lautrbach 2022-05-23 13:47:25 +02:00
parent 9bb4d30da6
commit 1088ff0aa1
2 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,43 @@
From 0594b9bdeac8e78aacd737e95ce0f74a467d1c43 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <plautrba@redhat.com>
Date: Mon, 23 May 2022 12:25:58 +0200
Subject: [PATCH] libsepol: Bring back POLICYDB_CAPABILITY_* constants
Content-type: text/plain
They were removed by the commit 0d84ebcbc475d ("libsepol: Shorten the
policy capability enum names") but they might be used somewhere in code
deployed on RHEL 9.0
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
libsepol/include/sepol/policydb/polcaps.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libsepol/include/sepol/policydb/polcaps.h b/libsepol/include/sepol/policydb/polcaps.h
index f5e32e60975d..e568733b3a33 100644
--- a/libsepol/include/sepol/policydb/polcaps.h
+++ b/libsepol/include/sepol/policydb/polcaps.h
@@ -19,6 +19,20 @@ enum {
};
#define POLICYDB_CAP_MAX (__POLICYDB_CAP_MAX - 1)
+/* legacy constants from past to preserve backward compatibility */
+enum {
+ POLICYDB_CAPABILITY_NETPEER = POLICYDB_CAP_NETPEER,
+ POLICYDB_CAPABILITY_OPENPERM = POLICYDB_CAP_OPENPERM,
+ POLICYDB_CAPABILITY_EXTSOCKCLASS = POLICYDB_CAP_EXTSOCKCLASS,
+ POLICYDB_CAPABILITY_ALWAYSNETWORK = POLICYDB_CAP_ALWAYSNETWORK,
+ POLICYDB_CAPABILITY_CGROUPSECLABEL = POLICYDB_CAP_CGROUPSECLABEL,
+ POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION = POLICYDB_CAP_NNP_NOSUID_TRANSITION,
+ POLICYDB_CAPABILITY_GENFS_SECLABEL_SYMLINKS = POLICYDB_CAP_GENFS_SECLABEL_SYMLINKS,
+ POLICYDB_CAPABILITY_IOCTL_SKIP_CLOEXEC = POLICYDB_CAP_IOCTL_SKIP_CLOEXEC,
+ __POLICYDB_CAPABILITY_MAX = __POLICYDB_CAP_MAX
+};
+#define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAP_MAX - 1)
+
/* Convert a capability name to number. */
extern int sepol_polcap_getnum(const char *name);
--
2.36.1

View File

@ -1,7 +1,7 @@
Summary: SELinux binary policy manipulation library
Name: libsepol
Version: 3.4
Release: 1%{?dist}
Release: 1.1%{?dist}
License: LGPLv2+
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.4/libsepol-3.4.tar.gz
URL: https://github.com/SELinuxProject/selinux/wiki
@ -10,6 +10,7 @@ URL: https://github.com/SELinuxProject/selinux/wiki
# $ git format-patch -N libsepol-3.4 -- libsepol
# $ i=1; for j in 0*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
# Patch list start
Patch0001: 0001-libsepol-Bring-back-POLICYDB_CAPABILITY_-constants.patch
# Patch list end
BuildRequires: make
BuildRequires: gcc
@ -106,7 +107,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_mandir}/ru/man8
%{_mandir}/man8/chkcon.8.gz
%changelog
* Thu May 19 2022 Petr Lautrbach <plautrba@redhat.com> - 3.4-1
* Mon May 23 2022 Petr Lautrbach <plautrba@redhat.com> - 3.4-1.1
- SELinux userspace 3.4 release
* Thu Nov 11 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3-2