Accepting request 832093 from security:SELinux

please stage with updated gcc to prevent build failures

OBS-URL: https://build.opensuse.org/request/show/832093
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libsepol?expand=0&rev=46
This commit is contained in:
Dominique Leuenberger 2020-10-06 15:07:17 +00:00 committed by Git OBS Bridge
commit cc7c105f22
5 changed files with 18 additions and 63 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5b7ae1881909f1048b06f7a0c364c5c8a86ec12e0ec76e740fe9595a6033eb79
size 473864

3
libsepol-3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae6778d01443fdd38cd30eeee846494e19f4d407b09872580372f4aa4bf8a3cc
size 473842

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Jul 14 08:39:58 UTC 2020 - Johannes Segitz <jsegitz@suse.com>
- Update to version 3.1
* Add support for new polcap genfs_seclabel_symlinks
* Initialize the multiple_decls field of the cil db
* Return error when identifier declared as both type and attribute
* Write CIL default MLS rules on separate lines
* Sort portcon rules consistently
* Remove leftovers of cil_mem_error_handler
* Drop remove_cil_mem_error_handler.patch, is included
-------------------------------------------------------------------
Mon Apr 27 19:35:18 UTC 2020 - Martin Liška <mliska@suse.cz>

View File

@ -17,15 +17,14 @@
Name: libsepol
Version: 3.0
Version: 3.1
Release: 0
Summary: SELinux binary policy manipulation library
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/SELinuxProject/selinux/wiki/Releases
Source: https://github.com/SELinuxProject/selinux/releases/download/20191204/%{name}-%{version}.tar.gz
Source: https://github.com/SELinuxProject/selinux/releases/download/20200710/%{name}-%{version}.tar.gz
Source2: baselibs.conf
Patch1: remove_cil_mem_error_handler.patch
BuildRequires: flex
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -87,12 +86,10 @@ policies.
%prep
%setup -q
%patch1 -p1
%build
%define _lto_cflags %{nil}
%global optflags %{optflags} -fcommon
export CFLAGS="%{optflags}"
export CFLAGS="%{optflags} -fcommon"
make %{?_smp_mflags}
%install

View File

@ -1,54 +0,0 @@
commit 3d32fc24d6aff360a538c63dad08ca5c957551b0
Author: Ondrej Mosnacek <omosnace@redhat.com>
Date: Thu Jan 23 13:57:14 2020 +0100
libsepol: remove leftovers of cil_mem_error_handler
Commit 4459d635b8f1 ("libsepol: Remove cil_mem_error_handler() function
pointer") replaced cil_mem_error_handler usage with inline contents of
the default handler. However, it left over the header declaration and
two callers. Convert these as well and remove the header declaration.
This also fixes a build failure with -fno-common.
Fixes: 4459d635b8f1 ("libsepol: Remove cil_mem_error_handler() function pointer")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
diff --git a/libsepol/cil/src/cil_mem.h b/libsepol/cil/src/cil_mem.h
index 902ce131..794f02a3 100644
--- a/cil/src/cil_mem.h
+++ b/cil/src/cil_mem.h
@@ -36,7 +36,6 @@ void *cil_calloc(size_t num_elements, size_t element_size);
void *cil_realloc(void *ptr, size_t size);
char *cil_strdup(const char *str);
int cil_asprintf(char **strp, const char *fmt, ...);
-void (*cil_mem_error_handler)(void);
#endif /* CIL_MEM_H_ */
diff --git a/libsepol/cil/src/cil_strpool.c b/libsepol/cil/src/cil_strpool.c
index 97d4c4b9..2598bbf3 100644
--- a/cil/src/cil_strpool.c
+++ b/cil/src/cil_strpool.c
@@ -80,8 +80,8 @@ char *cil_strpool_add(const char *str)
int rc = hashtab_insert(cil_strpool_tab, (hashtab_key_t)strpool_ref->str, strpool_ref);
if (rc != SEPOL_OK) {
pthread_mutex_unlock(&cil_strpool_mutex);
- (*cil_mem_error_handler)();
- pthread_mutex_lock(&cil_strpool_mutex);
+ cil_log(CIL_ERR, "Failed to allocate memory\n");
+ exit(1);
}
}
@@ -104,8 +104,8 @@ void cil_strpool_init(void)
cil_strpool_tab = hashtab_create(cil_strpool_hash, cil_strpool_compare, CIL_STRPOOL_TABLE_SIZE);
if (cil_strpool_tab == NULL) {
pthread_mutex_unlock(&cil_strpool_mutex);
- (*cil_mem_error_handler)();
- return;
+ cil_log(CIL_ERR, "Failed to allocate memory\n");
+ exit(1);
}
}
cil_strpool_readers++;