update to 3.1
This commit is contained in:
parent
77b573c12c
commit
7fdd7f7c45
@ -1,29 +0,0 @@
|
||||
From daa00b28998af811f92aa821090f0ac2dd71f2bc Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Iooss <nicolas.iooss@m4x.org>
|
||||
Date: Sat, 26 May 2018 18:15:07 +0200
|
||||
Subject: [PATCH] checkpolicy: destroy the class datum if it fails to
|
||||
initialize
|
||||
|
||||
require_class() allocate memory for its variable "class_datum_t *datum"
|
||||
and calls symtab_init(&datum->permissions, PERM_SYMTAB_SIZE). If this
|
||||
second call fails, datum is not freed.
|
||||
|
||||
Fix this memory leak.
|
||||
|
||||
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
|
||||
---
|
||||
module_compiler.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/module_compiler.c b/module_compiler.c
|
||||
index 155702f2..ada7cb2a 100644
|
||||
--- a/module_compiler.c
|
||||
+++ b/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 =
|
||||
Binary file not shown.
BIN
checkpolicy-3.1.tar.gz
Normal file
BIN
checkpolicy-3.1.tar.gz
Normal file
Binary file not shown.
@ -1,14 +1,13 @@
|
||||
Name: checkpolicy
|
||||
Version: 2.8
|
||||
Release: 6
|
||||
Version: 3.1
|
||||
Release: 1
|
||||
Summary: SELinux policy compiler
|
||||
License: GPLv2
|
||||
URL: https://github.com/SELinuxProject/selinux
|
||||
Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/checkpolicy-2.8.tar.gz
|
||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/20200710/checkpolicy-3.1.tar.gz
|
||||
|
||||
Patch6000: 0002-checkpolicy-destroy-the-class-datum-if-it-fails-to-initialize.patch
|
||||
BuildRequires: gcc byacc bison flex flex-static libsepol-static libselinux-devel git
|
||||
|
||||
BuildRequires: gcc byacc bison flex flex-static libsepol-static >= 2.8-1 libselinux-devel >= 2.8-1 git
|
||||
Conflicts: selinux-policy-base < 3.13.1-138
|
||||
|
||||
%description
|
||||
@ -55,6 +54,9 @@ install test/dispol %{buildroot}%{_bindir}/sedispol
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.1-1
|
||||
- update to 3.1
|
||||
|
||||
* Sat Sep 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8-6
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user