From patchwork Tue Feb 25 20:02: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: 11404519 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 6005913A4 for ; Tue, 25 Feb 2020 20:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E04D21744 for ; Tue, 25 Feb 2020 20:02:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nB2p+acB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730953AbgBYUCk (ORCPT ); Tue, 25 Feb 2020 15:02:40 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:39275 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730961AbgBYUCk (ORCPT ); Tue, 25 Feb 2020 15:02:40 -0500 Received: by mail-pj1-f65.google.com with SMTP id e9so183985pjr.4 for ; Tue, 25 Feb 2020 12:02:39 -0800 (PST) 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=WWiCjevwx9oSwa3spOQKQxkLTwNuVsw2YwnfJ5bbW80=; b=nB2p+acBTZOoOhKEqADex/+4gkNLsfoCs3Bss+jKWwt8+WSZPBLZysyrutHHG1DAhH xr335wcoPrmvqxlCNNMm4UmFXhw3mU7krXlqVUDv4biD4zicazJLl+wlZkdJruJfJkLp gimv1qH91acEC2qKkVVJjfYdhFDIZOMg+acmQLB/ruJRBW3lhyX5aYMAd7RypS5b6bnQ 51jyRSfzpgrTT5dlbJUChwkmwNHCb7IMvh6groWKZ/juUl8GTFhA6AXfFY4VV5mJpPxW oRMVUWGvqc95ZHsOgLlZk9RfMi3U+h3Xfh8fgLBcX7v5AAgAmK42GTM+giEEAzjm73S4 wL+w== 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=WWiCjevwx9oSwa3spOQKQxkLTwNuVsw2YwnfJ5bbW80=; b=sQjzPHn1pMKgQlEnlKO/+yifmWIw04EDzRlnJwZ0FVO8JkcYirF1FQR6RwVLFbiqvJ cqYxh+ndmasEe88WyyipsYy5+E7yjH7QZULwvhqnGJBXXAKJv5XJvEIV3l+gk8D6YzwV sJoYx4zDcSMals4qSVrw7HIcHQbNQZhwo8CSm0L2Iqa+iQ0fXiu18ONV/H+lBJBUrrpL SWC/xUzUk73sH/beB7zn4ayyBaQ1BV08i9VHcTFzIus7rMYOt3HXrGKfDQJtoPMFYa5C CDczWnInRReOWiMYUK0ljQaqUgBQEspuq2iJ3yiwomGuLm9cV4cmeNQorBZ5gZNm1vzf O9Hg== X-Gm-Message-State: APjAAAWPVwwZKEDJGEXI1p/mMHm0DeHosBtSPu4zt0pXvnvN8Xao3Ajh H4+g//0WwhHPN8Tyr0061TU= X-Google-Smtp-Source: APXvYqwQU20IvbNIZFk6sRMiWMjEq5rUHsA0bZUBBOumQjvbj7OsleubhRSoZNoKv901G+tAkxaRzA== X-Received: by 2002:a17:90a:3841:: with SMTP id l1mr803017pjf.108.1582660959218; Tue, 25 Feb 2020 12:02:39 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:38 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 01/17] security_load_booleans: update return comment Date: Tue, 25 Feb 2020 14:02:03 -0600 Message-Id: <20200225200219.6163-2-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 883d8b85742c..ee808dd954ad 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -319,7 +319,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 Tue Feb 25 20:02: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: 11404521 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 98DC513A4 for ; Tue, 25 Feb 2020 20:02:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 779CE21927 for ; Tue, 25 Feb 2020 20:02:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AqXeCmY5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731665AbgBYUCm (ORCPT ); Tue, 25 Feb 2020 15:02:42 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38939 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731645AbgBYUCl (ORCPT ); Tue, 25 Feb 2020 15:02:41 -0500 Received: by mail-pl1-f193.google.com with SMTP id g6so243982plp.6 for ; Tue, 25 Feb 2020 12:02:41 -0800 (PST) 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=p1GByf6fsu6kmddAau9KLY0+hGhmNnwPe1Shj/m1U6Q=; b=AqXeCmY5IvPepWRvxoeKzkTP2Tdn+bclC6xw/XTDZo6CEMsi4RvdGbs3NVE9U3azoh mxLYIf3e71fth1lkgXfee7L1CUWXeNesDv4C5dluij/VEjHvezKoiEUGM9MN0ZPzqvAS 3j2G7d5i0vK8foAQ6eQvA91hTH9KvzmJ6BowOnmBc72aS1cJkRo1NnkYJTXtXBlV9Y0j jGmOZu5qX2I3N6twiUUcrxvG8EC1KyGwZ3K7I+6cYWTTvXBB5/WwR0vCN2E5bDUrwoXR uN5DIfDvzmm7HKNYzXr/Cmzy7XOgKtbAUvXU/u7Bj8pofSS70jrU0JruZfWKfSZRVu23 xKSA== 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=p1GByf6fsu6kmddAau9KLY0+hGhmNnwPe1Shj/m1U6Q=; b=oYa2aD3Mqhpgpjo0Cch0jhwEj42gUUQpyXm0dT5GplG7ijfSG3bP2Xk8yygMhGptcy pLTKCc6fYx/MaVt1xsG/55hJTvY5BuFDT4wXGNO5GGCEQ1NgFQz+OeZK4PfKuybMViaw +VN0s56y5toZOoS5r4j24ARAvtUTJQQA3YibkCctaxRv6Alb3P9IDoJLunczBz1i+ADj uCdpenyM5EojsjEp64kulit0UHVktcI7fZA9KsZ9l0VY7MYt0M2jTQe1CNiPoCbVQlaK b8JqJj/k2Tu3evQK0wj3wIigB7drqt5q+NkllS5fp5vIQDI2Xjjva1EF9XhXehrC8YFg qZ5A== X-Gm-Message-State: APjAAAWkiCtgojlTmLqmoipJgDJUZJvktGkL/2hjxYj0mSDcK1WvYy53 pxgAlx71w635qsCO7MbF28c= X-Google-Smtp-Source: APXvYqyTmxm7oPa5/0LdAXKRKDKTtqL4sVPsxpDBAUO1ZRUaPfNk9NqP/5rjPaL6M8si7HEf24IQhw== X-Received: by 2002:a17:90a:c390:: with SMTP id h16mr742388pjt.131.1582660961068; Tue, 25 Feb 2020 12:02:41 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:40 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 02/17] selinux_booleans_path: annotate deprecated Date: Tue, 25 Feb 2020 14:02:04 -0600 Message-Id: <20200225200219.6163-3-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index ee808dd954ad..97834cc842dd 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -321,7 +321,7 @@ 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) __attribute__ ((deprecated)); /* Check the validity of a security context. */ extern int security_check_context(const char * con); From patchwork Tue Feb 25 20:02: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: 11404523 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 4639B14B4 for ; Tue, 25 Feb 2020 20:02:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2557124650 for ; Tue, 25 Feb 2020 20:02:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lPGeq4zf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731645AbgBYUCo (ORCPT ); Tue, 25 Feb 2020 15:02:44 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:44493 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730961AbgBYUCn (ORCPT ); Tue, 25 Feb 2020 15:02:43 -0500 Received: by mail-pf1-f194.google.com with SMTP id y5so104616pfb.11 for ; Tue, 25 Feb 2020 12:02:43 -0800 (PST) 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=zHxmTPEui+mxUxYinqadrYA5tGM9Ed/b3Ly4CRgFNRo=; b=lPGeq4zf/AB2rrXxwW02GVMMqHjisV1w30nRS12xm0+qFIzxcArW9IRMwjeoA65Anc 8dFCLNffXytHayGIpbMErgmPwEFCxhJgHTXaG+ahWhqCy4LgHvEYgtFLAOHHXn8XqeQ1 jwgJhR7JLzvPthLPxlYsH+q0uyt+K4hPApb81tXCv67iSgo3EnMHNERmPlXwTPbGT05C jNal8MIIAESPdQYMf/o2P+JZUz5nhh83E5I4IxxMNtUo1qt7azCV5Wu8wB65RkpGRmnT oFx2PZI3ghxtBlAMO6Dk64P4J0nc9QQtiY3t8+vtOwsiRNy0+/upzlHpyCergMy/M9hp CZDg== 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=zHxmTPEui+mxUxYinqadrYA5tGM9Ed/b3Ly4CRgFNRo=; b=SFhtY6ET6bK+RTcNOthdMKZD2hrvHPEtvyOtnBvJyf/sWSOpyYrPtI3F0qF0wkGRtJ sB9RRPwCDaeRJ8oC/VX3yUKJhy+keFQYFmlqK9iq3w9uPuHKX+sBXFiUT/O5cmkS/SnV aYvkBvSAY9bjwdA+6xnxbB012CrW4Q+WlNSARokcKf/gyD2srJcchwN4YfLwZtc9kiXB weELedR6MDT9pPELg8Qc62drlx1/lIJdLa9eSOao0sZBB6QicYKVY9ggWeTa06eyLbw3 GFGgp5RrOfEbKPVAyg0GUY3eVG+789yUG0yNrhLRKMmFHtDa36H/aHG5BhbjUc5AgN7L srhg== X-Gm-Message-State: APjAAAUkc+SnpXoT1jtIE3+vkSvLWayNfUsLQSghjFZAXoxW2lGMIVXr Sghs1f/1jXYhpAL+ltPWW80= X-Google-Smtp-Source: APXvYqxwFoOqCw7RPCZDlYttQlQy/a7pvTPVUQZB4xihwM3ucq3tC9ox36WZhxcBZlg2N/u+KThaNg== X-Received: by 2002:aa7:9304:: with SMTP id 4mr411282pfj.76.1582660962991; Tue, 25 Feb 2020 12:02:42 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:42 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 03/17] selinux_booleans_path: annotate deprecated Date: Tue, 25 Feb 2020 14:02:05 -0600 Message-Id: <20200225200219.6163-4-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 97834cc842dd..0f77debaa06c 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -571,7 +571,7 @@ 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) __attribute__ ((deprecated)); extern const char *selinux_customizable_types_path(void); /* Deprecated as policy ./users no longer supported. */ extern const char *selinux_users_path(void); From patchwork Tue Feb 25 20:02: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: 11404525 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 E45FA14B4 for ; Tue, 25 Feb 2020 20:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C456D24653 for ; Tue, 25 Feb 2020 20:02:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ovd4AKhT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731387AbgBYUCq (ORCPT ); Tue, 25 Feb 2020 15:02:46 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36958 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731178AbgBYUCp (ORCPT ); Tue, 25 Feb 2020 15:02:45 -0500 Received: by mail-pf1-f193.google.com with SMTP id p14so122465pfn.4 for ; Tue, 25 Feb 2020 12:02:45 -0800 (PST) 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=W23xTt7ttGIK1C1HvZAN92fOe86sF7EeKTsLn8aQd+o=; b=Ovd4AKhT32F8m4v2MqyiOaLKmD3hhWHg02Q2vXM5WJ93CKKo5llFhtoK2nl6N4LF2R ZtUGJQUGqpL2gAfoKrTtkR8t4oaEeQ3k8vnyC1k60ytuFT6HPkA8+arLxHSnmZ7NKsIh M/J3u/bqo4attnvccyvl8oKz7lJDdzJE4LljUHsk6nDH8bdOttQpCWWKysaQmz8umH/5 6CRfPdX8Hs4DmJXcZHgiMFNRVAlA13a9XUb2uFXWjPZcroS7A6WwVOiX8YPeVRNz3x7S c3Rg8ahk+dZU19/A6O8bujbTV3DcNM4Z4kMdJms5BS+z31Pamqu7VSMIE8depfQNOOPs wE3w== 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=W23xTt7ttGIK1C1HvZAN92fOe86sF7EeKTsLn8aQd+o=; b=ikjZxJ1IviCp92Jcokc+bqwTiV76Zsst5N4cOr6ySUp8R4+IrOu+uYSoKn4Id6rUkt M/fTEF2iq9/vGUf6bKGxv26x1d0ODzuD7xLmfVaYupc4zSZO1xak+o1tyNRU6uT2xIVX yxQjfVWOxwofiUWvO83QiNu3SEyheDR5/FoHPVQpHgy0asxAWHexGmxrhMbUdh6zX1sI +lDZnmaq0VI2Ip45LE8I9Xge+HLRsiTnfYt+KB7RctP5CphVrAqVlyBJrX1U00sXh5+S ct1Ex6KvKF31fH+Jv9+qgM/yaIHwWzm46yz0sVeWejGEu2JfCbGsX9x/qtsEP3kwdDGu wB6g== X-Gm-Message-State: APjAAAVhPAtQUaI+75Ud2cqvunWQYCyZmccsDQZdNW9ZQJI8h7zKvXWS O7zEJg8f1qJ5b1gaoWc9MOs= X-Google-Smtp-Source: APXvYqyGIGyjHY/P99Oh2kPFIcXLinmYtZXLb7JKqPhsKn9ah61a/czkNW9Q5MwhMpUsETYd0p7V7A== X-Received: by 2002:aa7:9808:: with SMTP id e8mr434862pfl.32.1582660965158; Tue, 25 Feb 2020 12:02:45 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:44 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 04/17] selinux_users_path: annotate deprecated Date: Tue, 25 Feb 2020 14:02:06 -0600 Message-Id: <20200225200219.6163-5-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 0f77debaa06c..e5c8fdf3e4fb 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -574,7 +574,7 @@ extern const char *selinux_booleans_subs_path(void); extern const char *selinux_booleans_path(void) __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) __attribute__ ((deprecated)); extern const char *selinux_usersconf_path(void); extern const char *selinux_translations_path(void); extern const char *selinux_colors_path(void); From patchwork Tue Feb 25 20:02: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: 11404527 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 DF3D613A4 for ; Tue, 25 Feb 2020 20:02:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BEF5C24653 for ; Tue, 25 Feb 2020 20:02:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CrnOp0KC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731690AbgBYUCt (ORCPT ); Tue, 25 Feb 2020 15:02:49 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43787 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731702AbgBYUCs (ORCPT ); Tue, 25 Feb 2020 15:02:48 -0500 Received: by mail-pl1-f194.google.com with SMTP id p11so233354plq.10 for ; Tue, 25 Feb 2020 12:02:47 -0800 (PST) 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=pc/+g3osm/weoUsazCj+HpjXMuRGJTtyWnawdWS70NE=; b=CrnOp0KCAw/HlN9PuTXrao+qW5NUbs7z36g9b1ZZjIjWmVNgoZ992GxiQce9O+pjlP vvoud/f/pjHXhCoL+7jFPZ4Eb+MSVjNPTe6EZbh/Bz5Z3HFQr/ocLHTGYWGqqmDNcTei cZBpGvQFrgyWL2K9qZb7/xEyhINw55R/hhDnZq0/fbGaKpDhW32uvjgjvwhAMp5hbv3R L8Q0Sv59Isqmd4ktj12TJyu8Q9oDYav4RIkSeB6zAkFd20z54wevu9ynnr0hA3iW2OH1 JV26HTlZMULgDbxMS8XWgvLeP1Z5oMre9nLuLR8uXf0utFQq2lL8rjxBal8rclR83TGW wYRQ== 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=pc/+g3osm/weoUsazCj+HpjXMuRGJTtyWnawdWS70NE=; b=CjbqBRhixP4dgvFLsUpDiD2Pki1ioCr7ToWKl7ktzWg/81icPHnuoW950jfltuOpHS fxOLaer1L0e/pLq5646ysuL3pVoo/M6HGcWhGaCY6/ZUY4z8jzF0MC5mLcYYyxU44Fud pRgKKU7JTi1oN8IjPQsZi11HM4VWHO90lq3xOOGWRLn9hxIn5twHdGrvSvpG3+tIUfKF Ib2ESzkHClw/+3fBNisFpxH4Dhne3KyXQ6zrSBW2adgl0zMIcLoX0Hfkkeu4lReXNAgm KSo9o3JYg1B+WMphH7mDYbknJ33ETA5o+4QO3WFSmhK0hz+DeDx+1a37ceHeJZVpnCUY g7UA== X-Gm-Message-State: APjAAAVAakUFwMlajdtewOy69VXSTr/tARLVpkcOW/K5cCj3m5+HZjNK evLnFyTACer1QxjR+a0inmk= X-Google-Smtp-Source: APXvYqyTwlMHPOeLWbiiSJ3LSeqLfniKMwH3csKrgkITZ3VRPkMLvu9gOtRfKrIbPoTnMnPo25kRJg== X-Received: by 2002:a17:90a:b10b:: with SMTP id z11mr801970pjq.132.1582660966894; Tue, 25 Feb 2020 12:02:46 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:46 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 05/17] rpm_execcon: annotate deprecated Date: Tue, 25 Feb 2020 14:02:07 -0600 Message-Id: <20200225200219.6163-6-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index e5c8fdf3e4fb..e531f927be1e 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -629,7 +629,8 @@ 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[]) + __attribute__((deprecated("Use setexecfilecon and execve"))); #endif /* Returns whether a file context is customizable, and should not From patchwork Tue Feb 25 20:02: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: 11404529 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 5E61413A4 for ; Tue, 25 Feb 2020 20:02:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E11B21927 for ; Tue, 25 Feb 2020 20:02:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S2GHT3rD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731702AbgBYUCu (ORCPT ); Tue, 25 Feb 2020 15:02:50 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:40634 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731698AbgBYUCt (ORCPT ); Tue, 25 Feb 2020 15:02:49 -0500 Received: by mail-pj1-f65.google.com with SMTP id 12so181305pjb.5 for ; Tue, 25 Feb 2020 12:02:49 -0800 (PST) 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=l+nIMu7MVaQt819iJF4TNdRJ3FE4M38+ER7rHwSq2KQ=; b=S2GHT3rDP0M+/5bJPn0wnSUyOFxKjbzjNVNO4RQFcxLoZ0I6VmpTw4SeC6nEGOTVyW XpTi5C/Y1WbTyD/jBB/2Dm57xPtz9sNrybIy1J/0Lo9gshKURtvtlFQV0SOpeBgWLoM3 VIYF57osJIvnBU19o8vlq2ITXLuBSmSFXCHeKbP60KRdr85hgfx1J7Tquc9OU3JXTNkm a9zoP9oSol0KGAxT7/J8D3aBk5wJ9B9e3nxHoMDjjAYIth9iqTkg9Qoetd+Kc0j/TNIj S2bLiG+i483cPSKavRh5sapgVcX88/mVc7c/jaKHO3RUayVlMWGlSlU054C4oPRQReQ6 rC2A== 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=l+nIMu7MVaQt819iJF4TNdRJ3FE4M38+ER7rHwSq2KQ=; b=YcUBB6bQ+W6WRwFsg+MO7R5/q20Rd8ftLdYvtsaDrbVh++In4WKaN5HYao+O8e73Ii MqX9ucOr9Px+NvGJGROEmjWXyjoRk0WYOm/6U6Mvzy4BERS26EoJ6hIUKVlNceKVqOhG 97w5VhY7p+J82JCaFxbu0emmpUe6+wmcpU2Vn8G2yotCxQOgFYMMDmKkXivYNvf5Af4M V/x924oBPjEt4hGMg3WrL81n9EKfr7Qi879QEO4AytwIe+J6W9lQqA19vYSi7KizpP/v 6drXVAOXa9A/u6VZ8TadbYkeW93bxSxbcOe5gsmX/qBecM9X/nQmYv1tYFWZFHFb5v+H ZrSg== X-Gm-Message-State: APjAAAV1JzxuF4kqokh9HTqSR6M9h2cYR4Auk6mz47+/JQgf8nnUra+L ZWLlePx9J/w4N2CRhGmZyeM= X-Google-Smtp-Source: APXvYqyRbg5ioS44BrERF8v5cV+U8TpqZEIeQnRSaMCHkYErZe1GBpejXtfIMErM+FzIcospH4aF8w== X-Received: by 2002:a17:90a:3aaf:: with SMTP id b44mr793872pjc.9.1582660968684; Tue, 25 Feb 2020 12:02:48 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:48 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 06/17] sidget: annotate deprecated Date: Tue, 25 Feb 2020 14:02:08 -0600 Message-Id: <20200225200219.6163-7-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index 46c51419f588..c5c842a34470 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -64,7 +64,7 @@ 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) __attribute__ ((deprecated)); /** * sidput - decrement SID reference counter. From patchwork Tue Feb 25 20:02: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: 11404531 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 7916013A4 for ; Tue, 25 Feb 2020 20:02:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5854C21744 for ; Tue, 25 Feb 2020 20:02:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jpUJ675x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731712AbgBYUCv (ORCPT ); Tue, 25 Feb 2020 15:02:51 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33846 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731709AbgBYUCv (ORCPT ); Tue, 25 Feb 2020 15:02:51 -0500 Received: by mail-pl1-f194.google.com with SMTP id j7so256163plt.1 for ; Tue, 25 Feb 2020 12:02:50 -0800 (PST) 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=JPfhyaVGjlncBwrhSSr7GTZqxFHYwwKsyDxbfAgBSBg=; b=jpUJ675xBCjCSN2PKHXB0o2OdOgY2zoB+Y7/tXybHrubLTB8Hjk1LdcdQNsV3TWLMF fGFX+qGDyBhehYn5Y/ZKcwdaAIPMFlc2JZDkD145p5Jq/pMqMAbgjgLc6+HAY9Y7e/va EdmQIY3yQcpfDedyFwW1L5hvAH1UopGUk002gcXvYPGxnCsdYFPRpU3RTwqfIsUM7U+J 7IbKdQQ9j7KUH6gASB+1s2+X1Aa7FBosLihG2hDTcbRKHzO1b/dZtUOJN3D3g9Y9Rgok iOudcJpwoZVJ/8UnQPcHTTL6zbQgegLGf0Z/9Ud56CseJihd9MzIzcwazxd39yTEg4x4 wi2Q== 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=JPfhyaVGjlncBwrhSSr7GTZqxFHYwwKsyDxbfAgBSBg=; b=UZ6UJf9E79a0fRC2mP04ZqS15EDDUZGgeWNdTTjK8QFvVFLh/hcpxBo4ZtPGXrpOob 8AKEGJQ+gKlWEVImPEwWHbonpbV1t5Qe5dC1isyrNk9EPrRWAt/ExSKpiE8X6eyK4QU7 Jcz894kEGP6mbfk6OKsZblcaOuAl2Nn06WkZ7qCNvRn1Oy5cPHEUTnY/DEsA+kvigHR0 5/5bWTTwSYFrq6SrmH7tHwdRxMTA5e9hhO3dX/67sQcxLlt8+GUewzrF63Z6cjcldfVj u0VXO3k22jJdNdVrD8wAB+U8WyROTzX/5cajMPi1bDZJqvGgJer0CVOdYT8qRWtMkWr0 EWcQ== X-Gm-Message-State: APjAAAWD4xQqu/x03gD6YWOwEVqB3gR566AlAc3NuNkKx0vsG58HnNjC bNNOnq38TXvQanGhtYHvOps= X-Google-Smtp-Source: APXvYqzVUPgVGXAYdQ5GyrO/HyKFCXuCI0tB+jg7FpHrygvHUVz9Z83pYXSIvJtzG0mhR2DRgzzBUw== X-Received: by 2002:a17:90a:c389:: with SMTP id h9mr838298pjt.128.1582660970409; Tue, 25 Feb 2020 12:02:50 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:50 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 07/17] sidput: annotate deprecated Date: Tue, 25 Feb 2020 14:02:09 -0600 Message-Id: <20200225200219.6163-8-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index c5c842a34470..472f6918ca83 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -76,7 +76,7 @@ extern int sidget(security_id_t sid) __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) __attribute__ ((deprecated)); /** * avc_get_initial_sid - get SID for an initial kernel security identifier From patchwork Tue Feb 25 20:02: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: 11404533 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 81E7F14B4 for ; Tue, 25 Feb 2020 20:02:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 604BD21744 for ; Tue, 25 Feb 2020 20:02:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pf8WKv70" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731692AbgBYUCx (ORCPT ); Tue, 25 Feb 2020 15:02:53 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33969 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731716AbgBYUCx (ORCPT ); Tue, 25 Feb 2020 15:02:53 -0500 Received: by mail-pf1-f196.google.com with SMTP id i6so128961pfc.1 for ; Tue, 25 Feb 2020 12:02:52 -0800 (PST) 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=wwFhO9xEQoqdC2RxprqBabD5tnAZvcCgeKvB/jvXXqA=; b=pf8WKv70fl3pJEgH8aGccVFpXAFkbq0bEzLl40xLqJf51G5TjJEYBFfZst8HL+2+lm cy+5h1ktp17mcgqLawDxXMh5lIQJgo3U1W4cBuUOLqDCxyQCojL4v990BJYFqBsTs7IJ od4zNWK6KBml8EGPQugWsUQk8Pag5qxZXK+otpbkQLIao2zCD8L8gW3w65kdQXp6xWDd AnHG2+J/gdMjYElm7JURD1X18XbUsBYbUSbzQ6uwm1iyFulokdVFKU4A/KUMbBC6yuY7 mpGmrKIclBPX7XWHmk0YzeRpLY/kGR3LJAnadH4GlKzhKMD5cYfLhOkDjoPQ0cGVHP9R 2KbA== 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=wwFhO9xEQoqdC2RxprqBabD5tnAZvcCgeKvB/jvXXqA=; b=Qv20fkBLxvYfY5Z4oI+3tc9k7qgcSmeF/DkknFMQ7SkO8ZiNoQPEF5rwHlhsZttr94 0ZhucZwzKmrFC+qJK4QaYm1w2x1R/tqtgPpYlcqou56exkfcFnEw0ApGyFOR/024XSlv 8W4hovLUEZ70XZ/pLbzSeui44Tq5qaIv1f+71uPivO+kbPB4IwCuxEMMaJfpISYpEFMt DfwaB58qlk3S7zBlVFcbPl2fHoEA/qMy1e2xK20hZ2HpzEv9M3t3MgA9wLTjHZ6yH3As HucPF0qVKJfWSfvQ7UAwgCiQ+i1eq+ArpwDE/xu1hFm0KHOZ7dkbFLCOoEGn2yoor/5W rDNw== X-Gm-Message-State: APjAAAXK+B1l3HM2fCJ+1n5YnH/UOB451LgyEk6fe6xZEGCv1IFVyNf2 fgIcjCqtXKkDc7+4GD3weZs= X-Google-Smtp-Source: APXvYqyLu3tSsK7aqaMECko9Gn7LdqCtPsX/cqvnOH08kTC3qouhk0pn2rifrRrmOzQtCFka8lmQOg== X-Received: by 2002:a63:a351:: with SMTP id v17mr164524pgn.319.1582660972528; Tue, 25 Feb 2020 12:02:52 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:52 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 08/17] checkPasswdAccess: annotate deprecated Date: Tue, 25 Feb 2020 14:02:10 -0600 Message-Id: <20200225200219.6163-9-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index e531f927be1e..3704eabc7545 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -603,7 +603,8 @@ 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) + __attribute__ ((deprecated("Use selinux_check_passwd_access"))); /* Check if the tty_context is defined as a securetty Return 0 if secure, < 0 otherwise. */ From patchwork Tue Feb 25 20:02: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: 11404535 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 6FA4514B4 for ; Tue, 25 Feb 2020 20:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DF5C20658 for ; Tue, 25 Feb 2020 20:02:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AgJrCZmA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731716AbgBYUCz (ORCPT ); Tue, 25 Feb 2020 15:02:55 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33070 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731214AbgBYUCz (ORCPT ); Tue, 25 Feb 2020 15:02:55 -0500 Received: by mail-pl1-f196.google.com with SMTP id ay11so258568plb.0 for ; Tue, 25 Feb 2020 12:02:55 -0800 (PST) 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=E2kmoY6zv92PvScAvn3kdHJOJSPBF0uxlk6MAV8q014=; b=AgJrCZmAs1za1sdzgmwRHWjlaaq7FNHOc6ENea0b+GEDEDSk3YlNcKUCy3iKXzQPtx b4nALYagijWywsee2TVx3JPaGPOjN9Eh3NNlBIzFfWkfD6fe8lA1jE2unRIVnYnZHF1f ltQrAiH6cR4pa+aGtg0zOZWVh2VYeLIT7taUETOi+ghbsnJv0KZhaCDk3reQfE2wL23n Hna6hIgYkG2lBV8q1DzUxR3RYNco8ju042JpAiTjl4ZxpuWc0YNUOVqGGdCEV8OKsION NmnsOxi/qVmVe6KpZ8fcZSWKJyiAxeId8GiO1Svsy3zp5I2FeWOjp3GjsGZ1AB8jsbRo OhzA== 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=E2kmoY6zv92PvScAvn3kdHJOJSPBF0uxlk6MAV8q014=; b=sC6A9IYRSGFVMw/vXAq/0/aON+krYuQnkOAhahUQ41uVylncG5Vqh5O4dts9OX5NKp ntSaXQuhqJ1hOTKuWBF+GYu7v4ZPUCCw8G7/36Hk6dH9X06MHQpdHe6PVZEVKlxo9jSS bvH1Eplppy8bvsxtZ7UW3V1RyjQf3BuvFDoI/wod6GlfDEjFGrEQzHKrOX+pxfHW772H NtxSX5wOngaEV+A0dgluG2aYz2g7ubheadkazCxRy4PihtH9Tz1mIdxxaMTDPiOraaeg UgWDmcDwZUFCqQGuGbbspb8aicE+Zt++s0omNA1x6k9DY3y2g+XrjQFAzjZZrX/P8H82 HGfw== X-Gm-Message-State: APjAAAWpvB0bR5TObwX2Lb/El6zOxb8HQfHbdsvO+1r/sKhQlcjg74FN qllzdy9XieLmoBCzr9C0Z5Y= X-Google-Smtp-Source: APXvYqy7fYsXfHNABnEI/6paGg/MD0qeGThA++E48IINiF2tG9VVP87jZhHJPZeLtJ9BV+XAX7BBLg== X-Received: by 2002:a17:902:7283:: with SMTP id d3mr223433pll.118.1582660974642; Tue, 25 Feb 2020 12:02:54 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:54 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 09/17] matchpathcon_init: annotate deprecated Date: Tue, 25 Feb 2020 14:02:11 -0600 Message-Id: <20200225200219.6163-10-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 3704eabc7545..20ac8498ac9c 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -457,7 +457,8 @@ 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) + __attribute__ ((deprecated("Use selabel_open with backend SELABEL_CTX_FILE"))); /* Same as matchpathcon_init, but only load entries with regexes that have stems that are prefixes of 'prefix'. */ From patchwork Tue Feb 25 20:02: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: 11404537 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 0868613A4 for ; Tue, 25 Feb 2020 20:02:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB25621556 for ; Tue, 25 Feb 2020 20:02:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MKOtc9IH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731718AbgBYUC5 (ORCPT ); Tue, 25 Feb 2020 15:02:57 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36971 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731214AbgBYUC5 (ORCPT ); Tue, 25 Feb 2020 15:02:57 -0500 Received: by mail-pf1-f193.google.com with SMTP id p14so122770pfn.4 for ; Tue, 25 Feb 2020 12:02:56 -0800 (PST) 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=7S/uCKhpK9dYUlYBwzqU1D9vw0pquGyo7c6YOeVl25Q=; b=MKOtc9IHs2WzoGb12EJZfKE79Cw+8F38hhtzEZ5E1WiwGHmSRUEe7C2CghIfMDDohv Ls1lL3Cm7iwKcjnVL44ItvO62n3o5dCc3iUMHYt41AAhqZT1MQHJw5ZsC6cG+nIyxXVd rOTpwFc7lXTVJAEKU3hmedXYNQFWrxk7Tld9Uwc/7df8qbf3j35/yCJj57mJ5Zud4C/w gJ1m3+5rg0AFEWbQNuELGowAr/5NBCNFRciNDlybaGK7y0fUQEunxoEmF0W85hcJmOuW +q9Rg1sZUOwPYQ1W7Efojaic8vLXilZymJHF31pgdB5jS6vtKEZpui9rIKydK3SBEmMQ uBoQ== 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=7S/uCKhpK9dYUlYBwzqU1D9vw0pquGyo7c6YOeVl25Q=; b=ntbSJ77dXQPqQSFj9Tzr5Sc27J20eDSe0bNhN6Yz2Y+NP1bbAeeKtTfVu3vqKDaaub a1FEoeiEPOmlmdjAIQJSQD+1r07R8g2PYX6j6bIuALROpRvhp4hsCFQInM/3pbe6iK4f 2tb3EllMDGFCLdx1fuoII/g1wlT3AjyfqRqi9of7PjHzdPcddvyhUIxpAYtXmJBE3naC T/0FI0otBDgj9BNAksRFlarxMIX+yyxj9XSROfb4FaNKzMwn1zbNipKrMPlhzH0SnFg4 /6v1qvX7YALxTJJBpHz1oS0Tm4bjYkX8EbOQhm4gh0UDSn0Ad2slbLM/z3QBKoMUpHVl 1a6g== X-Gm-Message-State: APjAAAXWkICIN1iKGehyco0IVVWnOmnb2htM9fTm3X6AHtnos4Qw0r10 TtKDn4bOkOXum0QdKH3zbME= X-Google-Smtp-Source: APXvYqxSbR6WMR23timqQD3z+cztm08A43GkhATiEFOh00bx/syyX3+kZ96AWJDNnAx0QxkEgD0pmg== X-Received: by 2002:a63:a1e:: with SMTP id 30mr233628pgk.238.1582660976360; Tue, 25 Feb 2020 12:02:56 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:55 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 10/17] matchpathcon_fini: annotate deprecated Date: Tue, 25 Feb 2020 14:02:12 -0600 Message-Id: <20200225200219.6163-11-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 20ac8498ac9c..26f8432cd4c3 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -465,7 +465,8 @@ 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) + __attribute__ ((deprecated("Use selabel_close"))); /* 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 Tue Feb 25 20:02: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: 11404539 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 9367A14B4 for ; Tue, 25 Feb 2020 20:02:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7180720658 for ; Tue, 25 Feb 2020 20:02:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="He0azFbK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731214AbgBYUC7 (ORCPT ); Tue, 25 Feb 2020 15:02:59 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:55815 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUC6 (ORCPT ); Tue, 25 Feb 2020 15:02:58 -0500 Received: by mail-pj1-f65.google.com with SMTP id d5so184348pjz.5 for ; Tue, 25 Feb 2020 12:02:58 -0800 (PST) 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=pboIINyf0qMwR1Nmn2v0P1UjFRAZuR78s587QRDTXX0=; b=He0azFbK0xnZzdoalf/CcRQPHWaqLjpnGB2wunxlh766oC/gJQ0cTu+FadBgZSyvtk GILv/8J4oIJsjNoX5J1itOO3092owYHJAlmOzq966g3pgNlOK9MaxOEJRN0OeCyEfgk8 uMverNmkHdM3v0MOavZvm4xZnVwmnAL59sZZUEKZTtzelMHyzyg3X+zvoY4zjkOPn/Pp bJgsEr5GmydoSWaoVW9Nz6OnyQDl7z89NZYVstqFsNYuYPnYpF0D0vxsJyAx+ke8ZyWA 7cUxe1Mfmp7F1M5IhXtczw5spF61kmjZ6G62MCSs6Lx8h8mEO95Se97c900yiABDw71M 2wcQ== 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=pboIINyf0qMwR1Nmn2v0P1UjFRAZuR78s587QRDTXX0=; b=OjzCDxTAFpPKGly5M9kWPt1sP70+6HBjwqIXJ9/mjfraOtQCgFRC6XjaH5TVoIZyz1 R5dWWi5PFt9rVzpa889uVoTeTCpU/VinjNHLEkEH2pVpWnEldCkDdGRu1E8+Bvk+1Iph c2qib7Q5xn5Jya/80GUAn8h2tJnZ85p11EpFFv4KhZ08J4ytk/hKxRLJbGm5qYvMFk3S 7tlQmZBhc4wsn5hHKVTbe4zZfbfcbX9oHey7ip5Dcq6N5qNwrjRqNkhYNhjeag9Yz4xd Rkw4bnM2o+dABNFiHfKqyAEa8pXVFhJ07I7nsnh00MTiq45zueD4PyLytJx8+APQgwsC IVOw== X-Gm-Message-State: APjAAAWgKNSEXb0HidZCrURZRyZg/19R8Pe53UI6f4j/4N0RJTfFTjXZ JHs3vC1vOPkAWNOmHmGaQmE= X-Google-Smtp-Source: APXvYqybktiCYWE2zHHga9eN66kFVW+yXNthhSJjwiggIVPA2yViN2xl1bYRMplDWbToxtg1ewjAOw== X-Received: by 2002:a17:902:426:: with SMTP id 35mr193285ple.302.1582660977975; Tue, 25 Feb 2020 12:02:57 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:57 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 11/17] matchpathcon: annotate deprecated Date: Tue, 25 Feb 2020 14:02:13 -0600 Message-Id: <20200225200219.6163-12-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 26f8432cd4c3..ed00367b14fe 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -480,7 +480,8 @@ 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) + __attribute__ ((deprecated("Use selabel_lookup instead"))); /* Same as above, but return a specification index for later use in a matchpathcon_filespec_add() call - see below. */ From patchwork Tue Feb 25 20:02: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: 11404541 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 26EB514B4 for ; Tue, 25 Feb 2020 20:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04E6F20658 for ; Tue, 25 Feb 2020 20:03:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ewc5iXXO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731371AbgBYUDA (ORCPT ); Tue, 25 Feb 2020 15:03:00 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44513 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUDA (ORCPT ); Tue, 25 Feb 2020 15:03:00 -0500 Received: by mail-pf1-f196.google.com with SMTP id y5so105089pfb.11 for ; Tue, 25 Feb 2020 12:03:00 -0800 (PST) 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=iYDpnOO9HSE5if04ORcNe1FlF4m09kM1ja7Zo3O70HM=; b=Ewc5iXXO5HQt1w6INghwn2Je6Ur2jc0qaDHBdxMECBJpzgPxf5tMVoPeFbiO1ctHm2 LI6pHDd5UPzzf+GxIJp+i+hj2ylEy0ndcnuimfgqd4n3nlkmvCy9a84uDthnwWCe/yxg aJ0H1+h8wtP9NLNeFqnQmY2+0LqpktdizSM345s6g+TNNNEMD5fQOmP0cdklOtpp2Vqw ZknZIGBERETtOKjQes7o39zDThaVWIxExCZdvH6fAsNGEufgQketl7SWorM+eNp5kzJG Er3SfNi3E4LFkucj2Tgm4In9c9+N7qBYIxSU/MWP14eKXz3S1WY482H2EoJp+cFdFeHL oN8w== 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=iYDpnOO9HSE5if04ORcNe1FlF4m09kM1ja7Zo3O70HM=; b=lFB4jpreER3COr2vNhfnK8Qte8BL8AWU9Gc9fy1XnqO3ECl9qTOzfWUVlsZwJMzm9p slgwGONwwHae/8/bqGP5/2X4RmEqndIMNRF3o0w3a4IN4piLvaKkPcevigBOUrjRamC4 cP4jj13JRGzXCuxIcnmsEjBcr/IxWgQKi0iE3iPAsvJlGYWM/7wzccr9M4eFw8NMCycA lxEKSKvzMc3ADRKpP1U+vAWyJVb73nfWL6Egsb5CZ1VNIoQt+D9fnRxccIuidN7C93lH QFeQ4a4xvVkrAFvdkfVt1+jCjgIb8x3i+ZYFJzXtFMG1YLIf4ZWhd8YAx1k/sDKDVvpF osMA== X-Gm-Message-State: APjAAAUBWVX8vuLZWhcHW2MAqpabPTqPLeSeTWbkO7/SfDy5REs1f319 3jS64biITQWshzF0yh2QPew= X-Google-Smtp-Source: APXvYqyyuN6NZIs7I+PDEwbzt7Lo3H9ae1KgHbDn8MlYVD+Cl+LsjwYnZpdpP5T8vJ9Zmil+qYQUQA== X-Received: by 2002:a63:175e:: with SMTP id 30mr215834pgx.162.1582660979702; Tue, 25 Feb 2020 12:02:59 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:02:59 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 12/17] avc_init: annotate deprecated Date: Tue, 25 Feb 2020 14:02:14 -0600 Message-Id: <20200225200219.6163-13-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h index 472f6918ca83..7487b62f41c3 100644 --- a/libselinux/include/selinux/avc.h +++ b/libselinux/include/selinux/avc.h @@ -192,7 +192,8 @@ 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) + __attribute__ ((deprecated("Use avc_open and selinux_set_callback"))); /** * avc_open - Initialize the AVC. From patchwork Tue Feb 25 20:02: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: 11404543 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 807C813A4 for ; Tue, 25 Feb 2020 20:03:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5594021556 for ; Tue, 25 Feb 2020 20:03:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YzGtUFJ+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731420AbgBYUDD (ORCPT ); Tue, 25 Feb 2020 15:03:03 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33853 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUDC (ORCPT ); Tue, 25 Feb 2020 15:03:02 -0500 Received: by mail-pl1-f194.google.com with SMTP id j7so256397plt.1 for ; Tue, 25 Feb 2020 12:03:02 -0800 (PST) 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=X6mxsecS5OmCBlwdVuO1Wh9Zjl8/zVi/pAYNTBsF9Pc=; b=YzGtUFJ+NlJPCzmb2gs2FsYnOCl5Y1JpjHoENIx6SNIv4bZwcdOYrlV66Vy3kQO38J 5npgbuDwRauRHGOpeARbQVDhHRMQMQtLpcvM5b6ORz18KuiB51fN8BvrPMXEOCm2tem6 PkB6326takoFzQ99AehLeA1J8aBWrsI6rPn8sVidrYOR9e6C6+o3fxTTboGKce6VDSkw QB0ZrIo5/L1n9OUo50pEbmow8O1fGFmw4zvjFMuM9Ec5kuBal+i2qbMqxe7Gt6Pzhvg9 wnunA3TVi9KMAThrobIDXWVPcQibzNOEV+SC+b5XMgP7f7Y6OYi9dQql8fu5DXhG3dnj SkfQ== 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=X6mxsecS5OmCBlwdVuO1Wh9Zjl8/zVi/pAYNTBsF9Pc=; b=ugD71LlrQ/qCiRllqwbT4Z/Ea7FXjog6RkDBbD0tNmQPb6j4S9bUvdHiO6Iyv3aeUF eWabyIb06ZEccoorVDfQQu72SPobwH+ZwmYfUHo4v1OmN4gCmIferXUGPHvWg3JSVcgr CQJlZKjHhubjv411sXC9vUkpPOQ+EPk2lb8tpWi1MSOqcXTsnaVHBchyVRgChrLOaxK4 6ZqIoSFP1SKfDoJq4U2rc7UMunHyR28uWVGIKKGRYQHsbPTm4WaMvXe/eiRhzWGP55Go MvbsmOepjdKT4s4zs3uRA+/9zcfxdeuOOcxVzJ/GFWkTF75M1/Txon0ruiJWDUtLR6Ez rlcA== X-Gm-Message-State: APjAAAVc7uPz9RGNY0QcUJf/uCcYdaV/CB8Q4PKdKCO1o1va+Yxol/UF wuewRGs95k9krDXmDqSkw5Q= X-Google-Smtp-Source: APXvYqzfp9q3GsThLfi/3TMa2nk6GH3TPzcwhacLfKIdk1KqwyIz9yiO74RNU4YmrB1HtQi7/SLTjw== X-Received: by 2002:a17:90a:26e1:: with SMTP id m88mr739405pje.101.1582660981308; Tue, 25 Feb 2020 12:03:01 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.02.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:03:00 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 13/17] src/selinux_internal.h: fix hidden_proto indents Date: Tue, 25 Feb 2020 14:02:15 -0600 Message-Id: <20200225200219.6163-14-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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/src/selinux_internal.h | 190 +++++++++++++++--------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h index 61b78aaa7c10..f6a50cd36f63 100644 --- a/libselinux/src/selinux_internal.h +++ b/libselinux/src/selinux_internal.h @@ -3,107 +3,107 @@ #include "dso.h" hidden_proto(selinux_mkload_policy) - hidden_proto(fini_selinuxmnt) - hidden_proto(set_selinuxmnt) - hidden_proto(selinuxfs_exists) - hidden_proto(security_disable) - hidden_proto(security_policyvers) - hidden_proto(security_load_policy) - hidden_proto(security_get_boolean_active) - hidden_proto(security_get_boolean_names) - hidden_proto(security_set_boolean) - hidden_proto(security_commit_booleans) - hidden_proto(security_check_context) - hidden_proto(security_check_context_raw) - hidden_proto(security_canonicalize_context) - hidden_proto(security_canonicalize_context_raw) - hidden_proto(security_compute_av) - hidden_proto(security_compute_av_raw) - hidden_proto(security_compute_av_flags) - hidden_proto(security_compute_av_flags_raw) - hidden_proto(security_compute_user) - hidden_proto(security_compute_user_raw) - hidden_proto(security_compute_create) - hidden_proto(security_compute_create_raw) - hidden_proto(security_compute_create_name) - hidden_proto(security_compute_create_name_raw) - hidden_proto(security_compute_member_raw) - hidden_proto(security_compute_relabel_raw) - hidden_proto(security_validatetrans) - hidden_proto(security_validatetrans_raw) - hidden_proto(is_selinux_enabled) - hidden_proto(is_selinux_mls_enabled) - hidden_proto(freecon) - hidden_proto(freeconary) - hidden_proto(getprevcon) - hidden_proto(getprevcon_raw) - hidden_proto(getcon) - hidden_proto(getcon_raw) - hidden_proto(setcon_raw) - hidden_proto(getpeercon_raw) - hidden_proto(getpidcon_raw) - hidden_proto(getexeccon_raw) - hidden_proto(getfilecon) - hidden_proto(getfilecon_raw) - hidden_proto(lgetfilecon_raw) - hidden_proto(fgetfilecon_raw) - hidden_proto(setfilecon_raw) - hidden_proto(lsetfilecon_raw) - hidden_proto(fsetfilecon_raw) - hidden_proto(setexeccon) - hidden_proto(setexeccon_raw) - hidden_proto(getfscreatecon_raw) - hidden_proto(getkeycreatecon_raw) - hidden_proto(getsockcreatecon_raw) - hidden_proto(setfscreatecon_raw) - hidden_proto(setkeycreatecon_raw) - hidden_proto(setsockcreatecon_raw) - hidden_proto(security_getenforce) - hidden_proto(security_setenforce) - hidden_proto(security_deny_unknown) - hidden_proto(security_reject_unknown) - hidden_proto(security_get_checkreqprot) - hidden_proto(selinux_boolean_sub) - hidden_proto(selinux_current_policy_path) - hidden_proto(selinux_binary_policy_path) - hidden_proto(selinux_booleans_subs_path) - hidden_proto(selinux_default_context_path) - hidden_proto(selinux_securetty_types_path) - hidden_proto(selinux_failsafe_context_path) - hidden_proto(selinux_removable_context_path) - hidden_proto(selinux_virtual_domain_context_path) - hidden_proto(selinux_virtual_image_context_path) - hidden_proto(selinux_lxc_contexts_path) - hidden_proto(selinux_file_context_path) - hidden_proto(selinux_file_context_homedir_path) - hidden_proto(selinux_file_context_local_path) - hidden_proto(selinux_file_context_subs_dist_path) - hidden_proto(selinux_file_context_subs_path) - hidden_proto(selinux_netfilter_context_path) - hidden_proto(selinux_homedir_context_path) - hidden_proto(selinux_user_contexts_path) - hidden_proto(selinux_booleans_path) - hidden_proto(selinux_customizable_types_path) - hidden_proto(selinux_media_context_path) - hidden_proto(selinux_x_context_path) - hidden_proto(selinux_sepgsql_context_path) - hidden_proto(selinux_openrc_contexts_path) - hidden_proto(selinux_openssh_contexts_path) - hidden_proto(selinux_snapperd_contexts_path) - hidden_proto(selinux_systemd_contexts_path) - hidden_proto(selinux_path) - hidden_proto(selinux_check_passwd_access) - hidden_proto(selinux_check_securetty_context) - hidden_proto(matchpathcon_init_prefix) - hidden_proto(selinux_users_path) - hidden_proto(selinux_usersconf_path); +hidden_proto(fini_selinuxmnt) +hidden_proto(set_selinuxmnt) +hidden_proto(selinuxfs_exists) +hidden_proto(security_disable) +hidden_proto(security_policyvers) +hidden_proto(security_load_policy) +hidden_proto(security_get_boolean_active) +hidden_proto(security_get_boolean_names) +hidden_proto(security_set_boolean) +hidden_proto(security_commit_booleans) +hidden_proto(security_check_context) +hidden_proto(security_check_context_raw) +hidden_proto(security_canonicalize_context) +hidden_proto(security_canonicalize_context_raw) +hidden_proto(security_compute_av) +hidden_proto(security_compute_av_raw) +hidden_proto(security_compute_av_flags) +hidden_proto(security_compute_av_flags_raw) +hidden_proto(security_compute_user) +hidden_proto(security_compute_user_raw) +hidden_proto(security_compute_create) +hidden_proto(security_compute_create_raw) +hidden_proto(security_compute_create_name) +hidden_proto(security_compute_create_name_raw) +hidden_proto(security_compute_member_raw) +hidden_proto(security_compute_relabel_raw) +hidden_proto(security_validatetrans) +hidden_proto(security_validatetrans_raw) +hidden_proto(is_selinux_enabled) +hidden_proto(is_selinux_mls_enabled) +hidden_proto(freecon) +hidden_proto(freeconary) +hidden_proto(getprevcon) +hidden_proto(getprevcon_raw) +hidden_proto(getcon) +hidden_proto(getcon_raw) +hidden_proto(setcon_raw) +hidden_proto(getpeercon_raw) +hidden_proto(getpidcon_raw) +hidden_proto(getexeccon_raw) +hidden_proto(getfilecon) +hidden_proto(getfilecon_raw) +hidden_proto(lgetfilecon_raw) +hidden_proto(fgetfilecon_raw) +hidden_proto(setfilecon_raw) +hidden_proto(lsetfilecon_raw) +hidden_proto(fsetfilecon_raw) +hidden_proto(setexeccon) +hidden_proto(setexeccon_raw) +hidden_proto(getfscreatecon_raw) +hidden_proto(getkeycreatecon_raw) +hidden_proto(getsockcreatecon_raw) +hidden_proto(setfscreatecon_raw) +hidden_proto(setkeycreatecon_raw) +hidden_proto(setsockcreatecon_raw) +hidden_proto(security_getenforce) +hidden_proto(security_setenforce) +hidden_proto(security_deny_unknown) +hidden_proto(security_reject_unknown) +hidden_proto(security_get_checkreqprot) +hidden_proto(selinux_boolean_sub) +hidden_proto(selinux_current_policy_path) +hidden_proto(selinux_binary_policy_path) +hidden_proto(selinux_booleans_subs_path) +hidden_proto(selinux_default_context_path) +hidden_proto(selinux_securetty_types_path) +hidden_proto(selinux_failsafe_context_path) +hidden_proto(selinux_removable_context_path) +hidden_proto(selinux_virtual_domain_context_path) +hidden_proto(selinux_virtual_image_context_path) +hidden_proto(selinux_lxc_contexts_path) +hidden_proto(selinux_file_context_path) +hidden_proto(selinux_file_context_homedir_path) +hidden_proto(selinux_file_context_local_path) +hidden_proto(selinux_file_context_subs_dist_path) +hidden_proto(selinux_file_context_subs_path) +hidden_proto(selinux_netfilter_context_path) +hidden_proto(selinux_homedir_context_path) +hidden_proto(selinux_user_contexts_path) +hidden_proto(selinux_booleans_path) +hidden_proto(selinux_customizable_types_path) +hidden_proto(selinux_media_context_path) +hidden_proto(selinux_x_context_path) +hidden_proto(selinux_sepgsql_context_path) +hidden_proto(selinux_openrc_contexts_path) +hidden_proto(selinux_openssh_contexts_path) +hidden_proto(selinux_snapperd_contexts_path) +hidden_proto(selinux_systemd_contexts_path) +hidden_proto(selinux_path) +hidden_proto(selinux_check_passwd_access) +hidden_proto(selinux_check_securetty_context) +hidden_proto(matchpathcon_init_prefix) +hidden_proto(selinux_users_path) +hidden_proto(selinux_usersconf_path); hidden_proto(selinux_translations_path); hidden_proto(selinux_colors_path); hidden_proto(selinux_getenforcemode); hidden_proto(selinux_getpolicytype); hidden_proto(selinux_raw_to_trans_context); hidden_proto(selinux_trans_to_raw_context); - hidden_proto(selinux_raw_context_to_color); +hidden_proto(selinux_raw_context_to_color); hidden_proto(security_get_initial_context); hidden_proto(security_get_initial_context_raw); hidden_proto(selinux_reset_config); From patchwork Tue Feb 25 20:02:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11404545 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 2954013A4 for ; Tue, 25 Feb 2020 20:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08D4221556 for ; Tue, 25 Feb 2020 20:03:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q3Qp2j08" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730864AbgBYUDD (ORCPT ); Tue, 25 Feb 2020 15:03:03 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36830 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUDD (ORCPT ); Tue, 25 Feb 2020 15:03:03 -0500 Received: by mail-pj1-f67.google.com with SMTP id gv17so192355pjb.1 for ; Tue, 25 Feb 2020 12:03:03 -0800 (PST) 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=tRfY3jxvNZrR+h46IvS2f/qCEZ7EEzHG2HA+QAqfxeg=; b=q3Qp2j08Dts0NNX+x6rSS537Dj98mpC7Z6eiQX0CtpwC4KcifDDOkHsvjJNWAij3aJ J66uybJOSSvqU7/Pf+hpUJ2Z1GepDoHgcNIzxvJ2/V+3dgJyoKECTLkVEkbmLnv4m1CN DwYOlvtUH6MBr5ALgnt+kxxPCsOdFHefVMXybqBohypJz5rjS3P4s6QuS9McqFqQ9XrG bXxd78Aa9W6KfiyIfJb4FHKYLkXpfk/Dnsl/QxYmEgESktsNknWc3UYET+AkutauwIh0 AGgHH1tUri4cYbsQEm1dsfJmuKtJioy8TZdCipEWCL3SvbOCg83HJa8GXZoo8h4R06EB Zsyw== 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=tRfY3jxvNZrR+h46IvS2f/qCEZ7EEzHG2HA+QAqfxeg=; b=JlpYF31YGoC4oxQyoILZZClvtLAYWXYOfwlbvEzf7YavV0+IG3CUmtda35rAjpJf04 u7YSH+oeMFP+8hFUIRa9znUrlGDnYQjUWM4lmvp4CV3MrfKOxz3cEufrsUD2PTwZ8Kn2 Ri56MI75chxBJAJb62i3IqKXwqQEWwCUPBpZldDNab8QoGytNHiXF/2Y0xvud9gRSbk3 5/5a1b8on5c6K6x56XI6byzVZGKM8EGt0rp5bW5j2/C/Xpvao76AHWt9ZnVHAhmVMS+Z 5UYgeJjp6uz44G9wuxqZAQfySlrEgtjf5DiAPty9L14bV5O8Og9XCNHGyz8pFWKFlnkA azQw== X-Gm-Message-State: APjAAAXL8V0OQJXjxHuVso+DMY1P0TfgZV0QpzvRlrP0F2NK5ukP68r4 84o3jfelLKL9KXiAWgAKO7c= X-Google-Smtp-Source: APXvYqx3Mu2l1GZpwU+rjFa4Xzfr1NWhBkC28g9o5xABrDlC9Sc1R84EuiGdzoX1RkCUg1B2ptIi3Q== X-Received: by 2002:a17:902:b587:: with SMTP id a7mr227686pls.82.1582660982937; Tue, 25 Feb 2020 12:03:02 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:03:02 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 14/17] selinux_internal.h: disable warnings on deprecated Date: Tue, 25 Feb 2020 14:02:16 -0600 Message-Id: <20200225200219.6163-15-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 selinux_internal.h marks the visibility of symbols, many of these are the deprecated routines that get marked as hidden. This causes compilers to warn about deprecated uses. However this is a valid annotation that we want to keep, until the functions are finally removed. Signed-off-by: William Roberts --- libselinux/src/selinux_internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h index f6a50cd36f63..2d9373b86190 100644 --- a/libselinux/src/selinux_internal.h +++ b/libselinux/src/selinux_internal.h @@ -2,6 +2,12 @@ #include #include "dso.h" +/* + * Disable deprecated warnings for users internal to the library. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + hidden_proto(selinux_mkload_policy) hidden_proto(fini_selinuxmnt) hidden_proto(set_selinuxmnt) @@ -181,3 +187,5 @@ extern int selinux_page_size hidden; #define SELINUXCONFIG SELINUXDIR "config" extern int has_selinux_config hidden; + +#pragma GCC diagnostic pop From patchwork Tue Feb 25 20:02:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11404547 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 75B6217E0 for ; Tue, 25 Feb 2020 20:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53CF020658 for ; Tue, 25 Feb 2020 20:03:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o4jfSlXt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731223AbgBYUDG (ORCPT ); Tue, 25 Feb 2020 15:03:06 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33596 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUDF (ORCPT ); Tue, 25 Feb 2020 15:03:05 -0500 Received: by mail-pf1-f195.google.com with SMTP id n7so131862pfn.0 for ; Tue, 25 Feb 2020 12:03:05 -0800 (PST) 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=crs6SVimy4Jek7MEn4C+0oC2hWg9PvZMOqLc5C+Mf8g=; b=o4jfSlXtKdlN1Uoq+crxB8vRL0U8mHHxrMp89+qLerzaxpmb7FzEQnDONxDdvH5GG/ ocee2pmkaWCbx+olPz6VTLr5baqYXgVCi30SMrUQS3KQ0VinsiwjK7voRVWkvnZpX4kk T14LnQG6HX8z9p3T2T0xT96OmwQrs2JTyOBGdrhdSd5dE3RYpVvS+W7lBJZgf8fnPaEo MB2PxvcalKETtmQjLncbXkGNBfzTlDOMYqSBx965BbSKj1IaoSs0OUZ6ruNUlqe/L2xP JPA/4rT+bZIsW3vwZjAmd8/+Dw8ELwEAC1oDZZJytajjvdMRlKe67ueiioH0Qv2bDz11 8ttQ== 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=crs6SVimy4Jek7MEn4C+0oC2hWg9PvZMOqLc5C+Mf8g=; b=LeKMKuq+t6ifnQjEj0E8aAf/FgrO1aCsJnRpG4K9CKgX/um8VwG0BBD85JmU8+ywjY z6yByayCWrrjPmx1n5xY1Wym7U/Dtg1zIF/Np8ZqeTk+CU2TKqPCX5JKPtVkjX5U0g0A ofPu0Jiio185PnFle2kPyqBOQJc5XplKjHRugPTZMJGOHGhH/kBsbhOp+0UJHaYyzvON qUPeSMQZ3KiOZ7J29q/59rFV85+VyV2iA+Rvs7RwJtOMbfxJ9b/hd4nsKHTPjGX8LfiR Q5B+tslYEyBHr0G4bWP7WrRNCitwz36CfKU3DuJ0D3mYTkCJZ5r3FCHhKRy3XXC3MQHN YgWg== X-Gm-Message-State: APjAAAUsFuG9WJYS2SOstyyvRsYhn8/rXWQSH5w9jsoQHHW90XY7b+2m sP0H+uh6A5Ifav3Ifa0u5r0= X-Google-Smtp-Source: APXvYqzX5XOJ4ChY1YVxUYIeEHwW4rqRvVe8FZC9NXvA/N4I5B8YGzAI+JsLkqEc0AxnCtKRbf1Eog== X-Received: by 2002:a62:5343:: with SMTP id h64mr350008pfb.171.1582660984552; Tue, 25 Feb 2020 12:03:04 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:03:04 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 15/17] avc_open: mark allowed use of avc_init Date: Tue, 25 Feb 2020 14:02:17 -0600 Message-Id: <20200225200219.6163-16-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 avc_init is deprecated, however avc_open internally uses it. Mark this deprecated use as OK. Another approach could be to define an avc_init2 as a hidden, internal symbol and call that, but this was seemed simpler and clear. Signed-off-by: William Roberts --- libselinux/src/avc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c index 5230efd2323a..7d30f0052f7c 100644 --- a/libselinux/src/avc.c +++ b/libselinux/src/avc.c @@ -156,8 +156,10 @@ int avc_open(struct selinux_opt *opts, unsigned nopts) avc_enforcing = !!opts[nopts].value; break; } - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" return avc_init("avc", NULL, NULL, NULL, NULL); +#pragma GCC diagnostic pop } int avc_init(const char *prefix, From patchwork Tue Feb 25 20:02:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11404549 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 C9A6D14B4 for ; Tue, 25 Feb 2020 20:03:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A820120658 for ; Tue, 25 Feb 2020 20:03:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hlyop63e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731449AbgBYUDH (ORCPT ); Tue, 25 Feb 2020 15:03:07 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:39298 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUDH (ORCPT ); Tue, 25 Feb 2020 15:03:07 -0500 Received: by mail-pj1-f67.google.com with SMTP id e9so184546pjr.4 for ; Tue, 25 Feb 2020 12:03:07 -0800 (PST) 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=+5ji0qf9xxgPhc+Nmd1gWKTklZ3TKBMYpM1qRp9y2Kg=; b=hlyop63ej/CxCDG1fiyWCMOI7jhrWN7Wdva9Ox+9iWJQqylHhPCwGPMu60HL+xlbKU pczeGsenr7x0Enqo0Q0W18oRC/cLsc6Bh4r5ZWRogeAD/PszwogCn2YPm0+aTtVMND0K cs3LzKrogUi1RAgx1nTkwMJf2inzZjAd9fDJhnUBofK3hgyw6hgn88e/30PAlkAjJiBE ddvOoIVOSXY2hxg9I+mCbLkueHVy2uWfj3GoV6FxLL3MB9rDdZY/31LctUZm91l4b2U/ sTwP6Z3VLvV7bmdGGCkoYqWlXVaG2LX6NjKEG6AWN+sRNXepBNKmAgt5pn9Fz/4JLIiM D+ZQ== 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=+5ji0qf9xxgPhc+Nmd1gWKTklZ3TKBMYpM1qRp9y2Kg=; b=Odg3AzYvr6VsSbpYNaOVujkBXZkee9SjjaBfX3YynCYME7HiZyu5NaWYJDLkAnCxY7 O4E4nanOAjtHzN2dXMj+J+Iw64YwPCzmV82V12zNT/hPLUpyvtVy6qoDvKtvBqL22CpH BvGzBhiMm7MB41W2RiS+LnwTo6m1lOW74SLnegF8zbBqNYz0KW3rk/i1z/e3MlEzWF8D mLSrldcMq7jTm8uvLJAfeXspWj75sSrGquDmuDBGQwooBs9firrEMD2wsZAQAdeGZoNO wZrC3BvM+0wHMcpheozVr+aaLmJ1FATmtRKLXWc1RdBd6YQQo9+OgB4iE5yV/rM2EU6q G7UA== X-Gm-Message-State: APjAAAVHJSiLInkb7svNRELk5k8QODycRPRACOBn3cWS4wufj2yp2GSs ixzCyBXXQrx24M/d/CPWLBo= X-Google-Smtp-Source: APXvYqz5RoPhIMwa91zhv153Rdiz6woDw36eDCwXCO/2WFNWgoh5TeIOsRKUMcfeWGvEgLnDJ7oQqQ== X-Received: by 2002:a17:90b:3c9:: with SMTP id go9mr776523pjb.7.1582660986536; Tue, 25 Feb 2020 12:03:06 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:03:05 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 16/17] src/matchpathcon: allow use of deprecated funcs Date: Tue, 25 Feb 2020 14:02:18 -0600 Message-Id: <20200225200219.6163-17-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 Internally users of deprecated functions are ok so allow it. Signed-off-by: William Roberts --- libselinux/src/matchpathcon.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c index 05a5cfa4cfd5..2e5aa347b52b 100644 --- a/libselinux/src/matchpathcon.c +++ b/libselinux/src/matchpathcon.c @@ -317,7 +317,10 @@ void matchpathcon_filespec_destroy(void) static void matchpathcon_thread_destructor(void __attribute__((unused)) *ptr) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" matchpathcon_fini(); +#pragma GCC diagnostic pop } void __attribute__((destructor)) matchpathcon_lib_destructor(void); @@ -451,8 +454,10 @@ int matchpathcon(const char *path, mode_t mode, char ** con) int matchpathcon_index(const char *name, mode_t mode, char ** con) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" int i = matchpathcon(name, mode, con); - +#pragma GCC diagnostic pop if (i < 0) return -1; From patchwork Tue Feb 25 20:02:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11404551 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 2E49413A4 for ; Tue, 25 Feb 2020 20:03:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D32021556 for ; Tue, 25 Feb 2020 20:03:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="No4JmmPj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731719AbgBYUDI (ORCPT ); Tue, 25 Feb 2020 15:03:08 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41979 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbgBYUDI (ORCPT ); Tue, 25 Feb 2020 15:03:08 -0500 Received: by mail-pg1-f193.google.com with SMTP id 70so69396pgf.8 for ; Tue, 25 Feb 2020 12:03:08 -0800 (PST) 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=xjSkLm+0LHvANOkmNPllladJCBXdxU5B3DDov8I2O94=; b=No4JmmPjE77onlkbggtFDmRVJVcVDNMsndueTHJQGJNHzodmmjjd+cpDqSjrA2yu7F mnebV3lJoTL+ODLMLUsG7qzCj7CJC6zMKO9gSzzTul0Zu9E6tU9cbzuXztUL+njWrYSw /AuI3tsQ1SPX1ITznWkbbj8LIbYdmUQCT10ByrsUAWyPoqtk3qAXM4+qFB3nEpGJvZhe RUhnUJUjaE3k9sMQybqJVDdDvk7N8fyqA39SSZO6JP4zCvrP3RfIT6MzVYXl6quRbHxJ R6QmOw1OFrkYhYE2OiMGDW2q/cBW+Ent3a/PS29MvXYyxgItWDeavKH+ZIM/4zlxH/EU P7eA== 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=xjSkLm+0LHvANOkmNPllladJCBXdxU5B3DDov8I2O94=; b=gMOZuNbAqKePzUwGaUmvfb6mWtZ54SyhHi/nT0pLvQ59ghfUuSzAk5CYeSuoEMm9E8 B7HXXjsxi/lLLnlGpMxsR4/kssH/07ssuPxIYiOoMRfujFCqLwNTg4hHTOeUK7YrfGAm uIbcqTPrTo7uNMt2XFM3yPad/22hmzId5zID34oQXzUAhAQ5klpLBkpRAo5njKsG4Yu3 MIy9OoJRrTGVus7sbZq3obrdZgFJW1aWI5RIFUBtQmS6St6pQ//K6f44ac4cM7GbT/2C ha/RfAgHHyQNAdkZBesBFInpAy2Zyd/DjHrsBjTAbiDjdoWzgAqIRMCUeC7PoGRVY5jJ 60+w== X-Gm-Message-State: APjAAAV5JvaJrO4R1sfCO1w6JtxjUri4WwthEDmRBe4o2HrIhrlPHn9A ul8WRSn6B6z0DOFS18gNNJQ= X-Google-Smtp-Source: APXvYqxzVyIbV599QFIQjzje8GzT6mzT97rW32C36Zxd7STCxI6dtg5tAtGw3V/JJWazdkydPK6jEg== X-Received: by 2002:a62:446:: with SMTP id 67mr354224pfe.109.1582660988017; Tue, 25 Feb 2020 12:03:08 -0800 (PST) Received: from localhost.localdomain (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id v29sm10636362pgc.72.2020.02.25.12.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 12:03:07 -0800 (PST) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: sds@tycho.nsa.gov, plautrba@redhat.com, selinux@vger.kernel.org Cc: William Roberts Subject: [PATCH 17/17] utils/matchpathcon: allow use of deprecated funcs Date: Tue, 25 Feb 2020 14:02:19 -0600 Message-Id: <20200225200219.6163-18-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225200219.6163-1-william.c.roberts@intel.com> References: <20200225200219.6163-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 Internally users of deprecated functions are ok so allow it. Signed-off-by: William Roberts --- libselinux/utils/matchpathcon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libselinux/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c index eb39a1881066..139ee9b45556 100644 --- a/libselinux/utils/matchpathcon.c +++ b/libselinux/utils/matchpathcon.c @@ -22,7 +22,10 @@ static __attribute__ ((__noreturn__)) void usage(const char *progname) static int printmatchpathcon(const char *path, int header, int mode) { char *buf; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" int rc = matchpathcon(path, mode, &buf); +#pragma GCC diagnostic pop if (rc < 0) { if (errno == ENOENT) { buf = strdup("<>"); @@ -103,7 +106,10 @@ int main(int argc, char **argv) exit(1); } init = 1; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" if (matchpathcon_init(optarg)) { +#pragma GCC diagnostic pop fprintf(stderr, "Error while processing %s: %s\n", optarg, @@ -195,6 +201,9 @@ int main(int argc, char **argv) error |= printmatchpathcon(path, header, mode); } } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" matchpathcon_fini(); +#pragma GCC diagnostic pop return error; }