import checkpolicy-2.9-1.el8

This commit is contained in:
CentOS Sources 2019-11-05 15:20:52 -05:00 committed by Andrew Lukoshko
parent b0dc44f6c1
commit 3b88ccfc1e
4 changed files with 18 additions and 43 deletions

View File

@ -1 +1 @@
f2dd3fe748373bdd9e5eed08d7a447a9f11d02ab SOURCES/checkpolicy-2.8.tar.gz
0529cd309f3a24279a7251ab2e6208b1ed6a6c3e SOURCES/checkpolicy-2.9.tar.gz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/checkpolicy-2.8.tar.gz
SOURCES/checkpolicy-2.9.tar.gz

View File

@ -1,28 +0,0 @@
diff --git checkpolicy-2.8/module_compiler.c checkpolicy-2.8/module_compiler.c
index 155702f..ada7cb2 100644
--- checkpolicy-2.8/module_compiler.c
+++ checkpolicy-2.8/module_compiler.c
@@ -802,6 +802,7 @@ int require_class(int pass)
if ((datum = calloc(1, sizeof(*datum))) == NULL ||
symtab_init(&datum->permissions, PERM_SYMTAB_SIZE)) {
yyerror("Out of memory!");
+ class_datum_destroy(datum);
return -1;
}
ret =
diff --git checkpolicy-2.8/policy_define.c checkpolicy-2.8/policy_define.c
index d8788a6..ece10e7 100644
--- checkpolicy-2.8/policy_define.c
+++ checkpolicy-2.8/policy_define.c
@@ -1107,6 +1107,11 @@ int define_level(void)
(cat_datum_t *) hashtab_search(policydbp->p_cats.
table,
(hashtab_key_t) id);
+ if (!cdatum) {
+ yyerror2("unknown category %s", id);
+ free(id);
+ return -1;
+ }
range_start = range_end = cdatum->s.value - 1;
}

View File

@ -1,17 +1,14 @@
%define libselinuxver 2.8-1
%define libsepolver 2.8-1
%define libselinuxver 2.9-1
%define libsepolver 2.9-1
Summary: SELinux policy compiler
Name: checkpolicy
Version: 2.8
Release: 2%{?dist}
Version: 2.9
Release: 1%{?dist}
License: GPLv2
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/checkpolicy-2.8.tar.gz
# download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh
# run:
# $ VERSION=2.8 ./make-fedora-selinux-patch.sh checkpolicy
# HEAD 2b4b29f00e5f0746ff10e09686a23c6e96a11d5f
Patch1: checkpolicy-fedora.patch
Source: https://github.com/SELinuxProject/selinux/releases/download/20190315/checkpolicy-2.9.tar.gz
# git format-patch 20190315 -- checkpolicy
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
Conflicts: selinux-policy-base < 3.13.1-138
BuildRequires: gcc
BuildRequires: byacc bison flex flex-static libsepol-static >= %{libsepolver} libselinux-devel >= %{libselinuxver}
@ -34,10 +31,11 @@ Only required for building policies.
%autosetup -p 1 -n checkpolicy-%{version}
%build
make clean
make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" LDFLAGS="$RPM_LD_FLAGS"
%set_build_flags
make LIBDIR="%{_libdir}"
cd test
make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" LDFLAGS="$RPM_LD_FLAGS"
make LIBDIR="%{_libdir}"
%install
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
@ -52,10 +50,15 @@ install test/dispol ${RPM_BUILD_ROOT}%{_bindir}/sedispol
%{_bindir}/checkmodule
%{_mandir}/man8/checkpolicy.8.gz
%{_mandir}/man8/checkmodule.8.gz
%{_mandir}/ru/man8/checkpolicy.8.gz
%{_mandir}/ru/man8/checkmodule.8.gz
%{_bindir}/sedismod
%{_bindir}/sedispol
%changelog
* Mon Mar 25 2019 Petr Lautrbach <plautrba@redhat.com> - 2.9-1
- SELinux userspace 2.9 release
* Sun Dec 16 2018 Petr Lautrbach <plautrba@redhat.com> - 2.8-2
- destroy the class datum if it fails to initialize