From patchwork Mon Apr 27 20:22:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513247 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 C81DF1392 for ; Mon, 27 Apr 2020 20:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B16742073C for ; Mon, 27 Apr 2020 20:23:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fZB+twYM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726743AbgD0UXX (ORCPT ); Mon, 27 Apr 2020 16:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgD0UXX (ORCPT ); Mon, 27 Apr 2020 16:23:23 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F185DC0610D5 for ; Mon, 27 Apr 2020 13:23:22 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id a7so119363pju.2 for ; Mon, 27 Apr 2020 13:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mK6rHo6KUM5WsO4Xh6SckGgAQp4XOee8g5xpZh7S2Rc=; b=fZB+twYM71wNLxt3xDYb25xCNKk9LqZUoXP38gChuzp3mgGHkPNsU1Z4G5fwrLYppV csD0W6D76i+hHClwaLlHW+OYE//KaNGvb+WBr3XGEfjd2Y8PXUxq6F/GxkqUZ5o+hdJt kbfH8LmOORcwVPrytbJfTke08LRZ6n9C70UWPTjszKSFNDtBvkCW6SbwR6t9NdqYVl04 CkCPuiU8emw3cbOvAJRK+BQMGLQBZ4DGe2mKckvCgWLan4VacgbIBnbUxtvGwG00Bdr5 wK+FXCoFFJik/tgMcLKoohx2cdWZrSdCLobcDeSc/vU6glNJoaYZxCv8BhitUdZGr4JL 6Shw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mK6rHo6KUM5WsO4Xh6SckGgAQp4XOee8g5xpZh7S2Rc=; b=bUkHL3pjMrbpc0ASdadD6QPnVB8wh0jNQwTGVdvaw6xg/+YbRWtz+yiJr7YHJz4ICg Jlk2mjfVUdMm+ehLLKixU8LLmejCInKERwJEyatsilbeKSO7VtEDJUCt0YUFxl5y+qxR 6TFAuZaFUPJxBkmubkZRK4TlBtJDJkRjMinFnqn6LmIG7gvPyRqy180VxXXNJgcyLbl0 AapsZb6J/3SpZ1SEIU1F0/E0C1A4mu+st66AuB5mC1ZWHl3wxyhyFpk6mRwGQ4MHk3Gc T/D0SiGxkbtMd74SQj8Gp/xlBznISXnr557TimnURNKi18N37RKyeCPWUO7aSwm0xiGh tWIg== X-Gm-Message-State: AGi0PuYA6KrKot8455J9G68QEzuKjqIYdnuqInOE7RubQ3gmUDLfh3gk MYvLs+hpRMFOnnLP98/+eFU= X-Google-Smtp-Source: APiQypLD+KpLwkIU0sUo7FoQe26dc0YKM0jKApVWk8dd6xe06cr96jLeFXROPs+e9iGat8v3AokuSw== X-Received: by 2002:a17:902:bb97:: with SMTP id m23mr3050547pls.253.1588019002448; Mon, 27 Apr 2020 13:23:22 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:21 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 01/18] security_load_booleans: update return comment Date: Mon, 27 Apr 2020 15:22:58 -0500 Message-Id: <20200427202315.4943-2-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts The code returns -1 not 0, correct it. Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 6a512b383325..948ca0689a07 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -323,7 +323,7 @@ extern int security_set_boolean_list(size_t boolcnt, SELboolean * boollist, int permanent); /* Load policy boolean settings. Deprecated as local policy booleans no - * longer supported. Will always return 0. + * longer supported. Will always return -1. */ extern int security_load_booleans(char *path); From patchwork Mon Apr 27 20:22:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513249 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 5648E1392 for ; Mon, 27 Apr 2020 20:23:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E373206E2 for ; Mon, 27 Apr 2020 20:23:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qc9nAOPG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbgD0UXZ (ORCPT ); Mon, 27 Apr 2020 16:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgD0UXY (ORCPT ); Mon, 27 Apr 2020 16:23:24 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B116FC0610D5 for ; Mon, 27 Apr 2020 13:23:24 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id s10so7429235plr.1 for ; Mon, 27 Apr 2020 13:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M7QO7d/nGxQvtYBOljrVhg8Tk0kk4tiNZz4BHBU4WXo=; b=qc9nAOPGwU7y0iPbQnKI/ybwzkDqYPqR/yLpr9KE1AzAf3CiR6I0Jln3bL0jCFZOMO rlYieJihOoRbEyArLmf7F/zlLBCDWzVPxCdMDHhipy5+ql+5RbJIk6EDlEQQshX9PWQP DK8kCfHYkLmcrLNxteYZEG44PpfsJuJ5wqRo+4MYLo+JxLK8SBLbjKu5+tIbQ0rIhE75 QZSBc/K+Z2etPuW3VjBBBQWGZflIK3YpwhOe2v2vY46pbYuP78Q9uHInmo3DLLhlKXmG mPKg8w3wdYKlE7NtmtKRt42QTTQRFIEr6OcihO5Tf3WeqTkAmDkFP2kB2IwOsTgeh4Q1 ewCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M7QO7d/nGxQvtYBOljrVhg8Tk0kk4tiNZz4BHBU4WXo=; b=ekBwfY0oeTGkTU4C5LSSE1vlWmGI2F4Yd3WPQ5va5Jk97z7lkTyWi0a/tWV6rqVXOg dlaSvWEr/22udnicPDFMP1kIRoRY4fcYt+V5nogbRhgL/zd13gjbEcFmBvty/JjfJwOf Dq5UYz8wqPiisu29CwgzWqm7YYRsPHGW6+4AOyAjLRlpGy1n7oA59IA9lVyseYXHGX/6 ikwTcQUrlvn3yImR8ZMhMZdZoPIhRYRfGlYqlAO5jHnJBPmryX0jOk+ff1AjF5X3Txi4 iMb1Fzv7FZGyGNNEsYOcXKPmrb2WnuKgxPTHzcqdsUMQJfN6D2/Y2eT2mC28OBJnL7Tc Tppg== X-Gm-Message-State: AGi0PuZ/MkYCaHK0plSIz+XpVHvdqrJV8TH8FXjFWdb28os8jkpSRgX/ 95oNdBBiMjUPbABU6effBMs= X-Google-Smtp-Source: APiQypJMWdkPTIZfjDSkUt+WgZsLTJRcPyyyv5bmFWOrh0YSPiG1gl8J4eujpIUG9gnhjUTcREk6ug== X-Received: by 2002:a17:902:8641:: with SMTP id y1mr9185322plt.27.1588019004196; Mon, 27 Apr 2020 13:23:24 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:23 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 02/18] security_load_booleans: annotate deprecated Date: Mon, 27 Apr 2020 15:22:59 -0500 Message-Id: <20200427202315.4943-3-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 948ca0689a07..ae70479511db 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -325,7 +325,11 @@ extern int security_set_boolean_list(size_t boolcnt, /* Load policy boolean settings. Deprecated as local policy booleans no * longer supported. Will always return -1. */ -extern int security_load_booleans(char *path); +extern int security_load_booleans(char *path) +#ifdef __GNUC__ +__attribute__ ((deprecated)) +#endif +; /* Check the validity of a security context. */ extern int security_check_context(const char * con); From patchwork Mon Apr 27 20:23:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513251 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 3128014B4 for ; Mon, 27 Apr 2020 20:23:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17760206E2 for ; Mon, 27 Apr 2020 20:23:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C1KH+JGf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbgD0UX0 (ORCPT ); Mon, 27 Apr 2020 16:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgD0UX0 (ORCPT ); Mon, 27 Apr 2020 16:23:26 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7658DC0610D5 for ; Mon, 27 Apr 2020 13:23:26 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id 18so8320324pfv.8 for ; Mon, 27 Apr 2020 13:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5IskOwX5UcT748ON1fTtfkF0uP1N9WejQ0M281usXu4=; b=C1KH+JGfQgrGJ47OkLLu/6wZgHHanIXhPGU1vvcEGo1clBgJ9a+dMRzYOqa43KZW6e TcH0m+tyOt9GjZC/boMdPHvatrXYS6WvK8S0hd1B1Ze9Lwzb3kCgP3xv41PA1uuljIjN FYvrbYSFn0f2VmfjO2ycRPoRcCvieiihkexUE57jnso38T8HARXqM6dlFtKrnu4dJfVG fMs3p3zY1Rz1tbs3GH/6bpXbCwEafat88ewDI1fsnA/rWM9f8RRaN06UQ6+4qIZ0WMgY JlCkFZgjDki7ecNTxiJJEb0FTDMRg4qR4yjkvIq2YkVBHAk9Emf9lNz5sWw1Vtg7+txK XEUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5IskOwX5UcT748ON1fTtfkF0uP1N9WejQ0M281usXu4=; b=FE/Hzesks2L4Nm2taXAjE7yR1Z/TRU1HihKJuKDZzX11yHzJodR3pckzWGEWmSGrgl 2QiNEzDLSQ5A8xSBQR8R98kYiImVnxLUhd2aAMAuIDB19pk6XLFeusKOLzzar64kCOgj mMUHO58hPIxk//EUCSYgKwZa4941ZKi/PmBj7mzxw7bSOwo4tDdtkvu20meO/ehRRJpo OonB18R4FsQEcNX+Emwzu7tPSRfvYOlVPMtN6s5evJnl7UAyjl1rE7y/P11k2ZDt9hY2 1spwExbWuk+eeYhUruP/XxBjOrqZqYE7p+wLJTQmjTnQJtTEws3DAhDL+1Hlyt3gt/8t fq3g== X-Gm-Message-State: AGi0PuZzbFHBwfipjGGiR09NUPDLIg+/Z5I+X+iwaFXBtTOPaoIkzi/W qssc/BKMLOnvZUlKhjHIPjE= X-Google-Smtp-Source: APiQypIByzUudcX68rAGDfoaEADFWqkufMlJwgf2NbH9CNcpzA1f82km4IBKleYPORMS++w70zlKLQ== X-Received: by 2002:a63:e60a:: with SMTP id g10mr8218394pgh.51.1588019005902; Mon, 27 Apr 2020 13:23:25 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:25 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 03/18] selinux_booleans_path: annotate deprecated Date: Mon, 27 Apr 2020 15:23:00 -0500 Message-Id: <20200427202315.4943-4-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index ae70479511db..19b22c166651 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -579,7 +579,11 @@ extern const char *selinux_contexts_path(void); extern const char *selinux_securetty_types_path(void); extern const char *selinux_booleans_subs_path(void); /* Deprecated as local policy booleans no longer supported. */ -extern const char *selinux_booleans_path(void); +extern const char *selinux_booleans_path(void) +#ifdef __GNUC__ +__attribute__ ((deprecated)) +#endif +; extern const char *selinux_customizable_types_path(void); /* Deprecated as policy ./users no longer supported. */ extern const char *selinux_users_path(void); From patchwork Mon Apr 27 20:23:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513253 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 B48CE14B4 for ; Mon, 27 Apr 2020 20:23:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D9082073C for ; Mon, 27 Apr 2020 20:23:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eZ/Ua8tM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbgD0UX2 (ORCPT ); Mon, 27 Apr 2020 16:23:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgD0UX2 (ORCPT ); Mon, 27 Apr 2020 16:23:28 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E75E9C0610D5 for ; Mon, 27 Apr 2020 13:23:27 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id 18so8320389pfv.8 for ; Mon, 27 Apr 2020 13:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Hj+i+tMN050sCBe+IQticD3qraeN9Ogi50YT5Ooklvk=; b=eZ/Ua8tM1cqommL7CE6RVu/5VNghlWDhJh49CJBi6kgu4TDvAIIMvcqP6dH2VSp3bn /wIQ70tF3jqKmkTfLI/uuX+XOFonQKvWT919h8lMZMEa5cDi2xvhR9PPNNHrMmbAjKDj 8WOdCmvtgzqsI3OuoN09wfMwbEV2nD/04FZjVYhWx3PwcSQQ5p6v1tThVPNIOVNWsMaC GuUqP6agI8cPHJadQEUL2hV7iskYyqV+y8zAz4BZOqLNK4+6vkltw59Cn4GEgferoMHB g/ZGQn7BJqasgklgYBVocjt2WGsUFhVPNIIwdbHEPOxQ5lk+4TCaA+DcPUfenp6qTWwM AZOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hj+i+tMN050sCBe+IQticD3qraeN9Ogi50YT5Ooklvk=; b=HXFaWuqp/lAR+4U+FAh5L05srOtDctn0Nn1aZ2FUbmyXHeWeWzPSXQuRNtw0/kedqR XZXrQX+GvxPPqMs1d3GLBqlZKTWYCdFggcjAcOaR7SG9AcBLV5degiUDu/qEZBlnDoBv 48mzYp4ndIWv5swLiUKRGVCIIhrsWSUdf4RGt91YsTMTbV1HstHiGjNE4AJaL+CTGf1Y TwrmjrxobBAKNCOrsoaEz2FrZiCfANNLEzv2iJWzmrl22KgYhALRndW6QrNMH86s+qFi d0OQ2IAsqIWEGqFschrrteJZR/lP/+uPVDhFutXhoJoMMFcxmFmZxg3sdk5LyW3Sg5YF qWvg== X-Gm-Message-State: AGi0PuZ01FH+bQcE6Aly2KMAiLRl9LKiyBS7AaLZLwX7scEeDKYwRQBU QcqnNjKgTyxw17LEJKIIzxc= X-Google-Smtp-Source: APiQypI/8u1v+qs0TLRkPF8TjIYmRmgcVJ5Yt4sacJxyfyF3KNOYgg46IgANW0fQijTF83t+kn4q0A== X-Received: by 2002:a63:383:: with SMTP id 125mr24311655pgd.242.1588019007435; Mon, 27 Apr 2020 13:23:27 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:27 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 04/18] selinux_users_path: annotate deprecated Date: Mon, 27 Apr 2020 15:23:01 -0500 Message-Id: <20200427202315.4943-5-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 19b22c166651..75f65e367bf4 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -586,7 +586,11 @@ __attribute__ ((deprecated)) ; extern const char *selinux_customizable_types_path(void); /* Deprecated as policy ./users no longer supported. */ -extern const char *selinux_users_path(void); +extern const char *selinux_users_path(void) +#ifdef __GNUC__ +__attribute__ ((deprecated)) +#endif +; extern const char *selinux_usersconf_path(void); extern const char *selinux_translations_path(void); extern const char *selinux_colors_path(void); From patchwork Mon Apr 27 20:23:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513255 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 5A6E51392 for ; Mon, 27 Apr 2020 20:23:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4267C206E2 for ; Mon, 27 Apr 2020 20:23:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J/lLKKr4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726758AbgD0UXb (ORCPT ); Mon, 27 Apr 2020 16:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgD0UXa (ORCPT ); Mon, 27 Apr 2020 16:23:30 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 200B8C0610D5 for ; Mon, 27 Apr 2020 13:23:30 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id a7so119462pju.2 for ; Mon, 27 Apr 2020 13:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U+GHpS308QcQeu7LgIaP2e8Hs1RM6+ox8w7monB8uBM=; b=J/lLKKr4x3RA0p2NKRhH2we5Zf/k6qq0iUWGSrtJk3bBG/t8ilaVxtCraR9ZObeaZO +vCa2Rjh22r0mIvqYvcBokvYoUM9UxmD7RwdVaRrEImWxHZj9CLylf175GR3oI21RjlK c5xMARxcPapYH/ZYNm/utoy0C9Xg34Jq+Pz72Hqw4085PIXcOHTHsSpD6trc19Jyfy1g +HkGDrGo548+KFe9BzEfGZ3MhmFvs2IjWZpfx3qL1lMvzbt5jPio+Ck9CFW4rM1xYn/f zzzh0EzC5PlrDPzTUyMP3za2+TJacdcnViDmQ8DvnBqWyuGi4leKktuf4LyIJ6/gnzLt 8A2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=U+GHpS308QcQeu7LgIaP2e8Hs1RM6+ox8w7monB8uBM=; b=OESPsvZr4OxAEKirVbXl1sQLpUn3fjUGLVv6Xlxd7I/mBEUlVSo2ro1hJ/GVKsKhs2 h8nc37UDArXw4tc7LqdnOuXS5x+qFDdbqdIO8UD8VtkzX+NEH1OLYDjoDzqgWHvnWcs+ z4nsbA3tqiWr+oS9LFO9+pDpYVP3AKK2Ehq+MWSH5U5CzcDWrw2wTRaOUW79J3aEachn T2//h5Xhdsd3k1Gye8lzd65iwrTtW0l8XFIF1Rb71cPhhS5awxXFX7giagVzA2lDmzUt HSP10Q8O71vUZlvpbg9mDtcMblDQp/nXxqXpbSG+I0yK+zsjfOH5jGAJNdulmeK4fZ47 Ha6g== X-Gm-Message-State: AGi0PuYUeC013AE2wu55nSsQLGOAnMAKzCl5NTywe4JkoSornYIWV/sw ViQgWXvQg/31WzUaalGR3Ok= X-Google-Smtp-Source: APiQypLl/ocb6TtajqDMDZMVUwCO9ktopMoCO/sPC5/c7nuq4szli6D5BMjGgbwooai/zp5JEV6C7A== X-Received: by 2002:a17:90a:d984:: with SMTP id d4mr492365pjv.59.1588019009529; Mon, 27 Apr 2020 13:23:29 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:29 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 05/18] rpm_execcon: annotate deprecated Date: Mon, 27 Apr 2020 15:23:02 -0500 Message-Id: <20200427202315.4943-6-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 75f65e367bf4..deaa3f172586 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -645,7 +645,11 @@ extern int setexecfilecon(const char *filename, const char *fallback_type); /* Execute a helper for rpm in an appropriate security context. */ extern int rpm_execcon(unsigned int verified, const char *filename, - char *const argv[], char *const envp[]); + char *const argv[], char *const envp[]) +#ifdef __GNUC__ + __attribute__((deprecated("Use setexecfilecon and execve"))) +#endif +; #endif /* Returns whether a file context is customizable, and should not From patchwork Mon Apr 27 20:23:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513257 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 480DC14B4 for ; Mon, 27 Apr 2020 20:23:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FDD220656 for ; Mon, 27 Apr 2020 20:23:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BLnQ4OIc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726763AbgD0UXb (ORCPT ); Mon, 27 Apr 2020 16:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgD0UXb (ORCPT ); Mon, 27 Apr 2020 16:23:31 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9918DC0610D5 for ; Mon, 27 Apr 2020 13:23:31 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id t9so121776pjw.0 for ; Mon, 27 Apr 2020 13:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=81qiqqHZ0AyplMqb6jelzpOhXR4sKkoaMjUETNEc6io=; b=BLnQ4OIcjMkUPEOd+5+0g1OjRSulTaeC3sfLKyuAd6p6o8tFX1zoFFGN9rvAlWs0qn zQI3v0wip6Btk7Phwfvsksz4b8y34ogFDpHlxAIn+rkFn30fwrU5kIHV6O063BEcXSpZ sYNQWcmatKZvNu7Nv9hUuqSsnFhN/OanDzZVcXLQbXaOSlQ3/ovmYwip4qBJVja04kdK x6uWPI0KAmwUqpHcUVfIvJcNNjIvkGw89ipoLgtvvvjmhwTVPHcRxT1SJde33xKH6+3v MM8eDSsvhoe4c8YeHe33Ni0yELzUkHC2jyTvKY9qk8NZvhAZJ+iRCSUJ1RHxhZMZX7vL jCTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=81qiqqHZ0AyplMqb6jelzpOhXR4sKkoaMjUETNEc6io=; b=o3GBzkOoE0ywnnxz6dAhYENz6KZY9FP8L4F8PTKGMdsn3O8I0Wh39jZi5msiGNVogh 57EurvUeEcvkGhW1dlcIWuUVxkOzq8J6WwF4oKc0nnuTRTzA/9mnqncg5c8CHsp5G1Nq O2m7cgxszh1AtclGl8CYyp2QovuWEDBwEH9HhEmX6iAp2/SnguZ6grWLAGqgHWJ/mazn v4A+K5R5i/IaSGTPeMV75e2NsqKMFDx6CRQA2YTJslnNkDzcJ5CcWlyopIxdV4Cib/U+ vyD5TbNBhsIwUW0vJjo7L8/kH+Wn/WOaRZfkGnzHtuqIq/U9JvmkYLdFb/KXksB0NdV9 7Nkg== X-Gm-Message-State: AGi0PuYha4qICWqi3oTvvjUQ5VKDPH7r7hi0QfW1qwkMdZ40hiDAcDMt I1MF+WXuxwZ6ZHKOfKoIJgx738H6UPo= X-Google-Smtp-Source: APiQypI8HxD5i6fJ0aXnWu756avO2hYmR0ixy6G+usrRDV2YlXFCN5tBeJjSZlk27w6gL4cBUgi3zA== X-Received: by 2002:a17:90a:1fcd:: with SMTP id z13mr465840pjz.151.1588019011087; Mon, 27 Apr 2020 13:23:31 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:30 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 06/18] sidget: annotate deprecated Date: Mon, 27 Apr 2020 15:23:03 -0500 Message-Id: <20200427202315.4943-7-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/avc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index 46c51419f588..0589935651b4 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -64,7 +64,11 @@ extern int avc_context_to_sid_raw(const char * ctx, security_id_t * sid); * reference count). Note that avc_context_to_sid() also * increments reference counts. */ -extern int sidget(security_id_t sid); +extern int sidget(security_id_t sid) +#ifdef __GNUC__ +__attribute__ ((deprecated)) +#endif +; /** * sidput - decrement SID reference counter. From patchwork Mon Apr 27 20:23:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513259 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 B2AEC14B4 for ; Mon, 27 Apr 2020 20:23:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B7EE206E2 for ; Mon, 27 Apr 2020 20:23:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="reJkklE5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgD0UXe (ORCPT ); Mon, 27 Apr 2020 16:23:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726285AbgD0UXd (ORCPT ); Mon, 27 Apr 2020 16:23:33 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76491C0610D5 for ; Mon, 27 Apr 2020 13:23:33 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id s10so7429360plr.1 for ; Mon, 27 Apr 2020 13:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iWBKLr767QxmWMyFc4HKl4BlgOIXWmOpWn/1VxJuI+0=; b=reJkklE57dgohwIFfVVjt3OlBIfUWZJ2y1G0HZV7gCcqSEc0Owt4EkUvpTwp93P3/I 0sfyxfadzrD1kRyqI3/+06TqMzaNeehMEhUAg4uGM5ZNDJ/tsDTqInrDDZJiFYa4+ceA s/fB7Yjdmp9N9FYsn0J2vbar/UCUa0aWsKnhpDpegh5rXQx65skcl90yTgeLUoFUnzd0 KShEBjq9hEzXKikjy0K7mll7oDSr2Rh4tm7H7l/fB9rDvU1WCK0s33TNuaQ1PjYFN5gc saB/6J7vT3Bm/UGfWhfcQeVR5qIYsAN1isfQ2mw6DgBjcQOfE1b7TgPRZrHwrOtYvW/x 494g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iWBKLr767QxmWMyFc4HKl4BlgOIXWmOpWn/1VxJuI+0=; b=t3r+of1NTyOtO6jtvPcIBaiiwOwBYqUbdumSXxxk7H+PkmdZ9n6n4JxjqWp0SWTMNy o3AVvf27sjWqFW6mfPbmhY22aRBScAbaCjk1juXyCjcAKBEBglT5AOWgigV6hwZLH7Vw P9U+0nMK2HV5DkItw1PQLQKBzfuWgGuz3o1rkNxnsL/FZx2mqvRrv03C2txDdCvcxLIV Fyj/ShKn0CusG6bpkQSUQ1kXCMmc5/BEvVOAR5LD6wk+MA9dcDGrt0Ev2+ZSHdG3jCnL lFo+Bw818oQIR1KaqKV7kibtXDiQv18OML8ilH9u2QObxy0JFEwpM57fLW4PK9CvUfV1 gsnQ== X-Gm-Message-State: AGi0Pua/6/2+CeU8RdNCJWrWmkAwoOS/XHfo4P06+yjPszSzEQMB4hiN 7UwjjhnQxWBamoi38/4zEDk= X-Google-Smtp-Source: APiQypKy0joKhyZmKvTPPMKJLZ4gBQuIr0m1jG3w3YiFhM8FIFXcDcLIdGecVKBIaPvXCjhGhJv0dw== X-Received: by 2002:a17:902:9f8a:: with SMTP id g10mr2046476plq.233.1588019012972; Mon, 27 Apr 2020 13:23:32 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:32 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 07/18] sidput: annotate deprecated Date: Mon, 27 Apr 2020 15:23:04 -0500 Message-Id: <20200427202315.4943-8-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/avc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index 0589935651b4..c732824129cb 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -80,7 +80,11 @@ __attribute__ ((deprecated)) * zero, the SID is invalid, and avc_context_to_sid() must * be called to obtain a new SID for the security context. */ -extern int sidput(security_id_t sid); +extern int sidput(security_id_t sid) +#ifdef __GNUC__ +__attribute__ ((deprecated)) +#endif +; /** * avc_get_initial_sid - get SID for an initial kernel security identifier From patchwork Mon Apr 27 20:23:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513261 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 B9E7B14B4 for ; Mon, 27 Apr 2020 20:23:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2659206E2 for ; Mon, 27 Apr 2020 20:23:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jeoBRwfJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726775AbgD0UXh (ORCPT ); Mon, 27 Apr 2020 16:23:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726501AbgD0UXg (ORCPT ); Mon, 27 Apr 2020 16:23:36 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEE12C0610D5 for ; Mon, 27 Apr 2020 13:23:36 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id l20so1261081pgb.11 for ; Mon, 27 Apr 2020 13:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LiSqBGVfe5hAcik2WCFSuq49veVlaqUwalAvJGlQXvg=; b=jeoBRwfJn7YyYeTMOA5SJ3Axt6rQnS+h3YUIK23QXz5A3zTDE1wRYi19Qhzn5wNld5 UKIyQxbojC+lxxlfXtrW277fMNcremNwWJ5g5wo82aPd7hBwHE8k6JBVjzlkjH7s3u9L WgYYdy4PnlFzPAxtI5iJF0H4zbRW+gV6tJUoZTkUSDtWUeu7G+0AzMw9hSDRunLhlevi CXvwHWBc/cA6vgYpyG20pw//Yqc2x7rDcVJ5p/qKPboN8ABdkBPiyKK4BD2VaKqyvcGm 8JjaH8bKzYbNy3mQzeaehQhpLXwQkKFX6SM3VhK5qsy5YQX/wO9pksf54ggu8pp+0Jwf T8rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LiSqBGVfe5hAcik2WCFSuq49veVlaqUwalAvJGlQXvg=; b=R2GqIlAxUSA6D7NLK0NCfOl6y00LPj4qszobJMHMg2KmKjh9O9emVUSCplD++EVocI KF4iss8X21oJxoqAr/LqgBuR2Uh5HCH6GhAu/CkW0r3glQz4tdW2b8Z1w8sBBKoPOxmH 2v+zZo1CbUCN2OX3Eswo6mPNmMTwck3os47b8qiUbdr2b2EJkg8ty4ZOO+nibQsu7OjK odr55cIFAgoyesvuh/kXNnxIT1BRPEKBL05pSw/3PmzgGE3dXwKSYl/kP+xotdOjjfVE X9iu4GaK6tHgVv36vIqNv0EIM0G4kpBZvQtVLqGAjGprCVs0P0VPjblzrLN3x9cUJXpg IppQ== X-Gm-Message-State: AGi0PuZGYuhiHP46ngoxaaLgF4Sy4k5m+9Ikv5NbSQbEjh+Mg+zCUouJ JTJFviqik2zOFCUhyyIyy6w= X-Google-Smtp-Source: APiQypJadLmeOOiXe9Pbkp+2SCVtRFpCyyfpjmDyVlTLj5DbfnqvLsxLK6pqTqXMtzdNWSVixgvMvw== X-Received: by 2002:a62:1d1:: with SMTP id 200mr27071354pfb.286.1588019015347; Mon, 27 Apr 2020 13:23:35 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:34 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 08/18] checkPasswdAccess: annotate deprecated Date: Mon, 27 Apr 2020 15:23:05 -0500 Message-Id: <20200427202315.4943-9-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index deaa3f172586..9dcb3220264a 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -619,7 +619,11 @@ extern int selinux_check_access(const char * scon, const char * tcon, const char /* Check a permission in the passwd class. Return 0 if granted or -1 otherwise. */ extern int selinux_check_passwd_access(access_vector_t requested); -extern int checkPasswdAccess(access_vector_t requested); +extern int checkPasswdAccess(access_vector_t requested) +#ifdef __GNUC__ + __attribute__ ((deprecated("Use selinux_check_access"))) +#endif +; /* Check if the tty_context is defined as a securetty Return 0 if secure, < 0 otherwise. */ From patchwork Mon Apr 27 20:23:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513263 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 AF8EE14B4 for ; Mon, 27 Apr 2020 20:23:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 974B22073C for ; Mon, 27 Apr 2020 20:23:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fWVLb8BX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbgD0UXi (ORCPT ); Mon, 27 Apr 2020 16:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726776AbgD0UXi (ORCPT ); Mon, 27 Apr 2020 16:23:38 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E73E8C0610D5 for ; Mon, 27 Apr 2020 13:23:37 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id a7so119583pju.2 for ; Mon, 27 Apr 2020 13:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Zfah9HSGQgGYpQi+daihMCdQ48cIJqxp2wzwkAq8SWQ=; b=fWVLb8BXY6mp6xSVNWNbTKXqyU7PxAOTfXGeefIb/nZG/s1TNxVCWjiX+nJ3P6AR0n 1OIeY5PIXTlHsvsDGw8pxRq5K/ez783cLmc4ZF6l3dwXQSf00DzkJKtooIEKY1WeHzte EZrzIjR50wXzAe7j/xcCIseocwr7h6x9dIK6BrtODOhiUR8ByfSLc/q+pJsmkzdkP9ie AaGERGvKJ8/aH8dsjSghvUJwfXrv2nCxKHOOQDDe4N+Qjr2aSk8suFfo+XjpqKUaJD+8 P4xSLf5u7YUaSZ3BZU4ISS1A0NKcTWHzF1Q02iKDlcVzE8oZ0tiJ3FjgVz1GARYBNBM1 IBXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Zfah9HSGQgGYpQi+daihMCdQ48cIJqxp2wzwkAq8SWQ=; b=GQ4ZeO4a3gNJQQv3hmqImXSJ/WnanPr+nDnXWP0kM612QvJCxuE0gIjEpZqjXK0dt0 jYf3foWDMj1sj+yjJxZybb0FdTCoMSi8lq5pbtayAisvC2ES8cFwJWh0S4JiQaENgrY7 u+aTRsqmGz2o1to8XBhspDWUT7T5yDvwWKz+8IkNw1LoKHYdRG0ctlSr6k3P3EPoPkL+ +cQzCk7M1tacS7cjpPkCIeHNEQzcHu02Oad7RxZlfuPaFmAdkK5ImnLilaxm6K6CYYHN Pnl0CqkwjTvdA3E6kMZXh8SeOK0WNp0jj+gcbTSF4232dvc9rb/v3K/xWvLUk6t5MRCj SE8Q== X-Gm-Message-State: AGi0PuZbW4CWwkLUMNpVXatvTh8AChWZrTp3GJV8uhh1Iu4MEwW8KS8X 0PiAiIAd3MihsVcSaW39AYI= X-Google-Smtp-Source: APiQypKi/m2x6fc9GESNRsOgIyHbOrzgWs7SZn815/APRiTA1xM3O7Pfdv3w5QJWYd8L0yUSQ8gQ4w== X-Received: by 2002:a17:902:7c0c:: with SMTP id x12mr13851442pll.12.1588019017427; Mon, 27 Apr 2020 13:23:37 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:37 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 09/18] matchpathcon_init: annotate deprecated Date: Mon, 27 Apr 2020 15:23:06 -0500 Message-Id: <20200427202315.4943-10-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 9dcb3220264a..940c43eff8c9 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -465,7 +465,11 @@ extern void set_matchpathcon_flags(unsigned int flags); function also checks for a 'path'.homedirs file and a 'path'.local file and loads additional specifications from them if present. */ -extern int matchpathcon_init(const char *path); +extern int matchpathcon_init(const char *path) +#ifdef __GNUC__ + __attribute__ ((deprecated("Use selabel_open with backend SELABEL_CTX_FILE"))) +#endif +; /* Same as matchpathcon_init, but only load entries with regexes that have stems that are prefixes of 'prefix'. */ From patchwork Mon Apr 27 20:23:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513265 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 874B41392 for ; Mon, 27 Apr 2020 20:23:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F5932074F for ; Mon, 27 Apr 2020 20:23:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jEW7OvOX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726914AbgD0UXk (ORCPT ); Mon, 27 Apr 2020 16:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726898AbgD0UXk (ORCPT ); Mon, 27 Apr 2020 16:23:40 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6CFDC0610D5 for ; Mon, 27 Apr 2020 13:23:39 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id h69so9194741pgc.8 for ; Mon, 27 Apr 2020 13:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/gdQpJrLZSitamhMTzbbXA6Ho/ldV9+TjII6aENSShU=; b=jEW7OvOXudziRRmFHIDHealkP/YgEK+0oIJ74ZepXEztwehaLTfHVn9YgDu8eJWTmz 4y1gRKAB5T6Wp55/KmLpVfBfqUDWQSLKwFwvvd6qKQTIqMIgeQeuqR8ixtb4IXkj+EnB 7ryIS9YtrM6+x48yB3NO8ul2ICtUi4VQelyUfxFEMw1k+3rKZcohwxV7ug+hIRvCLGzJ QcDwhvCZ+enZe6KluEUrwCz89by7uDZf0lSuOQ2v0X8VimifFD73s02Myp/jny2aEJ2M taOsbHAvQq2PzBZVr61py4lAHgbDSwMuNVZvA4b7p6RkrktAaG6+QhNITY+6ljyz87R/ 8HPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/gdQpJrLZSitamhMTzbbXA6Ho/ldV9+TjII6aENSShU=; b=KIn1AAk61zzp7wa7wgoHybqC8qVkdpXbTbjqyLIdZhu69dpqOOb+9lhQsUQ2LJh76B 3KNhGK5YCVPGpFTJsHUB1kEHnzTvzeTkSaSFrKMa1KjsFsY218o4IXOksIrQ+bY1iHsi W4mxOpKGxkzguMjZJ4S9OwcJa6a2wUFV/PF9XOdzVeeC5/FjmepZqBNGTzhrD0Fbm7kS tiFokCnL0UDRMkxqj0xjA/DhGvhDyRsrAgF38h627rz09wMftkBqVZ//EkwLH2TgfYO4 NvCPwhNvNvGQTbJo3Jk2nlHYiGSce/nusVMT5w2dXH1yNbz3PHrNnRuUq2Zq58yb+VlA gwgw== X-Gm-Message-State: AGi0PubKypgjIgiUPPE3L5fdpqCNHED5AYMkS3CFpdWemNsgnDRgEfuQ RP226PISyFG88lS+v8TOUBU= X-Google-Smtp-Source: APiQypLayTQof9lYylm57lpgti/H1JfqmiELzzldfaR9W21rrDdqRYpQ8ESnur/ZOkmR/FlW1RG22w== X-Received: by 2002:aa7:843a:: with SMTP id q26mr24613503pfn.240.1588019019220; Mon, 27 Apr 2020 13:23:39 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:38 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 10/18] matchpathcon_fini: annotate deprecated Date: Mon, 27 Apr 2020 15:23:07 -0500 Message-Id: <20200427202315.4943-11-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 940c43eff8c9..b04f34a1b3bb 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -476,7 +476,11 @@ extern int matchpathcon_init(const char *path) extern int matchpathcon_init_prefix(const char *path, const char *prefix); /* Free the memory allocated by matchpathcon_init. */ -extern void matchpathcon_fini(void); +extern void matchpathcon_fini(void) +#ifdef __GNUC__ + __attribute__ ((deprecated("Use selabel_close"))) +#endif +; /* Resolve all of the symlinks and relative portions of a pathname, but NOT * the final component (same a realpath() unless the final component is a From patchwork Mon Apr 27 20:23:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513267 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 60E421392 for ; Mon, 27 Apr 2020 20:23:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47FA52073C for ; Mon, 27 Apr 2020 20:23:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rKFjzPNq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgD0UXn (ORCPT ); Mon, 27 Apr 2020 16:23:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726972AbgD0UXm (ORCPT ); Mon, 27 Apr 2020 16:23:42 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD39BC0610D5 for ; Mon, 27 Apr 2020 13:23:41 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id x26so9192193pgc.10 for ; Mon, 27 Apr 2020 13:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W1L3bA+GPmHiUflkrWsIYtotwIeleU9ISeIFILRnHcw=; b=rKFjzPNqyF3DidioVqXxF+MNtlqxwstXef3LQxdIfll030WoJPZS1ag3S+Mhb1zjBx fAuDNdgu6PiCDaKnYuc6jKN/C/Xf5rsBIjVgote0cUmhAzb1RIL47HtJk5vQnXP/xXyj qiTi5b4tMGgK5O0uOGaPEYM/VTYItPhY0zQrThFUdbUrVwPseFJjiqMPHRZoUb7el0Rz 7yFsfZwnzBSCxFwuNycfJxRsZ5+nMtahnJFqyL/JcR/w0tgiOyYEspX6b1EXb6uxgpvb VD2BpB2i//Dw3e7qBmHDEVpAFd8SEu6jbVZkDNRxPrAeeESvUaT/XCuEiDNK9bc1gZ5X HXTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W1L3bA+GPmHiUflkrWsIYtotwIeleU9ISeIFILRnHcw=; b=qGFnWVIyYdrrar8g3Zvt7P3mfOnb5PGCzSeMu9UPi3zKs4VYHhonmgGSnrXzxzxcyV NnvsUX2j1l4ul3TYPejis1ZIVt2gNyfGojXGQlVdxh9Fr5fUH4zo04sQDMkciDCmj5/y k4nSg1XcU1N25FtcfF1n/LhSZcdehZQ6Phc1UO4w8gT2pb0zAnigBBMbe0WNgHELLD02 XaaijZ+lFD4OeKex7yn9zrx1AwlnRlCQeMs7U89gCv1ZFP0GyOAtTH3uUmSQjMxTu/nw ZkGu0JJuFmdk2xy6PKrvG/5Ylo5aR2ORsU7InUK74O7Y0g0NKVfGeHoqQDz6SMv+5P2I KchA== X-Gm-Message-State: AGi0PuYtQprrtbzjuDcjaEBI/ru9WJHuVgdPb2MeU8+xEqi0kXf/b9E4 arzQIncxm5pPNorzlckodo4= X-Google-Smtp-Source: APiQypKvOPTWHcCpz1G7sfIQEou/Wk9hxGrXMveIlJywMhE2T89AsiMremZM4H0H6ixyTuNGpEBWmg== X-Received: by 2002:a62:1549:: with SMTP id 70mr24583945pfv.43.1588019021372; Mon, 27 Apr 2020 13:23:41 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:41 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 11/18] matchpathcon: annotate deprecated Date: Mon, 27 Apr 2020 15:23:08 -0500 Message-Id: <20200427202315.4943-12-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index b04f34a1b3bb..5633cf40607d 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -494,7 +494,11 @@ extern int realpath_not_final(const char *name, char *resolved_path); If matchpathcon_init has not already been called, then this function will call it upon its first invocation with a NULL path. */ extern int matchpathcon(const char *path, - mode_t mode, char ** con); + mode_t mode, char ** con) +#ifdef __GNUC__ + __attribute__ ((deprecated("Use selabel_lookup instead"))) +#endif +; /* Same as above, but return a specification index for later use in a matchpathcon_filespec_add() call - see below. */ From patchwork Mon Apr 27 20:23:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513277 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 3DBCA1392 for ; Mon, 27 Apr 2020 20:23:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 265C62073C for ; Mon, 27 Apr 2020 20:23:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dFyYZUcP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbgD0UXv (ORCPT ); Mon, 27 Apr 2020 16:23:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726972AbgD0UXn (ORCPT ); Mon, 27 Apr 2020 16:23:43 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4693C0610D5 for ; Mon, 27 Apr 2020 13:23:43 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id h69so9194828pgc.8 for ; Mon, 27 Apr 2020 13:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C+dBKk4sABQjXVUTCO4ckp0agCDAnLVwhF1NHIjUJOw=; b=dFyYZUcPS5yjkIOBoF69NuqXsXt85uQBLWr5fuWrmfFvKSanzUqa44SLOWXIynm3ZX uOWKEZBaj/ZceHmxO+hQYyCSWd8BVBEs9vg4ctC3pWcupRYEwbFnQX+FSymGlgmRFvIh z4wxVToKx4VZ9eqC27yjZhiZRxxxHej8ksk+CRjbWR/oh/nDwlxft7x/Uf/74An1NnGU Bjm7T4W/+gWPMvfiFGF4rJnIgx0uZuASLwVzp+bYVBqPhaHMROCa9D13VqLxxEfFerGp FS95YcEBtKYmD4+5GS+aKFabihjcPK9kE6KS1Ij3WrtiCk/z/yxlnuJCjqJOGAWK+1jE NBpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C+dBKk4sABQjXVUTCO4ckp0agCDAnLVwhF1NHIjUJOw=; b=BtLUJvndkOmF2o0rfqfyKLCA0TFxcqWLxpQFVgkal08hWHvhMkwj8B1Ayc6B5qJ6yZ tTqK3PiHMYitSy6yBaEAYtaskzkMvC7B/KQ89s+WdQ78covzWf6j8+uV28M5w+0cWhZ+ TcSqT7KAFHAwD9kWLWC99GnT8tQ6yRC0QFwDUxtWZjt+kvwX9xYjEz+rhEUM4lOPBbew 05IxQD0Gjprhqej5RtEg0jbObkbdHCqTQXYQZm3VpSIjQsTyhMFcXX2M/VR8lZySlPyN Mwj8m4lrE9vH5lx1COyaVeWgeR55f0I1CUC85+oN5cIEIeIbdepAVzbtwFm0VZEVeSJL 8FKQ== X-Gm-Message-State: AGi0PubkIvgOuVLfTitSCsoAT0XWVxAs36eKC9Dkxx0SESC/xgLST7PE dPb+LQVrZ4SehYbwtAe1RNY= X-Google-Smtp-Source: APiQypK7+QpPv64NYv+DzwPBgAK+gF4fvoWU30IvSZ0/KcV+vzGrhOJjdqxpmSTIwYn9Jr0kJWwJ8g== X-Received: by 2002:a63:651:: with SMTP id 78mr23584143pgg.129.1588019023165; Mon, 27 Apr 2020 13:23:43 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:42 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 12/18] avc_init: annotate deprecated Date: Mon, 27 Apr 2020 15:23:09 -0500 Message-Id: <20200427202315.4943-13-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Signed-off-by: William Roberts --- libselinux/include/selinux/avc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index c732824129cb..9b23357ad17f 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -200,7 +200,11 @@ extern int avc_init(const char *msgprefix, const struct avc_memory_callback *mem_callbacks, const struct avc_log_callback *log_callbacks, const struct avc_thread_callback *thread_callbacks, - const struct avc_lock_callback *lock_callbacks); + const struct avc_lock_callback *lock_callbacks) +#ifdef __GNUC__ + __attribute__ ((deprecated("Use avc_open and selinux_set_callback"))) +#endif +; /** * avc_open - Initialize the AVC. From patchwork Mon Apr 27 20:23:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513269 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 C992514B4 for ; Mon, 27 Apr 2020 20:23:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF1762073C for ; Mon, 27 Apr 2020 20:23:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eA1XRH/X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbgD0UXp (ORCPT ); Mon, 27 Apr 2020 16:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726942AbgD0UXp (ORCPT ); Mon, 27 Apr 2020 16:23:45 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B90CC0610D5 for ; Mon, 27 Apr 2020 13:23:45 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id z6so7405479plk.10 for ; Mon, 27 Apr 2020 13:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kji8lSzPW87/KBKeOqpyZj6X7Z0zVGICZCNCndAUJME=; b=eA1XRH/XQ/3O2fLyuotixAi5i29aJAazJQT96jGoxCT1soFH2lkLXqMY/J/7W0xlMc YNP/yGU/YnYtSYOk+mujLyK3iSHL899S0H/FO7CdUIMOjy6RRSruQ40n7a7stYzvLfhR 3sgSL/NicXO23lemRyxkv9Ucx4Gr/N2X5M35B27PCIcgiYtlP6cEOd0Xd+EHxcbwfGyA zsOekwBu05L6fgLbJqHM/b0hjw7AZ43Cn88ZJXglafUbHVh8aboR0oD+T4Doq7/YnMHh kf+aG9ZqjQ42ipiySEUr0X0g76KQREVKVW+Vtl4lnWHPIoVjXij7kLxKAHYMXnZpwntM S+qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kji8lSzPW87/KBKeOqpyZj6X7Z0zVGICZCNCndAUJME=; b=hVPLAvUbMk6UJyR/8r1E8WNjejVTBulnk0F8aL/PKXfytDHH5dtGezWpn7C1MI0ab2 skHt5w2ZeCQvFai75cnZZ8Zx9Nfwa6NLT+xNpKkBB59U3Zf1VPD2DxYAG7AOuzCqb4ue kyWoKEZHlfOX5G3HzpxE1vnX0E2dlg1b2y+bhVjZ5JR/uUlBZZsYuRdzvJNH04ohchMj ByhEpns4m5V/qJUvDKWS+BGz2BQlj1AWfvToiROuLEo38XMTUqaKmxzIvTKFXgGw1C8e qyz6lBDdROBpbs0Ou16nxpDy5BS+qfWb1HyRjrqq9doiW5k2Cp5U8nfuNblXLVBOCIxo DY+g== X-Gm-Message-State: AGi0PubkemeG4QC98wsO25C+FS6Xko+O2FZjuO4locaqvTOiMgON10lY lAjSfOwLESyQwmGjyUro24Q= X-Google-Smtp-Source: APiQypKrZuCyuPhsw/t2FtK57EejtN6//nqS7MeTL8mQfSGY6KCpRS1KLjzLu6esMTAt29onPewFdw== X-Received: by 2002:a17:90b:3843:: with SMTP id nl3mr557471pjb.72.1588019024633; Mon, 27 Apr 2020 13:23:44 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:44 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 13/18] avc: create internal avc_init interface Date: Mon, 27 Apr 2020 15:23:10 -0500 Message-Id: <20200427202315.4943-14-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Now that avc_init is marked deprecated, create an avc_init2 interface for internal users. Signed-off-by: William Roberts --- libselinux/src/avc.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c index ab10b0f9f1cb..b4648b2de170 100644 --- a/libselinux/src/avc.c +++ b/libselinux/src/avc.c @@ -145,22 +145,7 @@ int avc_get_initial_sid(const char * name, security_id_t * sid) return rc; } -int avc_open(struct selinux_opt *opts, unsigned nopts) -{ - avc_setenforce = 0; - - while (nopts--) - switch(opts[nopts].type) { - case AVC_OPT_SETENFORCE: - avc_setenforce = 1; - avc_enforcing = !!opts[nopts].value; - break; - } - - return avc_init("avc", NULL, NULL, NULL, NULL); -} - -int avc_init(const char *prefix, +static int avc_init_internal(const char *prefix, const struct avc_memory_callback *mem_cb, const struct avc_log_callback *log_cb, const struct avc_thread_callback *thread_cb, @@ -246,6 +231,30 @@ int avc_init(const char *prefix, return rc; } +int avc_open(struct selinux_opt *opts, unsigned nopts) +{ + avc_setenforce = 0; + + while (nopts--) + switch(opts[nopts].type) { + case AVC_OPT_SETENFORCE: + avc_setenforce = 1; + avc_enforcing = !!opts[nopts].value; + break; + } + + return avc_init_internal("avc", NULL, NULL, NULL, NULL); +} + +int avc_init(const char *prefix, + const struct avc_memory_callback *mem_cb, + const struct avc_log_callback *log_cb, + const struct avc_thread_callback *thread_cb, + const struct avc_lock_callback *lock_cb) +{ + return avc_init_internal(prefix, mem_cb, log_cb, thread_cb, lock_cb); +} + void avc_cache_stats(struct avc_cache_stats *p) { memcpy(p, &cache_stats, sizeof(cache_stats)); From patchwork Mon Apr 27 20:23:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513271 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 02FBB14B4 for ; Mon, 27 Apr 2020 20:23:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE3B12073C for ; Mon, 27 Apr 2020 20:23:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kv5/45Z6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726995AbgD0UXr (ORCPT ); Mon, 27 Apr 2020 16:23:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726992AbgD0UXr (ORCPT ); Mon, 27 Apr 2020 16:23:47 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E30F4C0610D5 for ; Mon, 27 Apr 2020 13:23:46 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id n24so7399034plp.13 for ; Mon, 27 Apr 2020 13:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PSoRouKHeNtmv+72lDynxRu0K13hdFcIhm1sS5pa+Xk=; b=kv5/45Z658XBZIRa4mYUcGQef31AoPEfUDpP7mCHoTqZUKTccWW8eXxn08yxnXMyn9 gGORUIPWzGN6qxeiNpa6Z4/BMfKM8ilf/Hav6Z/JoYNCQi9kwL4o5PGsas++jzl2HVDO y+ehgHRlBainToU5802MHK8nit18+xAW3Z1yLlRBeIVH9EoqwliWOIN02aEgQfzm7oCr fzkFdexlXcU8iE8sCjWDVMXSE27537l9UFATGr62bnOpM9zAGegHsHxE167L1FsJ5jI3 r9TXCg2y/ErRpaGU53alChuu1oskarkSomYLc9mEUSo6KKr+22X6yHJ3M/eaBbu3E6IV noWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PSoRouKHeNtmv+72lDynxRu0K13hdFcIhm1sS5pa+Xk=; b=ghqvT7SW+o8LaHldSHQsnulETqYP1FjEqbzQIOtBQMOVcuqFRfYZJplNJ665ZHPzPr snBDT9i12F7fvDtzvaigyZbvRtSUsm7r4bUmW6Pl+Dda4y5LQ2plvJ1hFC7q+YdRArA+ fgZ2AQ5Uqa3o8h5+TYl25tbBZAF39d0QysLCDSbB1AaDBiChXc+hX3ySbHc+OaR0pg3w nr5Hs44fTCmNlmHzJGV0LTv3gw+LaUftDy3Cwx6cCF6FmMMRTeb0nE+q1ivGPan2nM72 9WVYrdEm8et/FWNxkkr8OsUTAGM1kWCnYZ4bHGZzu7OB55JMOcLgAeCh8ov2NZhmTKKW Di9w== X-Gm-Message-State: AGi0PuZzYouXGWC+O0z28MVB94VJMOO8g+pX4XUOo4Aggfjti9wYxc6g r7K+sDahh3wMlXr/FVLwF7f0Xr6ZTr4= X-Google-Smtp-Source: APiQypLQ1AerL4Fuphxzo91JMltHxqKvqRgGu5HSck29STUP8DFIUzDSWRwTM5Wms40dRFpAqPYCWA== X-Received: by 2002:a17:90a:d34e:: with SMTP id i14mr473821pjx.135.1588019026403; Mon, 27 Apr 2020 13:23:46 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:46 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 14/18] matchpathcon: create internal matchpathcon_fini interface Date: Mon, 27 Apr 2020 15:23:11 -0500 Message-Id: <20200427202315.4943-15-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Now that matchpathcon_fini is marked deprecated, create an matchpathcon_fini2 interface for internal users. We create a new header file for matchpathcon_internal interfaces. Signed-off-by: William Roberts --- libselinux/src/matchpathcon.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c index bddf77a49ce1..2ec66650cae0 100644 --- a/libselinux/src/matchpathcon.c +++ b/libselinux/src/matchpathcon.c @@ -315,9 +315,19 @@ void matchpathcon_filespec_destroy(void) fl_head = NULL; } +static void matchpathcon_fini_internal(void) +{ + free_array_elts(); + + if (hnd) { + selabel_close(hnd); + hnd = NULL; + } +} + static void matchpathcon_thread_destructor(void __attribute__((unused)) *ptr) { - matchpathcon_fini(); + matchpathcon_fini_internal(); } void __attribute__((destructor)) matchpathcon_lib_destructor(void); @@ -359,12 +369,7 @@ int matchpathcon_init(const char *path) void matchpathcon_fini(void) { - free_array_elts(); - - if (hnd) { - selabel_close(hnd); - hnd = NULL; - } + matchpathcon_fini_internal(); } /* @@ -427,7 +432,7 @@ out: return rc; } -int matchpathcon(const char *path, mode_t mode, char ** con) +static int matchpathcon_internal(const char *path, mode_t mode, char ** con) { char stackpath[PATH_MAX + 1]; char *p = NULL; @@ -448,9 +453,13 @@ int matchpathcon(const char *path, mode_t mode, char ** con) selabel_lookup(hnd, con, path, mode); } +int matchpathcon(const char *path, mode_t mode, char ** con) { + return matchpathcon_internal(path, mode, con); +} + int matchpathcon_index(const char *name, mode_t mode, char ** con) { - int i = matchpathcon(name, mode, con); + int i = matchpathcon_internal(name, mode, con); if (i < 0) return -1; From patchwork Mon Apr 27 20:23:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513273 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 5B2EE14B4 for ; Mon, 27 Apr 2020 20:23:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43688206E2 for ; Mon, 27 Apr 2020 20:23:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jz3bRdYR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbgD0UXu (ORCPT ); Mon, 27 Apr 2020 16:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726758AbgD0UXt (ORCPT ); Mon, 27 Apr 2020 16:23:49 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E8C8C0610D5 for ; Mon, 27 Apr 2020 13:23:48 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id fu13so113092pjb.5 for ; Mon, 27 Apr 2020 13:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wiVoXHCZfOfoKdhi+sHyBpp+DYMa9HEsPbAr/QfHrLk=; b=Jz3bRdYRe4VJZwPfbBe/G50w1eydjl2N1Vuour6b2QyKdHYpAKX11JabUyP22LLzeU GOehsWgG/EjdAllfMCtZ53EuI3COyNxEV+8zxDJfUHcrZ+j7Zf7jYU/3L1+BmJslsaxb zQ1TPznoKMANWOezSZLGsirixEsvLNMdb8lNu6/h0fIaMrHehdQ5UAuUFy3gcpqVsmqe c/ZRHIior6YxsWTP3KIXFzxxewNedwmppxgCO6HLbq/Dzgrd/lbv4gBxEMPR3Y8yEno+ WwzSHQhaMYxEA/1sejsM2U1GhVpaxVJrejn0RW/GsLdEVXYbrkkuu6zMwaMJWJZ59lUm DycQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wiVoXHCZfOfoKdhi+sHyBpp+DYMa9HEsPbAr/QfHrLk=; b=EnKvJjMnbQnVGTt231m6AboC6OhvAwmzWH4m6OlRIrtVgIIWVkm1D27AT0a1VHrwtR rGZ/oOT3ANxZDmeL0ogeZ1FV46d3mMCPRLmMAaSft14HK5q/UFtzZ4tRgDqR8BEITgX9 D/fnA4w/FT7sWYx65FIXfrNsUNrlMP5B7SIh9IBPDJzXR94d/5IJSyoRCcQ8dtGQC7VU dZ60A8kSCFaJe2iTVJk0G82Vqk9GR4Zy4QXJ3Gct5R69bbttGhC4L4woTNxbTqXD3INm +2JTv1M907B1fXnve7XvOfkN8Y99x0aAHqJwy8Wnh4ivuZB6d5rTMO6m+5xSISRFzBxb hIPg== X-Gm-Message-State: AGi0PuYYRfo1wBwtGLmYvzZRCGLzYNbPacQUevRVO4Ehr+0QFap3LAo1 KM3rV/vS1jVDy3A+T5IKDiA= X-Google-Smtp-Source: APiQypJ6Jr3MKTICLLufvuBjQxBjJr0VCSbbSjtSmycONxpjNleEz7uaQ2WZMjb55EsR/9KdYpbgKw== X-Received: by 2002:a17:902:bf46:: with SMTP id u6mr16813996pls.318.1588019027852; Mon, 27 Apr 2020 13:23:47 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:47 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 15/18] selinux_check_passwd_access: annotate deprecated Date: Mon, 27 Apr 2020 15:23:12 -0500 Message-Id: <20200427202315.4943-16-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Update the one internal tree caller in the same file to call selinux_check_passwd_access2. Signed-off-by: William Roberts --- libselinux/include/selinux/selinux.h | 7 ++++++- libselinux/src/checkAccess.c | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 5633cf40607d..aaf28ffdf9be 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -630,7 +630,12 @@ extern int selinux_check_access(const char * scon, const char * tcon, const char /* Check a permission in the passwd class. Return 0 if granted or -1 otherwise. */ -extern int selinux_check_passwd_access(access_vector_t requested); +extern int selinux_check_passwd_access(access_vector_t requested) +#ifdef __GNUC__ + __attribute__ ((deprecated("Use selinux_check_access"))) +#endif +; + extern int checkPasswdAccess(access_vector_t requested) #ifdef __GNUC__ __attribute__ ((deprecated("Use selinux_check_access"))) diff --git a/libselinux/src/checkAccess.c b/libselinux/src/checkAccess.c index 677e2ecd7df4..3491fded7895 100644 --- a/libselinux/src/checkAccess.c +++ b/libselinux/src/checkAccess.c @@ -64,7 +64,7 @@ int selinux_check_access(const char *scon, const char *tcon, const char *class, return avc_has_perm (scon_id, tcon_id, sclass, av, NULL, aux); } -int selinux_check_passwd_access(access_vector_t requested) +static int selinux_check_passwd_access_internal(access_vector_t requested) { int status = -1; char *user_context; @@ -99,8 +99,11 @@ int selinux_check_passwd_access(access_vector_t requested) return status; } +int selinux_check_passwd_access(access_vector_t requested) { + return selinux_check_passwd_access_internal(requested); +} int checkPasswdAccess(access_vector_t requested) { - return selinux_check_passwd_access(requested); + return selinux_check_passwd_access_internal(requested); } From patchwork Mon Apr 27 20:23:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513275 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 002DA1667 for ; Mon, 27 Apr 2020 20:23:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBB212073C for ; Mon, 27 Apr 2020 20:23:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kwXBxSZ/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726758AbgD0UXv (ORCPT ); Mon, 27 Apr 2020 16:23:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726456AbgD0UXu (ORCPT ); Mon, 27 Apr 2020 16:23:50 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 010E7C0610D5 for ; Mon, 27 Apr 2020 13:23:50 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t7so1491992plr.0 for ; Mon, 27 Apr 2020 13:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Q86dvL0fgMsxhbOXy6t11FAfTgjjVDHq4dE+YOyTIPg=; b=kwXBxSZ/i1/kafp7LZ4D51KQmMxZw/7OeQuMoo7ReEgP8oMANKd0Wl788HL0+v610M 8H6UaA1K3Nk9ZF02SPb+6J1zcaGm1fKmOfgIQeSInontbFUwRPZU6BbOH/JfCd8Jpnn7 PZKyGJpanWU137B5QihatlC1xkCEfoUefbcbRQHAG1ceZtMczSwRUzb8UaiT6+aszpC7 IPjbZ77pg726pxNLGf/zaIvDABDEYeugCSKIErydOgHW9xgLE+/SnEqjBTBtsysBrt5t dPQPO5WedrEU6PFew9O77GdzjhM1gSTXO535dtvm8VxJamMJHWX9CCG0g95DiEV/IY+l Bjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q86dvL0fgMsxhbOXy6t11FAfTgjjVDHq4dE+YOyTIPg=; b=kahligrQb/mr1UnQkSjm4Awk/8/txl8T3KrwAM+N/f/l6PdzYHtU83TXRlyOFmSoNB mM1Uf1bR3LJ2/t1Y/hkC7XPzskFl9o2yosb6mXCMjTmfXxrUzYeuNpotPi1CRMNe1VoT dNvU19vsEB7W3lfRYthanAA2GgHNK7g+RGrSD4PI8DS/sMo+HJjsi1M1+oO6ug4ZnE5/ AAkM0XKK+6sJ1dxMduPjThBOrENjvcMpd6HCJzOIMW6QFpvMDzw4xJfkMBv0wqF7c5nq z0vjDK879DJ1qud//ODvMMJQTOVnH3SrNy+U2zjVrfgWbE2wLnVbXeQSJF8rNDLLHBOp 3aMA== X-Gm-Message-State: AGi0PuZlKOQFjK37pDf0QU7s914jrRlfVXQtHwruUptcQjd6C4hdGxEB 70dckM3Gycmq48iaYaaiqaw= X-Google-Smtp-Source: APiQypKCq/oBtC+JGz+Yd8mnskrVtqHRNgbrz0Lw61z51Acmxvvj2IeS0HXTsm5jXAQHVXEZqZ1jxQ== X-Received: by 2002:a17:902:d697:: with SMTP id v23mr22925193ply.262.1588019029518; Mon, 27 Apr 2020 13:23:49 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:49 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 16/18] matchpathcon: allow use of deprecated routines Date: Mon, 27 Apr 2020 15:23:13 -0500 Message-Id: <20200427202315.4943-17-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Utility matchpathcon uses the matchpathcon interface which has been deprectaed. However, this tool will continue to live on, so allow it to use the deprecated interface. Signed-off-by: William Roberts --- libselinux/utils/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile index b018a08acbe0..aa2d3e1b144f 100644 --- a/libselinux/utils/Makefile +++ b/libselinux/utils/Makefile @@ -56,6 +56,8 @@ sefcontext_compile: LDLIBS += $(PCRE_LDLIBS) ../src/libselinux.a -lsepol sefcontext_compile: sefcontext_compile.o ../src/regex.o +matchpathcon: CFLAGS += -Wno-deprecated-declarations + all: $(TARGETS) install: all From patchwork Mon Apr 27 20:23:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513279 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 E88BF1392 for ; Mon, 27 Apr 2020 20:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C64D72073C for ; Mon, 27 Apr 2020 20:23:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fN/88/eV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726540AbgD0UXx (ORCPT ); Mon, 27 Apr 2020 16:23:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726364AbgD0UXw (ORCPT ); Mon, 27 Apr 2020 16:23:52 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5296EC0610D5 for ; Mon, 27 Apr 2020 13:23:52 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id r4so9191135pgg.4 for ; Mon, 27 Apr 2020 13:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qo/M9ma8hAwhDuNMFiAuZ2jdy9oV5PDzurKa+6UdQu8=; b=fN/88/eVLfNxt9P8Hpq2TmaqZWV96IZ9a8xriQR4qF7RyQFgZuNoEpyyuLIWRLqBp/ 5uiMTjMwfsjr6xgGEpn93mOI1CWcEpZdpIsn2IOcMyaN4jUbxDu9KQTbp+7Ps2RYHuK5 uHzAHRVrWMvPzqZ72Z52EMAlLnpbarbS0aSqUItK3Lb2oXK3qlAsmGU+bNnFLp8rRK2z FI4B58fAXnJoRfL654cA5WD7oHz6s/hQLUAVGf1HYDBJBQfX9ZSgOoYPU5CEhhdHTmJA XTg/JA2s+5FBHizOHX6UG2fBeJhCTaUIv8HMzeLGH0aqj/v+N4QF7jkujJP8Ifjkp9K4 LopA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qo/M9ma8hAwhDuNMFiAuZ2jdy9oV5PDzurKa+6UdQu8=; b=Uuw94ZHX5MlmP2ioI/IctRObneee8MOSpaEmc/WYJrVDnJagIijNs2fPSAyJVH0j7o TbD8Q2NgEoyvavpObpG22Iy2qf6Mio1in5L+CWksn3NNiwiJKcyK3nwdzbEPDZw91hLH ZbcR2O7ywQxR9tO3QP/Md3/4lFhrhIQt93eLWZSv+M3Mn1NrV2dC/ToQxWz72d6sbT6N 3UaZ8QeDRNPDofQWQHlcft/hqH9Izy3617ipdcniAZZHpuHCX8iTN5CFz3cPNPcb6N5x QHsSUQ06w0eVkUsoDWJZ8E3178x683DegflABStgCXh1zxOu5bfTSTYzX/oFzGBIQvKn DV5g== X-Gm-Message-State: AGi0Puaxa6VBB6ESLEmOHENXZdxGgsToyVjo64YvH3JsXwec/akVB2P7 YI4v8hNOD0YNYMymB4UXwrQ= X-Google-Smtp-Source: APiQypKUepUI6LtlZuWNh+471rNXZ8BYm066Cg5endivb5o90ehljGYMDGuaFPG5fTfeGv09yUXN7w== X-Received: by 2002:a63:f50a:: with SMTP id w10mr23819002pgh.181.1588019031732; Mon, 27 Apr 2020 13:23:51 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:51 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 17/18] utils: matchpathcon add deprecated warning Date: Mon, 27 Apr 2020 15:23:14 -0500 Message-Id: <20200427202315.4943-18-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts Add a deprecated warning to matchpathcon encouraging users to switch to selabel_lookup. Signed-off-by: William Roberts --- libselinux/utils/matchpathcon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libselinux/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c index eb39a1881066..cc018d213f4c 100644 --- a/libselinux/utils/matchpathcon.c +++ b/libselinux/utils/matchpathcon.c @@ -73,6 +73,9 @@ int main(int argc, char **argv) int error = 0; int quiet = 0; + fprintf(stderr, + "Deprecated, use selabel_lookup\n"); + if (argc < 2) usage(argv[0]); From patchwork Mon Apr 27 20:23:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11513281 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 8040118E8 for ; Mon, 27 Apr 2020 20:23:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 648FE2078C for ; Mon, 27 Apr 2020 20:23:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vbjvBGFk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726364AbgD0UXy (ORCPT ); Mon, 27 Apr 2020 16:23:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726743AbgD0UXy (ORCPT ); Mon, 27 Apr 2020 16:23:54 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB8F2C0610D5 for ; Mon, 27 Apr 2020 13:23:53 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k18so7414525pll.6 for ; Mon, 27 Apr 2020 13:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=STKcgyAYLyPwimzGvxdtUzzEbb8zdagndp28hkuz3NM=; b=vbjvBGFkzAfpbaZ8Rs2pOAPMZDe4p4XIrLJa1ecV7JKIgH8EEIT4DUg1qOYtLY/WuA SLCHtmL/T2M1Ifir6UXymLIr98W7y4AEQP6dwBaryInbF1lRTH6GEgvswG2TVuR0Fxp9 8gXJ7mQEAIAmb1VwmD16tEHjQXr0Iy4tKKWOFRgSLXla4hDeODwwwG/2d7z70HmQWC2n DsqnZH+o2tClI/AOBAQMNgzuYEa3nkCFy8Dk9ZjMpdnlnbSidqjU0LOpQlu3Z+5lnIxq oKx+eaCB1yZxn15XagD2+xBGpEp3UJSQwXMDOSf53u2Cp17fR9UiegJAUPpRM+inBm1j B9Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=STKcgyAYLyPwimzGvxdtUzzEbb8zdagndp28hkuz3NM=; b=nXBLcxevUZ9cOrb8knCoO/2J2oHGSx83EYa9hEfQfkihed+MUW4fvkJe4KKecJbhnO h167PwoWkMELA1Q8+jLMHuYcYVy7MI8CIujnOlLDJq6lofQiIDOUIbZCmGSAuobMSY4H 552eIHiwRXJgedMN5Z0QXh6cPlYCSN4bkgTv7INTJcDuzQUeQvGfG7t6Efl1ty2LLViY vRggcp/FAm7Znzb5v2YjOXRZkw56B2bcXKZ6NFBr7Xj0jjIKFZ4mIvC6PMAEjmZMp1yD 5UgMkmzkRXLFo8jGogyeMJa3GePX4hzTTfMSPt6zN11s5cj8cb+aSM3LPL7ZUTWatsT4 hnug== X-Gm-Message-State: AGi0PuaJ36bJ2UIUt2i9wDNGp8sMwNDINSkSy2cBNCSyCnD3G0jPbJYE 3TxfttvIEbmEuwpoaRing1g= X-Google-Smtp-Source: APiQypIsPnK6Ct9ozAGA4I4fXeA5gmire29Yf49N/XFyrhkd+XDi6WTgtW0oJbLO9SQqH8wBmf+Tbg== X-Received: by 2002:a17:90a:2943:: with SMTP id x3mr494969pjf.63.1588019033419; Mon, 27 Apr 2020 13:23:53 -0700 (PDT) Received: from localhost.localdomain ([134.134.139.76]) by smtp.gmail.com with ESMTPSA id n30sm13329438pfq.88.2020.04.27.13.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 13:23:53 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v4 18/18] Makefile: swig build allow deprecated functions Date: Mon, 27 Apr 2020 15:23:15 -0500 Message-Id: <20200427202315.4943-19-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427202315.4943-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200427202315.4943-1-william.c.roberts@intel.com> Sender: selinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org From: William Roberts The SWIG C build should allow deprecated functions and not warn on them because it is exposing the full interface including deprecated routines. Signed-off-by: William Roberts --- libselinux/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 9992221f5fc5..73303c3666c9 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -105,7 +105,8 @@ FTS_LDLIBS ?= override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \ - -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations + -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations \ + -Wno-deprecated-declarations RANLIB ?= ranlib