From patchwork Wed Sep 30 14:50:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Lautrbach X-Patchwork-Id: 11809289 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5220D6CA for ; Wed, 30 Sep 2020 14:50:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2EEC7206FC for ; Wed, 30 Sep 2020 14:50:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Xu1T3DR4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729767AbgI3Ous (ORCPT ); Wed, 30 Sep 2020 10:50:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30933 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgI3Ous (ORCPT ); Wed, 30 Sep 2020 10:50:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601477446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5cufIpefhPQbQm0t95FPPPwS/ipoAsyntjIs9cZfU70=; b=Xu1T3DR4U1MBR7DIXpP4ZCSTBridoQbReZTYF2tIM6VvtCn/mgC5Ni+hkbvdTGtNkq/JP3 XT2XC1wiSzj66UJXxai9LI5Mggs6ncO21YvutbTqSY+fCCKVfSPRhdmPWOyEZ2KOYMF+D6 VnWpSpBHimOZvPSUfgTQF+8zvZDa3qQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-95-Vig-jaOdOUeV-9JXvFAKDw-1; Wed, 30 Sep 2020 10:50:44 -0400 X-MC-Unique: Vig-jaOdOUeV-9JXvFAKDw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 800E68030C6 for ; Wed, 30 Sep 2020 14:50:43 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB1265D9D3; Wed, 30 Sep 2020 14:50:42 +0000 (UTC) From: Petr Lautrbach To: selinux@vger.kernel.org Cc: Petr Lautrbach Subject: [PATCH 1/4] libsepol: Get rid of the old and duplicated symbols Date: Wed, 30 Sep 2020 16:50:28 +0200 Message-Id: <20200930145031.910190-1-plautrba@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Versioned duplicate symbols cause problems for LTO. These symbols were introduced during the CIL integration several releases ago and were only consumed by other SELinux userspace components. Signed-off-by: Petr Lautrbach --- libsepol/cil/src/cil.c | 84 ------------------------------------ libsepol/src/libsepol.map.in | 5 --- 2 files changed, 89 deletions(-) diff --git a/libsepol/cil/src/cil.c b/libsepol/cil/src/cil.c index a3c6a2934c72..95bdb5e5854c 100644 --- a/libsepol/cil/src/cil.c +++ b/libsepol/cil/src/cil.c @@ -51,27 +51,6 @@ #include "cil_policy.h" #include "cil_strpool.h" -#if !defined(SHARED) || defined(ANDROID) || defined(__APPLE__) - #define DISABLE_SYMVER 1 -#endif - -#ifndef DISABLE_SYMVER -asm(".symver cil_build_policydb_pdb, cil_build_policydb@LIBSEPOL_1.0"); -asm(".symver cil_build_policydb_create_pdb, cil_build_policydb@@LIBSEPOL_1.1"); - -asm(".symver cil_compile_pdb, cil_compile@LIBSEPOL_1.0"); -asm(".symver cil_compile_nopdb, cil_compile@@LIBSEPOL_1.1"); - -asm(".symver cil_userprefixes_to_string_pdb, cil_userprefixes_to_string@LIBSEPOL_1.0"); -asm(".symver cil_userprefixes_to_string_nopdb, cil_userprefixes_to_string@@LIBSEPOL_1.1"); - -asm(".symver cil_selinuxusers_to_string_pdb, cil_selinuxusers_to_string@LIBSEPOL_1.0"); -asm(".symver cil_selinuxusers_to_string_nopdb, cil_selinuxusers_to_string@@LIBSEPOL_1.1"); - -asm(".symver cil_filecons_to_string_pdb, cil_filecons_to_string@LIBSEPOL_1.0"); -asm(".symver cil_filecons_to_string_nopdb, cil_filecons_to_string@@LIBSEPOL_1.1"); -#endif - int cil_sym_sizes[CIL_SYM_ARRAY_NUM][CIL_SYM_NUM] = { {64, 64, 64, 1 << 13, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}, {64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}, @@ -549,11 +528,7 @@ exit: return rc; } -#ifdef DISABLE_SYMVER int cil_compile(struct cil_db *db) -#else -int cil_compile_nopdb(struct cil_db *db) -#endif { int rc = SEPOL_ERR; @@ -597,33 +572,7 @@ exit: return rc; } -#ifndef DISABLE_SYMVER -int cil_compile_pdb(struct cil_db *db, __attribute__((unused)) sepol_policydb_t *sepol_db) -{ - return cil_compile_nopdb(db); -} - -int cil_build_policydb_pdb(cil_db_t *db, sepol_policydb_t *sepol_db) -{ - int rc; - - cil_log(CIL_INFO, "Building policy binary\n"); - rc = cil_binary_create_allocated_pdb(db, sepol_db); - if (rc != SEPOL_OK) { - cil_log(CIL_ERR, "Failed to generate binary\n"); - goto exit; - } - -exit: - return rc; -} -#endif - -#ifdef DISABLE_SYMVER int cil_build_policydb(cil_db_t *db, sepol_policydb_t **sepol_db) -#else -int cil_build_policydb_create_pdb(cil_db_t *db, sepol_policydb_t **sepol_db) -#endif { int rc; @@ -1371,11 +1320,7 @@ const char * cil_node_to_string(struct cil_tree_node *node) return ""; } -#ifdef DISABLE_SYMVER int cil_userprefixes_to_string(struct cil_db *db, char **out, size_t *size) -#else -int cil_userprefixes_to_string_nopdb(struct cil_db *db, char **out, size_t *size) -#endif { int rc = SEPOL_ERR; size_t str_len = 0; @@ -1420,13 +1365,6 @@ exit: } -#ifndef DISABLE_SYMVER -int cil_userprefixes_to_string_pdb(struct cil_db *db, __attribute__((unused)) sepol_policydb_t *sepol_db, char **out, size_t *size) -{ - return cil_userprefixes_to_string_nopdb(db, out, size); -} -#endif - static int cil_cats_to_ebitmap(struct cil_cats *cats, struct ebitmap* cats_ebitmap) { int rc = SEPOL_ERR; @@ -1614,11 +1552,7 @@ static int __cil_level_to_string(struct cil_level *lvl, char *out) return str_tmp - out; } -#ifdef DISABLE_SYMVER int cil_selinuxusers_to_string(struct cil_db *db, char **out, size_t *size) -#else -int cil_selinuxusers_to_string_nopdb(struct cil_db *db, char **out, size_t *size) -#endif { size_t str_len = 0; int buf_pos = 0; @@ -1675,18 +1609,7 @@ int cil_selinuxusers_to_string_nopdb(struct cil_db *db, char **out, size_t *size return SEPOL_OK; } -#ifndef DISABLE_SYMVER -int cil_selinuxusers_to_string_pdb(struct cil_db *db, __attribute__((unused)) sepol_policydb_t *sepol_db, char **out, size_t *size) -{ - return cil_selinuxusers_to_string_nopdb(db, out, size); -} -#endif - -#ifdef DISABLE_SYMVER int cil_filecons_to_string(struct cil_db *db, char **out, size_t *size) -#else -int cil_filecons_to_string_nopdb(struct cil_db *db, char **out, size_t *size) -#endif { uint32_t i = 0; int buf_pos = 0; @@ -1804,13 +1727,6 @@ int cil_filecons_to_string_nopdb(struct cil_db *db, char **out, size_t *size) return SEPOL_OK; } -#ifndef DISABLE_SYMVER -int cil_filecons_to_string_pdb(struct cil_db *db, __attribute__((unused)) sepol_policydb_t *sepol_db, char **out, size_t *size) -{ - return cil_filecons_to_string_nopdb(db, out, size); -} -#endif - void cil_set_disable_dontaudit(struct cil_db *db, int disable_dontaudit) { db->disable_dontaudit = disable_dontaudit; diff --git a/libsepol/src/libsepol.map.in b/libsepol/src/libsepol.map.in index f08c2a861693..98da9789b71b 100644 --- a/libsepol/src/libsepol.map.in +++ b/libsepol/src/libsepol.map.in @@ -1,19 +1,14 @@ LIBSEPOL_1.0 { global: cil_add_file; - cil_build_policydb; - cil_compile; cil_db_destroy; cil_db_init; - cil_filecons_to_string; - cil_selinuxusers_to_string; cil_set_disable_dontaudit; cil_set_disable_neverallow; cil_set_handle_unknown; cil_set_log_handler; cil_set_log_level; cil_set_preserve_tunables; - cil_userprefixes_to_string; expand_module_avrules; sepol_bool_clone; sepol_bool_compare; From patchwork Wed Sep 30 14:50:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Lautrbach X-Patchwork-Id: 11809293 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 601DA13B2 for ; Wed, 30 Sep 2020 14:51:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40DF42076B for ; Wed, 30 Sep 2020 14:51:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="P0tmUsPw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730577AbgI3OvB (ORCPT ); Wed, 30 Sep 2020 10:51:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55348 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgI3OvB (ORCPT ); Wed, 30 Sep 2020 10:51:01 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601477461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/uhz8Obwbc80m1d5juvyFvNoIkdCOUX41JdoLt2gINY=; b=P0tmUsPwBLTBs35oloStKRNhtDzZoOgdp3cav8INLq8zBPLOrM1pym44040wYfZWiXRh/Y llwd3B1J52MZBIctt0yVKd4TU7FzD0GJ/IWvYPO8lBHwKW9POcEP5NbvKisBlb95emVf4p 3it1A6bu/T5q3MyWBoh7PiHTGDBN1pI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-UHZ2ZiLUObK75fmLk_kPpw-1; Wed, 30 Sep 2020 10:50:45 -0400 X-MC-Unique: UHZ2ZiLUObK75fmLk_kPpw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 98D37A7420 for ; Wed, 30 Sep 2020 14:50:44 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5C775D9D3; Wed, 30 Sep 2020 14:50:43 +0000 (UTC) From: Petr Lautrbach To: selinux@vger.kernel.org Cc: Petr Lautrbach Subject: [PATCH 2/4] libsepol: Bump libsepol.so version Date: Wed, 30 Sep 2020 16:50:29 +0200 Message-Id: <20200930145031.910190-2-plautrba@redhat.com> In-Reply-To: <20200930145031.910190-1-plautrba@redhat.com> References: <20200930145031.910190-1-plautrba@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org It's due to the previous ABI incompatible change. Signed-off-by: Petr Lautrbach --- libselinux/src/load_policy.c | 2 +- libsepol/src/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c index 2aea826f863e..0034fa53d6e6 100644 --- a/libselinux/src/load_policy.c +++ b/libselinux/src/load_policy.c @@ -76,7 +76,7 @@ int selinux_mkload_policy(int preservebools __attribute__((unused))) #ifdef SHARED char *errormsg = NULL; void *libsepolh = NULL; - libsepolh = dlopen("libsepol.so.1", RTLD_NOW); + libsepolh = dlopen("libsepol.so.2", RTLD_NOW); if (libsepolh) { usesepol = 1; dlerror(); diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile index 8d466f56ed0e..dc8b1773d974 100644 --- a/libsepol/src/Makefile +++ b/libsepol/src/Makefile @@ -7,7 +7,7 @@ RANLIB ?= ranlib CILDIR ?= ../cil VERSION = $(shell cat ../VERSION) -LIBVERSION = 1 +LIBVERSION = 2 LEX = flex CIL_GENERATED = $(CILDIR)/src/cil_lexer.c From patchwork Wed Sep 30 14:50:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Lautrbach X-Patchwork-Id: 11809291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 370806CA for ; Wed, 30 Sep 2020 14:50:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E2AD206FC for ; Wed, 30 Sep 2020 14:50:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="W+eGbC0q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730592AbgI3Ouu (ORCPT ); Wed, 30 Sep 2020 10:50:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:25441 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgI3Ouu (ORCPT ); Wed, 30 Sep 2020 10:50:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601477448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lkNzSDye89EepijHfGqBte5KlKRaFGNVRbLrtB4sTNA=; b=W+eGbC0qHPEarjOM37ENn62sArcphVZWlNna9BYfYEo1O9dJIekN6smsAudbmmqWSwoHmH 94Ca/yRwoyWkwOetz3eDDAeAfe9ZMuOCRWCxb/vqWXRnwOlSnhXmh1y2gOJ1g/6BZVodB9 BmnU79l869F4Fh25h3lufYjy/IqBNOQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-118-hr9bfHTJMMCsZfSLPzeEyA-1; Wed, 30 Sep 2020 10:50:46 -0400 X-MC-Unique: hr9bfHTJMMCsZfSLPzeEyA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFFE780EFA4 for ; Wed, 30 Sep 2020 14:50:45 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 057315D9DC; Wed, 30 Sep 2020 14:50:44 +0000 (UTC) From: Petr Lautrbach To: selinux@vger.kernel.org Cc: Petr Lautrbach Subject: [PATCH 3/4] libsemanage: Remove legacy and duplicate symbols Date: Wed, 30 Sep 2020 16:50:30 +0200 Message-Id: <20200930145031.910190-3-plautrba@redhat.com> In-Reply-To: <20200930145031.910190-1-plautrba@redhat.com> References: <20200930145031.910190-1-plautrba@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Versioned duplicate symbols cause problems for LTO. These symbols were introduced during the CIL integration several releases ago and were only consumed by other SELinux userspace components. Signed-off-by: Petr Lautrbach --- libsemanage/include/semanage/modules.h | 2 +- libsemanage/src/libsemanage.map | 5 -- libsemanage/src/modules.c | 100 +------------------------ libsemanage/src/modules.h | 9 +-- libsemanage/src/semanageswig_python.i | 2 - 5 files changed, 4 insertions(+), 114 deletions(-) diff --git a/libsemanage/include/semanage/modules.h b/libsemanage/include/semanage/modules.h index ac4039314857..b51f61f033d5 100644 --- a/libsemanage/include/semanage/modules.h +++ b/libsemanage/include/semanage/modules.h @@ -33,7 +33,7 @@ typedef struct semanage_module_key semanage_module_key_t; */ extern int semanage_module_install(semanage_handle_t *, - char *module_data, size_t data_len, char *name, char *ext_lang); + char *module_data, size_t data_len, const char *name, const char *ext_lang); extern int semanage_module_install_file(semanage_handle_t *, const char *module_name); extern int semanage_module_remove(semanage_handle_t *, char *module_name); diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map index 1375a8ca0ea7..4bec06aaae27 100644 --- a/libsemanage/src/libsemanage.map +++ b/libsemanage/src/libsemanage.map @@ -167,18 +167,13 @@ LIBSEMANAGE_1.0 { semanage_mls_enabled; semanage_module_disable; semanage_module_enable; - semanage_module_get_enabled; semanage_module_get_name; semanage_module_get_version; semanage_module_info_datum_destroy; - semanage_module_install; - semanage_module_install_base; - semanage_module_install_base_file; semanage_module_install_file; semanage_module_list; semanage_module_list_nth; semanage_module_remove; - semanage_module_upgrade; semanage_module_upgrade_file; semanage_msg_get_channel; semanage_msg_get_fname; diff --git a/libsemanage/src/modules.c b/libsemanage/src/modules.c index 6d3eb60ae462..8b36801038df 100644 --- a/libsemanage/src/modules.c +++ b/libsemanage/src/modules.c @@ -42,70 +42,7 @@ #include "modules.h" #include "debug.h" -asm(".symver semanage_module_get_enabled_1_1,semanage_module_get_enabled@@LIBSEMANAGE_1.1"); -asm(".symver semanage_module_get_enabled_1_0,semanage_module_get_enabled@LIBSEMANAGE_1.0"); -asm(".symver semanage_module_install_pp,semanage_module_install@LIBSEMANAGE_1.0"); -asm(".symver semanage_module_install_hll,semanage_module_install@@LIBSEMANAGE_1.1"); - -/* Takes a module stored in 'module_data' and parses its headers. - * Sets reference variables 'module_name' to module's name and - * 'version' to module's version. The caller is responsible for - * free()ing 'module_name' and 'version'; they will be - * set to NULL upon entering this function. Returns 0 on success, -1 - * if out of memory, or -2 if data did not represent a module. - */ -static int parse_module_headers(semanage_handle_t * sh, char *module_data, - size_t data_len, char **module_name, char **version) -{ - struct sepol_policy_file *pf; - int file_type; - *version = NULL; - - if (sepol_policy_file_create(&pf)) { - ERR(sh, "Out of memory!"); - return -1; - } - sepol_policy_file_set_mem(pf, module_data, data_len); - sepol_policy_file_set_handle(pf, sh->sepolh); - if (module_data == NULL || - data_len == 0 || - sepol_module_package_info(pf, &file_type, module_name, version) == -1) { - sepol_policy_file_free(pf); - ERR(sh, "Could not parse module data."); - return -2; - } - sepol_policy_file_free(pf); - if (file_type != SEPOL_POLICY_MOD) { - ERR(sh, "Data did not represent a pp module. Please upgrade to the latest version of libsemanage to support hll modules."); - return -2; - } - - return 0; -} - -/* This function is used to preserve ABI compatibility with - * versions of semodule using LIBSEMANAGE_1.0 - */ -int semanage_module_install_pp(semanage_handle_t * sh, - char *module_data, size_t data_len) -{ - char *name = NULL; - char *version = NULL; - int status; - - if ((status = parse_module_headers(sh, module_data, data_len, &name, &version)) != 0) { - goto cleanup; - } - - status = semanage_module_install_hll(sh, module_data, data_len, name, "pp"); - -cleanup: - free(name); - free(version); - return status; -} - -int semanage_module_install_hll(semanage_handle_t * sh, +int semanage_module_install(semanage_handle_t * sh, char *module_data, size_t data_len, const char *name, const char *ext_lang) { if (sh->funcs->install == NULL) { @@ -160,16 +97,6 @@ int semanage_module_extract(semanage_handle_t * sh, return sh->funcs->extract(sh, modkey, extract_cil, mapped_data, data_len, modinfo); } -/* Legacy function that remains to preserve ABI - * compatibility. Please use semanage_module_install instead. - */ -int semanage_module_upgrade(semanage_handle_t * sh, - char *module_data, size_t data_len) -{ - return semanage_module_install_pp(sh, module_data, data_len); - -} - /* Legacy function that remains to preserve ABI * compatibility. Please use semanage_module_install_file instead. */ @@ -179,24 +106,6 @@ int semanage_module_upgrade_file(semanage_handle_t * sh, return semanage_module_install_file(sh, module_name); } -/* Legacy function that remains to preserve ABI - * compatibility. Please use semanage_module_install instead. - */ -int semanage_module_install_base(semanage_handle_t * sh, - char *module_data, size_t data_len) -{ - return semanage_module_install_pp(sh, module_data, data_len); -} - -/* Legacy function that remains to preserve ABI - * compatibility. Please use semanage_module_install_file instead. - */ -int semanage_module_install_base_file(semanage_handle_t * sh, - const char *module_name) -{ - return semanage_module_install_file(sh, module_name); -} - int semanage_module_remove(semanage_handle_t * sh, char *module_name) { if (sh->funcs->remove == NULL) { @@ -780,7 +689,7 @@ int semanage_module_key_set_priority(semanage_handle_t *sh, } -int semanage_module_get_enabled_1_1(semanage_handle_t *sh, +int semanage_module_get_enabled(semanage_handle_t *sh, const semanage_module_key_t *modkey, int *enabled) { @@ -800,11 +709,6 @@ int semanage_module_get_enabled_1_1(semanage_handle_t *sh, return sh->funcs->get_enabled(sh, modkey, enabled); } -int semanage_module_get_enabled_1_0(semanage_module_info_t *modinfo) -{ - return modinfo->enabled; -} - int semanage_module_set_enabled(semanage_handle_t *sh, const semanage_module_key_t *modkey, int enabled) diff --git a/libsemanage/src/modules.h b/libsemanage/src/modules.h index 2d3576fb15df..64d4a157f5ca 100644 --- a/libsemanage/src/modules.h +++ b/libsemanage/src/modules.h @@ -26,16 +26,9 @@ #include "semanage/modules.h" -int semanage_module_install_pp(semanage_handle_t * sh, - char *module_data, size_t data_len); -int semanage_module_install_hll(semanage_handle_t * sh, - char *module_data, size_t data_len, const char *name, const char *ext_lang); -int semanage_module_upgrade(semanage_handle_t * sh, - char *module_data, size_t data_len); + int semanage_module_upgrade_file(semanage_handle_t * sh, const char *module_name); -int semanage_module_install_base(semanage_handle_t * sh, - char *module_data, size_t data_len); int semanage_module_install_base_file(semanage_handle_t * sh, const char *module_name); diff --git a/libsemanage/src/semanageswig_python.i b/libsemanage/src/semanageswig_python.i index 8dd79fc24213..5f0113966962 100644 --- a/libsemanage/src/semanageswig_python.i +++ b/libsemanage/src/semanageswig_python.i @@ -30,8 +30,6 @@ %} %include "stdint.i" -%ignore semanage_module_install_pp; -%ignore semanage_module_install_hll; %wrapper %{ From patchwork Wed Sep 30 14:50:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Lautrbach X-Patchwork-Id: 11809295 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44ACC6CA for ; Wed, 30 Sep 2020 14:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BF2D2076B for ; Wed, 30 Sep 2020 14:51:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="adY+uRYO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730601AbgI3OvE (ORCPT ); Wed, 30 Sep 2020 10:51:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55261 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730427AbgI3OvE (ORCPT ); Wed, 30 Sep 2020 10:51:04 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601477463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8gjR7A43Z0Pv7yuo/qczca/yad5OMKgL+O04+FVd61w=; b=adY+uRYOu8bJZEFswUBuDsfBcMAKONllNlxNX6IVjQbkSN7ziKN2T3pN8r3V5ZXnOvxb/s CJ+mBp/iqoPhYH+pXMce3Fs8qZvWCuPwrsSmfk1KmL5L8gW8SHMYn3dMk/OZhkL2xyp8xP ndHynXFIrwaGFnoevQ3c5IelTaEig30= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-483-6T4UT-zpPtaxR_9npqW-iQ-1; Wed, 30 Sep 2020 10:50:47 -0400 X-MC-Unique: 6T4UT-zpPtaxR_9npqW-iQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D4F2618BA280 for ; Wed, 30 Sep 2020 14:50:46 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 207E65D9D3; Wed, 30 Sep 2020 14:50:45 +0000 (UTC) From: Petr Lautrbach To: selinux@vger.kernel.org Cc: Petr Lautrbach Subject: [PATCH 4/4] libsemanage: Bump libsemanage.so version Date: Wed, 30 Sep 2020 16:50:31 +0200 Message-Id: <20200930145031.910190-4-plautrba@redhat.com> In-Reply-To: <20200930145031.910190-1-plautrba@redhat.com> References: <20200930145031.910190-1-plautrba@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org It's due to the previous ABI incompatible change Signed-off-by: Petr Lautrbach --- libsemanage/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index a0eb3747d74b..ab6cae51f5c3 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -32,7 +32,7 @@ YACC = bison YFLAGS = -d VERSION = $(shell cat ../VERSION) -LIBVERSION = 1 +LIBVERSION = 2 LIBA=libsemanage.a TARGET=libsemanage.so