From 6b4592388fb3aa9b73ac46771a25134fa220b893 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 30 Jan 2019 09:51:37 +0100 Subject: [PATCH] SELinux userspace 2.9-rc1 release candidate --- .gitignore | 1 + libsepol-fedora.patch | 78 +++++++++++++------------------------------ libsepol.spec | 15 +++++---- sources | 2 +- 4 files changed, 35 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index f845e25..511b346 100644 --- a/.gitignore +++ b/.gitignore @@ -171,3 +171,4 @@ libsepol-2.0.41.tgz /libsepol-2.8-rc1.tar.gz /libsepol-2.8-rc3.tar.gz /libsepol-2.8.tar.gz +/libsepol-2.9-rc1.tar.gz diff --git a/libsepol-fedora.patch b/libsepol-fedora.patch index 40f0ccc..0c60828 100644 --- a/libsepol-fedora.patch +++ b/libsepol-fedora.patch @@ -1,7 +1,7 @@ -diff --git libsepol-2.8/cil/src/cil_binary.c libsepol-2.8/cil/src/cil_binary.c +diff --git libsepol-2.9-rc1/cil/src/cil_binary.c libsepol-2.9-rc1/cil/src/cil_binary.c index 0cc6eeb..a645c95 100644 ---- libsepol-2.8/cil/src/cil_binary.c -+++ libsepol-2.8/cil/src/cil_binary.c +--- libsepol-2.9-rc1/cil/src/cil_binary.c ++++ libsepol-2.9-rc1/cil/src/cil_binary.c @@ -912,6 +912,8 @@ int cil_sensalias_to_policydb(policydb_t *pdb, struct cil_alias *cil_alias) key = cil_strdup(cil_alias->datum.fqn); rc = symtab_insert(pdb, SYM_LEVELS, key, sepol_alias, SCOPE_DECL, 0, NULL); @@ -61,10 +61,10 @@ index 0cc6eeb..a645c95 100644 cil_log(CIL_ERR,"Failed to create CIL class-permissions from sepol values\n"); return NULL; } -diff --git libsepol-2.8/cil/src/cil_resolve_ast.c libsepol-2.8/cil/src/cil_resolve_ast.c -index 0225924..3ea070c 100644 ---- libsepol-2.8/cil/src/cil_resolve_ast.c -+++ libsepol-2.8/cil/src/cil_resolve_ast.c +diff --git libsepol-2.9-rc1/cil/src/cil_resolve_ast.c libsepol-2.9-rc1/cil/src/cil_resolve_ast.c +index fb9d917..91187ed 100644 +--- libsepol-2.9-rc1/cil/src/cil_resolve_ast.c ++++ libsepol-2.9-rc1/cil/src/cil_resolve_ast.c @@ -1522,6 +1522,7 @@ int cil_resolve_sidorder(struct cil_tree_node *current, void *extra_args) rc = cil_resolve_name(current, (char *)curr->data, CIL_SYM_SIDS, extra_args, &datum); if (rc != SEPOL_OK) { @@ -116,7 +116,7 @@ index 0225924..3ea070c 100644 cil_tree_node_init(&range_node); @@ -2925,6 +2932,7 @@ int cil_resolve_call1(struct cil_tree_node *current, void *extra_args) if (rc != SEPOL_OK) { - cil_log(CIL_ERR, "Failed to create anonymous ip address, rc; %d\n", rc); + cil_log(CIL_ERR, "Failed to create anonymous ip address, rc: %d\n", rc); cil_destroy_ipaddr(ipaddr); + cil_destroy_args(new_arg); goto exit; @@ -138,10 +138,10 @@ index 0225924..3ea070c 100644 rc = SEPOL_ERR; goto exit; } -diff --git libsepol-2.8/cil/src/cil_symtab.c libsepol-2.8/cil/src/cil_symtab.c +diff --git libsepol-2.9-rc1/cil/src/cil_symtab.c libsepol-2.9-rc1/cil/src/cil_symtab.c index 3769979..2970b86 100644 ---- libsepol-2.8/cil/src/cil_symtab.c -+++ libsepol-2.8/cil/src/cil_symtab.c +--- libsepol-2.9-rc1/cil/src/cil_symtab.c ++++ libsepol-2.9-rc1/cil/src/cil_symtab.c @@ -185,6 +185,7 @@ int cil_complex_symtab_insert(struct cil_complex_symtab *symtab, ckey->key2 == curr->ckey->key2 && ckey->key3 == curr->ckey->key3 && @@ -150,23 +150,10 @@ index 3769979..2970b86 100644 return SEPOL_EEXIST; } -diff --git libsepol-2.8/include/sepol/errcodes.h libsepol-2.8/include/sepol/errcodes.h -index 0136564..6e9ff31 100644 ---- libsepol-2.8/include/sepol/errcodes.h -+++ libsepol-2.8/include/sepol/errcodes.h -@@ -12,7 +12,7 @@ extern "C" { - #define SEPOL_OK 0 - - /* These first error codes are defined for compatibility with -- * previous version of libsepol. In the future, custome error -+ * previous version of libsepol. In the future, custom error - * codes that don't map to system error codes should be defined - * outside of the range of system error codes. - */ -diff --git libsepol-2.8/src/expand.c libsepol-2.8/src/expand.c +diff --git libsepol-2.9-rc1/src/expand.c libsepol-2.9-rc1/src/expand.c index 6f1b235..125a680 100644 ---- libsepol-2.8/src/expand.c -+++ libsepol-2.8/src/expand.c +--- libsepol-2.9-rc1/src/expand.c ++++ libsepol-2.9-rc1/src/expand.c @@ -1451,6 +1451,7 @@ static int expand_filename_trans(expand_state_t *state, filename_trans_rule_t *r new_trans->name = strdup(cur_rule->name); if (!new_trans->name) { @@ -184,11 +171,11 @@ index 6f1b235..125a680 100644 return -1; } otype->otype = mapped_otype; -diff --git libsepol-2.8/src/kernel_to_cil.c libsepol-2.8/src/kernel_to_cil.c -index b1eb66d..8d58e04 100644 ---- libsepol-2.8/src/kernel_to_cil.c -+++ libsepol-2.8/src/kernel_to_cil.c -@@ -2019,6 +2019,8 @@ static int write_cond_av_list_to_cil(FILE *out, struct policydb *pdb, cond_av_li +diff --git libsepol-2.9-rc1/src/kernel_to_cil.c libsepol-2.9-rc1/src/kernel_to_cil.c +index 63e4d48..ec82f59 100644 +--- libsepol-2.9-rc1/src/kernel_to_cil.c ++++ libsepol-2.9-rc1/src/kernel_to_cil.c +@@ -2031,6 +2031,8 @@ static int write_cond_av_list_to_cil(FILE *out, struct policydb *pdb, cond_av_li return 0; exit: @@ -197,28 +184,11 @@ index b1eb66d..8d58e04 100644 return rc; } -diff --git libsepol-2.8/src/kernel_to_common.c libsepol-2.8/src/kernel_to_common.c -index 342bc3c..19a8c0e 100644 ---- libsepol-2.8/src/kernel_to_common.c -+++ libsepol-2.8/src/kernel_to_common.c -@@ -80,10 +80,12 @@ static char *create_str_helper(const char *fmt, int num, va_list vargs) - goto exit; - } - -+ va_end(vargs2); - return str; - - exit: - free(str); -+ va_end(vargs2); - return NULL; - } - -diff --git libsepol-2.8/src/kernel_to_conf.c libsepol-2.8/src/kernel_to_conf.c -index 9540520..a74e6c4 100644 ---- libsepol-2.8/src/kernel_to_conf.c -+++ libsepol-2.8/src/kernel_to_conf.c -@@ -1987,6 +1987,8 @@ static int write_cond_av_list_to_conf(FILE *out, struct policydb *pdb, cond_av_l +diff --git libsepol-2.9-rc1/src/kernel_to_conf.c libsepol-2.9-rc1/src/kernel_to_conf.c +index 215d940..afadca6 100644 +--- libsepol-2.9-rc1/src/kernel_to_conf.c ++++ libsepol-2.9-rc1/src/kernel_to_conf.c +@@ -1999,6 +1999,8 @@ static int write_cond_av_list_to_conf(FILE *out, struct policydb *pdb, cond_av_l return 0; exit: diff --git a/libsepol.spec b/libsepol.spec index 08c8e2a..9ce935e 100644 --- a/libsepol.spec +++ b/libsepol.spec @@ -1,14 +1,14 @@ Summary: SELinux binary policy manipulation library Name: libsepol -Version: 2.8 -Release: 3%{?dist} +Version: 2.9 +Release: 0.rc1.1%{?dist} License: LGPLv2+ -Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/libsepol-2.8.tar.gz +Source0: https://github.com/SELinuxProject/selinux/releases/download/20190125/libsepol-2.9-rc1.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 libsepol -# HEAD https://github.com/fedora-selinux/selinux/commit/decd49caec76a87817686f84716503151cf2be5d -# Patch1: libsepol-fedora.patch +# HEAD https://github.com/fedora-selinux/selinux/commit/a69fe203e41c9493e13ffafa51908d17da6fa7a2 +Patch1: libsepol-fedora.patch URL: https://github.com/SELinuxProject/selinux/wiki BuildRequires: gcc BuildRequires: flex @@ -46,7 +46,7 @@ The libsepol-static package contains the static libraries and header files needed for developing applications that manipulate binary policies. %prep -%autosetup -p 1 -n libsepol-%{version} +%autosetup -p 1 -n libsepol-%{version}-rc1 # sparc64 is an -fPIC arch, so we need to fix it here %ifarch sparc64 @@ -94,6 +94,9 @@ exit 0 %{_libdir}/libsepol.so.1 %changelog +* Fri Jan 25 2019 Petr Lautrbach - 2.9-0.rc1.1 +- SELinux userspace 2.9-rc1 release + * Tue Nov 13 2018 Petr Lautrbach - 2.8-3 - Fix RESOURCE_LEAK coverity scan defects diff --git a/sources b/sources index 36cd0d4..ea8d242 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libsepol-2.8.tar.gz) = dd065886819a265cd4f2751ac231a7baa5d7c7735844f3557d5c7e1feb06d4b4d03433d26ff6419b426caf90b69771ee743850fe45d36bc0201cadb86c62189c +SHA512 (libsepol-2.9-rc1.tar.gz) = a3ac2bc1cdace0c0a67f23773f44d866103328d3fecfc17f8038a41ada6e5796cef898118632c081dc16a4b0245c5b6f56b8fa26deb21d5c3fef492d6ee46496