From patchwork Mon Apr 20 15:45: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: 11499215 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 463B714DD for ; Mon, 20 Apr 2020 15:45:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F0A42078E for ; Mon, 20 Apr 2020 15:45:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GqKNIbV1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728243AbgDTPps (ORCPT ); Mon, 20 Apr 2020 11:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbgDTPpr (ORCPT ); Mon, 20 Apr 2020 11:45:47 -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 94975C061A0C for ; Mon, 20 Apr 2020 08:45:47 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id b8so5114848pfp.8 for ; Mon, 20 Apr 2020 08:45:47 -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=GqKNIbV1sbNcXLdAAkGDVdUWmARLKh7zKlyFKdK+03x5ONPcLKMxXVxePXABL6/iV0 FBPMbKlcw6JnQdprZJ9jgQzO+LLiBhU3xH+hWJusOGgej7sPHBf2mHmFK4AwyzFgq3IT rninrJ7VVULgLU/7JT2FwgZUgW3Jm39SSjO3+TKB2VAdb+0rYrCCbYHb0zK37VgBGAH3 OxjY/heYBOQFnZ1Dk2GjNvdFKbqRMHlpLm1KuyZk74sqUBXeA5Ni6y89Rtc6iYlGTEXe 92HEe8HLso/b2o1L9NkKpjlB1Z2byRBDjSt3wNNvFdGRBwD/0agYeKfh/yNXWCuZRO64 HB+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=mK6rHo6KUM5WsO4Xh6SckGgAQp4XOee8g5xpZh7S2Rc=; b=lOH3qyqaWZB5C0IVC5WAy+i1tDRZwtBO6a2MECrEy7dZA3YYm8HmTCdTFIRhnSUcCd WnjfUgf+OMMUb3n5tAfc1XQDaDrZQL5lY8DicRCABNBchEO2YsKHX97yOrnijrWERTHs 6u8YHWa2cnog1fq1F4V7pjHd5skrDVSKEDF0bDKmL3bkYBD7dKjPZZ2NuH6VcbVP2uTr pA2Ln8nZcM9/VBxjCbS0a8RecQe8o0SB6Hlw3i8eGTZ+gQv9m6skpLEo0HteT5KRN0dM LXsiBGm2epdE56TCu+csjfMc+DXrmqyC85sjSvX3u3JioUo3rhyydYsVx71qMOYOo/1u Mfyg== X-Gm-Message-State: AGi0PuYAnEid+tHSXJ4xcCGyoKzTO5OCOklUAGm7ZRzHFpkIlvoipITW oFszQeORreYtN4KNDI7Kqv8= X-Google-Smtp-Source: APiQypIDZvkBXBdkuuy8/pzIDEBM7Y23gcYK4XoUIa8Ey5uFXNRldaiENejv24j9hoxepa99ojqrqw== X-Received: by 2002:aa7:9207:: with SMTP id 7mr17167967pfo.178.1587397547080; Mon, 20 Apr 2020 08:45:47 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:46 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 01/19] security_load_booleans: update return comment Date: Mon, 20 Apr 2020 10:45:19 -0500 Message-Id: <20200420154537.30879-2-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499217 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 7ECD314DD for ; Mon, 20 Apr 2020 15:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 633BD2078E for ; Mon, 20 Apr 2020 15:45:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lcYsarh4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729294AbgDTPpv (ORCPT ); Mon, 20 Apr 2020 11:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPpt (ORCPT ); Mon, 20 Apr 2020 11:45:49 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B265AC061A0C for ; Mon, 20 Apr 2020 08:45:49 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id nu11so23464pjb.1 for ; Mon, 20 Apr 2020 08:45: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=M7QO7d/nGxQvtYBOljrVhg8Tk0kk4tiNZz4BHBU4WXo=; b=lcYsarh4JW8JOaYB2dALKvX0f5F8CWrMm5Eg/5vIXM4PuDFA9pfkqVgzOBMoUVZhha yjcSeqK8SnT3FokbAXyTOF6WOmY+/F5bc+1XjhmVeOyxZuRfjskACX+hI9FweL6D3BWn F9JQaVJoZPDwS20h0o+zPIZblRHWJpd8GldNIvAvQ4uCaubrK+gy43Yxe+N9sudCJJ8d e0iPrQaCO8tWdlJJNynuQo0iquE8PtniRPHNGfvkh5RUuGXSw0yelSzlqY3QvCo4dA7C DuVB5fEZ4Riso2O01xg1dBKqYZC1gm6AkPxO0iwk0O822r+U+wtimDJG2aNWi+iKKU0a c4Xw== 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=inVgpedHNF0cH74aVwintAkrDJHNVDfaevQPIxim0CSb1pXUgPu8vsCDmdyUYoYkj9 Y4C2zz10zWYC816k63xmKcIK5U0s3qn5yF8ybUfcq87t2k9w8wpc4a5d59GrSevXDHL2 cRns9ve1I64miOoeK9fnCSZ9XmmNXgwFQe3kh03oAUKz65kH5polbnDAtXHDLAYJxKOs /XmBxjTbXdHvGIM8FG1DFVvV9XeqhPapWaLGWSzkm750/NqOBb1y2yWFa7kOsi3GY5eL 5yYrigeCV4a1L23uILRf1JdaS8tsF3lkmJ3aDHOi6dAzJ/s2mkqFIKkA4S4SIaVpLSuz 9G/w== X-Gm-Message-State: AGi0Pub0C+lbu3xiAL1XHCfajNf4jzAp/BGUngFXbuZRw2FYAT3dHPSB WHqHWCwEydUcmV9y1if841AvNYL5woA= X-Google-Smtp-Source: APiQypLYvCM3UtFFwlyxGDhj6ZB/Vapx4zp/1Ec0mN0WLhiigKBuwGQmbXxkPxIPYMmjHhq48ec54w== X-Received: by 2002:a17:90a:68cb:: with SMTP id q11mr1704pjj.15.1587397549174; Mon, 20 Apr 2020 08:45:49 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:48 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 02/19] security_load_booleans: annotate deprecated Date: Mon, 20 Apr 2020 10:45:20 -0500 Message-Id: <20200420154537.30879-3-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499219 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 C3BB1112C for ; Mon, 20 Apr 2020 15:45:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC4D52082E for ; Mon, 20 Apr 2020 15:45:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AH11fX6F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728923AbgDTPpx (ORCPT ); Mon, 20 Apr 2020 11:45:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPpw (ORCPT ); Mon, 20 Apr 2020 11:45:52 -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 1C393C061A0C for ; Mon, 20 Apr 2020 08:45:52 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id g2so4096699plo.3 for ; Mon, 20 Apr 2020 08:45: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=5IskOwX5UcT748ON1fTtfkF0uP1N9WejQ0M281usXu4=; b=AH11fX6FWLQYPdMC11iVj00IutOEApX3KIZGmx/munlvuva7Rn0GmreuIaRq4sxJPN 7B/C8r9dwhZGJLh7n61zVKFhjE1pxvh/0FAy6bufO4ZLJTng8z0LPPY+IBwXQL/3ooRC /UlgwgyD+ToTml5e3e7KHRp3ItdFUHEXlyXZuYxOR8XwGxFozEY/fk+ru8asJ7iGz0Rs Q61hBEmAnDOuKQCgirCZwVzIjXUY5QrWDOPmaIbruZcTzWaIB48YKL4pjmqzC6EPA5LN H8gI9jmb999vQpgjvRAh/nAXjwxOk2INplK/e7pNohxtqseCnFZ1QHQjzeTSQt6mE0GG zN5Q== 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=pHuRIGqwwk881JinjAZJK/elW5E08oMgQda9mZeMarKfBJUy6PZpfztwQADifpx9fW NmXaNNl3ZVx8l26+vRYwhItT0ubaLIxXG1TcKT5K4mmwA2HgcC0mdT65hSEyYjrdyNhQ xMkwiEXJceM2yDIVH0S9YqTf5QkzBkzoDyU143JG1zMGB4KXfIk2B92/ig0KS8xTknpk Z5QVwLs83kopfZ3qH5/Q+x89REXABxQje5NnTxUSLi+Qv9tvhDMFhHvdTJtvOgojp56l cJEgcs461fJXROUFZOOrgcunjqynA06Z31F392aJh9stY9J36qNDZxu7kbXUs+x8Q4Hb T/Jw== X-Gm-Message-State: AGi0PubTqZdsmo240vMNy3zd9Ym5aR6qQJArWrNX44HiQbC9l3bA94LC a/MRTjADDSRmIbbiGMp6hPtuWMnaxWg= X-Google-Smtp-Source: APiQypKZNLPIeCo8VYy4uAIxfaavSTc9D7tIFZzI0u++F3t6R6zZxh7Ig/TqyyzXHGclMewej/DPDw== X-Received: by 2002:a17:902:9892:: with SMTP id s18mr17739590plp.321.1587397551315; Mon, 20 Apr 2020 08:45:51 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:50 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 03/19] selinux_booleans_path: annotate deprecated Date: Mon, 20 Apr 2020 10:45:21 -0500 Message-Id: <20200420154537.30879-4-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499221 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 C73FD14DD for ; Mon, 20 Apr 2020 15:45:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFF6E2078E for ; Mon, 20 Apr 2020 15:45:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i19mJLRI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729295AbgDTPpy (ORCPT ); Mon, 20 Apr 2020 11:45:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPpy (ORCPT ); Mon, 20 Apr 2020 11:45:54 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE0C6C061A0C for ; Mon, 20 Apr 2020 08:45:53 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id np9so14400pjb.4 for ; Mon, 20 Apr 2020 08:45: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=Hj+i+tMN050sCBe+IQticD3qraeN9Ogi50YT5Ooklvk=; b=i19mJLRI09+tdf+BRw4/bRm0gMz1nLZMh//xSBHDi3zplnXAF9dnchGuZ9YNcCTFkX QgXWQxKywdOw37ivcv08ZHOd1/rff/hp9ZKbxxN3R+MQMWqMVNTKJm1xuLqml7TyexLB 29H8FNDymV2YXM0B0oIyMYA6eeDvIiRu9ungHBTnbhUOkSWBGlcACK/NSg4ZX3WK2+b7 +WFeUWG6S1IMMetRVBEROQqn8FDz3KfHs0lzi/GVquxfPhNCU7gdoU5+DmeXeNtzoeZv T98kFgT0jgGZuOnSuPGFQYHW9mK64Bh7GtZKnatWnQSy+co6dZcuZT8+6w5ur4qSBBPO AvAQ== 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=lbZfiQwqlywvhzAPy7u25J0ZiB1J07ZUJlc6ntpHck5GLyJ3iomvfmgZlOAPGFTXaV BbLPMH2Wpe4KmVrzATbAOgW5749KIAW/rzwYoe5iHH4slxAJsEtRaj/GWldFy/+lcTcH A+TjCxbNdO7eIsVthy+m/ERzoSgz9wsJPlg8TJOhQoNISJVHB6WPxD5oybQo2Rfaen3Z 2cgCSq3yyPged400Yy6v0gEKFwVh+qoE36Knot6Malkd4cVY0fj+6PiBaGzojLkv5x92 B17akJSw4axEbr6W6XPbIXavm5hOB04o3QA1V8jYwvPLCjcP4+3eUDvGY2sGdXC7gesp ktPw== X-Gm-Message-State: AGi0PuYkaqFl2wDus1HskjX3b6b55P07snsmHNuzV4Ivk2j9oeCPkHv4 Ylvfr0U4qIWM9VmqlboltUq7SiqjfOA= X-Google-Smtp-Source: APiQypKzmTu0HPbQiucV9jLsZyjUTuPw4AzO6sZPwyI+hLpaZzhiII2tTOyPc0jmyHpWQfviuuJZ3g== X-Received: by 2002:a17:90a:3327:: with SMTP id m36mr25206pjb.116.1587397553378; Mon, 20 Apr 2020 08:45:53 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:52 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 04/19] selinux_users_path: annotate deprecated Date: Mon, 20 Apr 2020 10:45:22 -0500 Message-Id: <20200420154537.30879-5-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499223 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 8216A14DD for ; Mon, 20 Apr 2020 15:45:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6AAC22078E for ; Mon, 20 Apr 2020 15:45:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rs+kD4in" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729296AbgDTPp4 (ORCPT ); Mon, 20 Apr 2020 11:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPpz (ORCPT ); Mon, 20 Apr 2020 11:45:55 -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 B3304C061A0C for ; Mon, 20 Apr 2020 08:45:55 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id o15so4676631pgi.1 for ; Mon, 20 Apr 2020 08:45:55 -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=Rs+kD4inT1k+YMUyNMGb7Kgxn7VKkZrwp8WsrvQeuyo9bqpgd+SkRB+J2cbfOq5vEL FnlZcN8DjeqOicYqxnkcknaeFC3NXR3BdP/yNxaI7+Oa+n7Qa9NL/DQwf0cJIlHKVib8 A0vHQTdhfMzmm+2RMGKx346XKMHTd9Hx0ESPoFm76uiEyM8dZ9njTVcdhyK6GbRUaSTa fC+QNxog/v6KLREYrhoSI3KNs4vMKWs/5/D4OQOGbHnwWzrDdD7gv5gTiOQMcKXC4yLg Jq+4L1B6oh3RGkrQkfWd5ourvk6NZEe6cCL5b59udx39sPnxr7CMNOliZhgeeXCv3ECK Vxyw== 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=Mkl2EMrqi/sxNYGv32jpKQMI18FzJq3JZtmXm9lrQSmwRIUKiiUmRDPtrLDS7rp94y JYiyH2urR6fS0QMc3lAhvKaWv1X8K5kW66FSDZ8XM7aTyrYgNEjr2Iy8yx5BVm2Ea4q+ d98OEJnSiOm13tECBh/MyRjrQfse4RnYV1HcHuySa7mewqkCbXyiHG4k4muLAwAwc/lw VUxz1NV0KERVM6AW5uYx4nuZ235S2fQPUFtDxDIl0tu87PeFvnaZqbKCLkDJwnsa19Uc PKcvE437fwlXZra3pruiz+Xggjd1mqa8zR1nIX/D8SV4B1Ds3VqQz9nYUaQRXycSXrBd c/+w== X-Gm-Message-State: AGi0PuZfffWR9OtvdCToZQoMUfMPh2egX2UWSM3em0dCaPfyDIaYMali yCJdoZEbyug+feP8ejQTMbIzqrF7lN0= X-Google-Smtp-Source: APiQypIFFSOXPKzRJj/m9+dqUMs+X4b7bghgcPEIPW7Q2xIcoVQ7lwhbHeqDR3Ud/cFtIK2yKlsjLg== X-Received: by 2002:a62:19d5:: with SMTP id 204mr17539261pfz.75.1587397555252; Mon, 20 Apr 2020 08:45:55 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:54 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 05/19] rpm_execcon: annotate deprecated Date: Mon, 20 Apr 2020 10:45:23 -0500 Message-Id: <20200420154537.30879-6-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499225 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 7F9A4112C for ; Mon, 20 Apr 2020 15:45:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6808A2078E for ; Mon, 20 Apr 2020 15:45:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oHiyM7X7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729298AbgDTPp6 (ORCPT ); Mon, 20 Apr 2020 11:45:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPp5 (ORCPT ); Mon, 20 Apr 2020 11:45:57 -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 9457FC061A0C for ; Mon, 20 Apr 2020 08:45:57 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id d17so5256773pgo.0 for ; Mon, 20 Apr 2020 08:45:57 -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=oHiyM7X7MWBqUity/tvpGwcvcpjScvatO74fnADFLco3XV5s8vFTDRo0B8OtwuCDRZ hjp8K4MxLmOvceq3glKbPbBoziVQB9UffODYtfCXJRrM6KYBtIS7EpZBnTH7HJqp/wun +iKv9nbSlcd72a0wna4CJbRiC2bz0XxbXuyw9EpJ4SedeVYVu2OiBGpRZ96A87ERYwhb yS31rZTbMtNp5yARNdrHyo7Y6YMp+83YtdlpjNHed2iz7gnxAjz1Ym7DMvemcliy2Sv3 sbXu9zmAgqK9HSjA+W32EZ6tL3Swa1bZv6mii2dJMqHXL6v2Tv2AIczcUV0Vc7syg+us D6Vw== 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=f7YqKYOBxhgw2H6bpraEcIhSGB+SnGNMsXJ6/NvfuGjLZ0gJ4UFYoUc2DMZmQfNjjf 7hl55StjYZGrSGq0P+1MRarUBK7xREC8DkMk23kAn8V7971m5q8ZarN9/8KgbQXqm89K LcBVMp4StwN/oLHQpr2JUFWkVVDkfPPynqaRyeV7yHGi3U3jpd1nmaIWynU0y1YXAQnh m40DcmMq/nJf8kHLFII7EwJCHtrrBw+IN8kK274gytea0BfzOzLybiR3pd8BXVos9Jo4 0ax3wpwmK+Gb7XmSNZcqGS7jcrSL3TtOGZnbr1YmVACoqzO+bTr+KI2nWt1+P7R8kX6Z TSPQ== X-Gm-Message-State: AGi0PuY+cU4rhgvevAw/BqubAXMJn64bvJ1pM5TkGtjA8lxSz6H7LwqR qlQTW4ZookjJHt00+3CsMsE= X-Google-Smtp-Source: APiQypKDx1FyMK29YGcg47ZZtOWZ9hvIw4Oezh1aFvTDYIY682//a2gf7R1hrW8ZpzVfKlD5ljDnlA== X-Received: by 2002:a63:d74e:: with SMTP id w14mr16635087pgi.157.1587397557086; Mon, 20 Apr 2020 08:45:57 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:56 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 06/19] sidget: annotate deprecated Date: Mon, 20 Apr 2020 10:45:24 -0500 Message-Id: <20200420154537.30879-7-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499227 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 5934D14DD for ; Mon, 20 Apr 2020 15:46:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4195720775 for ; Mon, 20 Apr 2020 15:46:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PSgxp5t5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729012AbgDTPqA (ORCPT ); Mon, 20 Apr 2020 11:46:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPp7 (ORCPT ); Mon, 20 Apr 2020 11:45:59 -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 847C7C061A0C for ; Mon, 20 Apr 2020 08:45:59 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id t11so5249081pgg.2 for ; Mon, 20 Apr 2020 08:45:59 -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=PSgxp5t57I0Wo5Ty6/uorB8Hvc3WzRMdS06yQpLC8RhT5dTgbQF7KSaGoGAwkdWjJD GOKUjqP9EWLBKYmw3XJZBImunJQWhsZucMzSpWyOXwo/4YSzrotLERc4xQedOCzWUUT7 mC6a+AUmL/ShS29wGjBCfHGoIJ3VWantCvKcY9BbHstzISWz2hHv1pNDzQYkUoYny/k0 xOg+ZMbvEALsoGOwTQUE75FJa+j7yrInXgtN8U8wbqbhzCTGUnoMPLMnS1pVcCclFH48 k6a/3v+NU4vom+aS9rbNNrKc44LVaxLkhNZ6j6SDQCK3/fCQhnjUhj76GunwRQEZ9MTQ YjkQ== 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=SQuRSrIxDrEDInzq1nH9dmIZ20jEnrKeOI6DaRIfI7R/zoYr2dnTN6jpnEAb2KxwhX yaUTwChiCn/IOtzGDZsJ6lViQkSTpagTdqWJS6zuvWVquwu0y7rfpTzfbbruC1Y+1VDW dd7hbVmPSO79Wz6uLy0dJ7Tv9p/vBNRAdMvV5Bgr6UYHM+kukO6WWZLtiD3gaaBAJDqo os0RLwg6C3Trfypqx4vc4jiq4G7XlUIHJimgojKYSgPkzhaD7q5RwJjBulnn+GRQ3Up8 tDHz/Tl6ZlhaenHwDJX8oj/5QUCn7O+mVTYWU1o2XGGFQEvHJC9inOUah/yUsvYaPZfy PoFg== X-Gm-Message-State: AGi0Pub/2+OjQ5HWVrwwN/ggtA+Hh+fl6QtpWznZ5WT5j7PsiD5VEgtI eWb2ZvBtHDR0Wq0rb4K4lNxmiVddNR8= X-Google-Smtp-Source: APiQypIIld8KLdb/9UP1CySBdyCmtvGolpAQ2KiOjQbY+XGkeAbO/p1MacIA4uhYBFWp/p/UJM6KBA== X-Received: by 2002:a63:4f23:: with SMTP id d35mr16307977pgb.197.1587397558978; Mon, 20 Apr 2020 08:45:58 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:45:58 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 07/19] sidput: annotate deprecated Date: Mon, 20 Apr 2020 10:45:25 -0500 Message-Id: <20200420154537.30879-8-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499229 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 2EEB614DD for ; Mon, 20 Apr 2020 15:46:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17A5E20775 for ; Mon, 20 Apr 2020 15:46:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pqwmahBY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729302AbgDTPqB (ORCPT ); Mon, 20 Apr 2020 11:46:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPqB (ORCPT ); Mon, 20 Apr 2020 11:46:01 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67BCAC061A0C for ; Mon, 20 Apr 2020 08:46:01 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id b8so5115157pfp.8 for ; Mon, 20 Apr 2020 08:46:01 -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=pqwmahBYJDnYfq2IQe4nMH8LA97sJgYk2CnwRhtEARC/SEP7Yjk5Duw9KNP+gaSVLg d9H/k7JkuUOLtleO9A6hCsRAyqgIsraiTJ8B7pZnBdQ73ykDqF6ICQVueE2Jet65kdQx jvEGvv5FefR5i7i+FrxhDlFDUmvN+k+dE7VUYMc+yZ/Ywmy9kQ5xPNH+tO5slA7CFQ4c 7d1P/DMwvdDfVpRi9P160b8qIx+l7eNpqKhkpHzxoLheis2RxdfHnguMfVMRoaFOBBcz z/CaudXvwoIhhr1iPS0AuzhuwL/MPo89u+aFoHUY8fKL4EkDfw6GMff3+V6eRoXyoqDc WIgg== 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=W6pVpqY1KaE1dy3xH1v5XgTOpMUrkgmft16UciRYoYtYdsYO/bPILRbrkuXtEXz3rY Y+TiBlYBhKuuE+IaFld6aZ5BqZO/3GGbYURGdsZ/s3MC9FlAgAQe94cL7fIHyQumgknN j4+OHnK4iojpNehMa1D7s0cPQ5MLpaYufbXNY8/3HrtgTW45Y6ak4ZSJWAPOJzZDb5z1 5ycDopdNqZh0m/9MPnnPxO5KgC2F6zqh81lEsOvip0GxCo5NMeYkJjAtSuHSwAZsg9ES 5ejgNZaAs3xlaYSD+bJBul9P9LbL8lrpRZcm+CAh2js9v53ynE7zFCO62/QIK+BP2NKN A+xw== X-Gm-Message-State: AGi0PuaAHMewKHOR/GQyDE9uX7vOnnB3BCBjFHUjYpd6bk1xOl1OdpVv iIrRyLFpC1Y/6Vj4m0UYNtOdnvau/JQ= X-Google-Smtp-Source: APiQypIeXzAYM4LqSXB5tam8ordJ7ikOAK2938YK3iYD8n/4Su289IgXwMZrmIbA6QvH7IVJOM11TQ== X-Received: by 2002:a63:5d5c:: with SMTP id o28mr17691777pgm.322.1587397560934; Mon, 20 Apr 2020 08:46:00 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:00 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 08/19] checkPasswdAccess: annotate deprecated Date: Mon, 20 Apr 2020 10:45:26 -0500 Message-Id: <20200420154537.30879-9-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499231 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 BAF43112C for ; Mon, 20 Apr 2020 15:46:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A331C20775 for ; Mon, 20 Apr 2020 15:46:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eU73WbIq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729315AbgDTPqE (ORCPT ); Mon, 20 Apr 2020 11:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbgDTPqE (ORCPT ); Mon, 20 Apr 2020 11:46:04 -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 01E14C061A0C for ; Mon, 20 Apr 2020 08:46:04 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id u9so5111096pfm.10 for ; Mon, 20 Apr 2020 08:46:03 -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=eU73WbIq5uZ8wTHjtLhxU583MSSQwdklcgQjq2nDesXaWNAxYIr5B9LnH88+muqeZO QFnSnDHd2u7G6sl0pbB/C/8vD3xOtinSD4kb/UxLMARJ+V2RSpp2HFnCbCvJKAo6DOU5 LjlC+PE85jUVSrjSUKUMTux3pD9XbsRjPepqX2TqQRJUhSdrYw5x9usDl+I0GUvkUkZv itmocHgzTbI/tLeUwnd089FZFbitH7Sj53tR+EENIO+/D2lZdF4xr0eP5+VN77jea8Z/ 73Ct5xWWVNDk8pw+JuU45/YqVYZUoS5p8hNEvuMemOT0UygF9s1bqRsT03QPRG/t2m2o M0aA== 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=ff34ZUPmte0Yz1mE4fUpDCHZuDtNCiDqXdRZvAdq93PTs5ndOJufQtq3Wdyly1QmUf tuk+MzQTdaWHU0NatQ4BgG9zR0qlmI2YjBYmyZUlLA5gyEWvxWzZQN6mD5I26RpgYv4k IQSBxAu+S8cMeRRKwSqDwd1HINJcfnRzztP12SKWJzyUGZc0t26yaZctBQnP4kgf49+L NCkr27EYKoMpHUMPttBKxNvb9xZJLPcEMSwi6YiD2v676OCbzxwqiCQpuVdT7nd2dkQE XTBNdA0Bt7ft5nZkn6Sac249Yl4X4jebwMW9GKgnpbUhcufiXhdalJTppz6PFItLuwhz v7Fg== X-Gm-Message-State: AGi0Pub/eTmNW9NTN1OHgujYAZ0dT13Z+hKp9ZZDvUS3V89vLJqWhOZo 0uVQV9OMNAhAe/UMpPHDEsc= X-Google-Smtp-Source: APiQypKB/UfIJ5LtDQrkkbx8pZtlIsy/EQmqIeoq0ibRWSicJVmtW1NhxZwv+cc0tEiAfjZkwwxoJQ== X-Received: by 2002:a63:4665:: with SMTP id v37mr16120736pgk.297.1587397563436; Mon, 20 Apr 2020 08:46:03 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:02 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 09/19] matchpathcon_init: annotate deprecated Date: Mon, 20 Apr 2020 10:45:27 -0500 Message-Id: <20200420154537.30879-10-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499233 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 1D483112C for ; Mon, 20 Apr 2020 15:46:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04D0220775 for ; Mon, 20 Apr 2020 15:46:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GU3JTs3H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729310AbgDTPqI (ORCPT ); Mon, 20 Apr 2020 11:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgDTPqG (ORCPT ); Mon, 20 Apr 2020 11:46:06 -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 E6307C061A0C for ; Mon, 20 Apr 2020 08:46:05 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id t9so27212pjw.0 for ; Mon, 20 Apr 2020 08:46:05 -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=GU3JTs3HbFtvHvNS2hjEWIJWM5zbwmrzG+0qG9JRNvdzpy9WLaA9p9bRIGR7Fkv1OI fQ2Ccln59zJCu4/klsYhgOdAhXp+Hm3Feq/DknWK6dLZsyemZAS1hAu1ZDWAYoc2L6aU yxtwD+2LKByOGJ0XfP0J3S/eyxeBQ5RV1d0o6dmVIjSTjTUfxmftNI+YizufK510aYZ7 Wjaq75/YHgHJC4OCEnK9ifz1DMsiqEsx7aHYAm5oDsv287UP7B3SfCzo4sYEx1TEqmGa 9pCFQXy+yTA7hhzFW5mFU0KONYGM+KMLKkzSUrLgUAZDGQGPYwoR2wfuLYLLXY5Trm+W yRYw== 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=ALXjtRTjZ++6fCvRLzkjXRGzVqqbzUM/gD8m8FsvcltI19spj/rPJv4r2GU9A/gvQG ZB+iQgc8xtwoHwEVVlHDEtPIBVJRCnqFYMFYKC4P/QaYcEJDMcE7Au6WbIKqCH/qFE2z ob55pUxumkGm9a3QrnN912BCv1PJENEC2thCyWW+eM1HZtsJ1TnCb2g/PCcZkg5//n0A T7tYuwI4fPRKAb3q14iV3ppZux7mauwDEeRZ5XbFxkMbP4pjRlm3vvnjlb19BqdBqy6o SBb7rUoZ4ZEeunYYmftTTuXigev3hnDmsaXeGV6KY/7tud0cp7jUrFqtvMD7+mKSNdtR owrw== X-Gm-Message-State: AGi0PuYh0CIwhkMrQvi836gkHZH2rkKAffqEtA+F8qcLdk8Shnr4ZJFz sO0FI62R5X/J00Ij6QpOPNI= X-Google-Smtp-Source: APiQypLcEqwR8fZte9S2DwbpghmeyvjAjgrleZep6V0j2b5BD7DVvzy04IM22whyK9mdId/o/Y7OSQ== X-Received: by 2002:a17:90a:be12:: with SMTP id a18mr14015pjs.162.1587397565431; Mon, 20 Apr 2020 08:46:05 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:04 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 10/19] matchpathcon_fini: annotate deprecated Date: Mon, 20 Apr 2020 10:45:28 -0500 Message-Id: <20200420154537.30879-11-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499235 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 386AC14DD for ; Mon, 20 Apr 2020 15:46:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2145020775 for ; Mon, 20 Apr 2020 15:46:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UVT6X8J3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbgDTPqI (ORCPT ); Mon, 20 Apr 2020 11:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728788AbgDTPqI (ORCPT ); Mon, 20 Apr 2020 11:46:08 -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 09912C061A0C for ; Mon, 20 Apr 2020 08:46:08 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id o185so4710664pgo.3 for ; Mon, 20 Apr 2020 08:46:08 -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=UVT6X8J3xKGjtBL8XIqL58pmncctW5rYhujyQ0Hj5rFqjt4f+68ZrGahvRvXjn4NOp DHDkaxYe/zMUpxqjmF9gjdNo4CANWJlW65wAoTWXvm7W3WeFPfwbiN1qujOVzzhhfIj6 TlqbbuhmBbdng5qRWK5XywhvYPfhZ1yb2Ddtgc8Hn87udWp2x2P+Xn9wbEzgSQepfRYI Sj5cxlXAFK/3/xZdQM7zhhzQdUuL8UWDJRiZ3iP/YE/y6riw8cB4dSel8lnnUGGhCGIC l8NydaPQyqLg7WVzdjehlFb9BfFPM0134RckPkmhDVsopX01hIg8+sCh3Sc6oN2QlHkD IW4A== 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=WQpjeYY/mm8rbtVlJduHNZPWdjB/FUT9rBvwQ5Oo3B+wDQSUX1pS8vo/Y1UUq5vaNq Pb96XWCW6uxJSTkXjCm5eOYylZkcXhraGQzB7cWrd+H7BmH7VUc1SDnsay+Pysj+4UUD Y/hEEFkeR4xR/fTs4C33yFJYCTOnALi2aAMS0lrL+YHJI3HQHAWr9BFTg32C9wS/qOpw LJYDhJAfETcLcrNKFBdCPz4giPepvuIeq6OJL6ne5BocMtq76UIxAl/4uZxkzte1f7D5 g3fgjRCFsUsk/O0TW7gRFMpWvJVCz0+TNhKDZGgPwqhWJ+NJf4/HWjV8p4yR2jSHM1+p OUhQ== X-Gm-Message-State: AGi0PuZigvG42z4Pp6I/zpxDt+tiy7fEU9PerG4LGUwM4sgx653rA5Vr mOOf2SNWUdUjFuyt7YN3ARs= X-Google-Smtp-Source: APiQypKxT/w9o0vS8njDuClNUzSOCXUNPEjK6GLqO4ogHdDnBX9uUVhZj5LOMb4x0VyQXQ6iMLs0+w== X-Received: by 2002:a62:144b:: with SMTP id 72mr17648481pfu.246.1587397567524; Mon, 20 Apr 2020 08:46:07 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:07 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 11/19] matchpathcon: annotate deprecated Date: Mon, 20 Apr 2020 10:45:29 -0500 Message-Id: <20200420154537.30879-12-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499237 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 5F66814DD for ; Mon, 20 Apr 2020 15:46:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 46F4A20B1F for ; Mon, 20 Apr 2020 15:46:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Eg02tcUE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729376AbgDTPqM (ORCPT ); Mon, 20 Apr 2020 11:46:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729377AbgDTPqL (ORCPT ); Mon, 20 Apr 2020 11:46:11 -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 2C012C061A0C for ; Mon, 20 Apr 2020 08:46:10 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o185so4710717pgo.3 for ; Mon, 20 Apr 2020 08:46:10 -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=Eg02tcUEcj6BX/c6HcaE4Wa+3spMh17r2m9z/8xxV9Eci+6bPag840abNkXtuercyX Qw1BKOTvPv8tvat9TBR3FqvBW9f4LEu8knjw9z8J/8YOqi8+2JHmJsLbvUlwukcqPyOY u7rKujK6VgUFcrIDV7pY8AvvoWRGX4QIEL9YATRm7yeeKjU/bQcDIQnfAB1V0WEA11ZM 5ZT+LYC92VBfAimFU65XOet45XUYWbW7/sRKBIOxktPsT6Og8cirRrKsInOEAUeSOoTc vbQeJdiLLYoIFen9WW8z7dCKWTJz/11yF5CFwUSBxyyg224Z21bRIyo6Bi4ua7iNWzR0 vjeQ== 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=VAfzLAjA2kMT4cOlm0hGJKF3kOEcw4d9VyHDBkIOd0pLBCGjbteQzUd9PHsIgEjiDo 0/cd7fXisisSTzTcQOWydrbl/BBBDZ58CmTv3NbRUwwjB9dhGVsyEi6KNlUIVofoE1sV j8J/joeTfiW8rogLkQ6vKMMvbTVgYTIB/Z+uxahkm03vqbhMKS3NqvnxDBkJC+9mDstz a5efJI0NU9qAGf/8hInhsYXTEhzLjfiofIS46vmQXTIhGMclhYbyMGB+W0bvkd4nPEaV Amlr3+K4b8c8oDugICFd8Tx3nOSRYt7SqwWy+H0RnY7cekjPPyWKf9EgoDGSmX+vcU0o RKLA== X-Gm-Message-State: AGi0PuZ7zjVlu/mtWRnh4XSHwGArawiH37R96DChl8i+lvisP9js4Bcp /QEWw22hKIHweWfnfoaiS+U= X-Google-Smtp-Source: APiQypL8KXG3bfp1fgX2iwkVwVXswpg1orseHsKQTkCP9vvAcpSBwEO/KpcpYRgpvvGqD18kd2WR2Q== X-Received: by 2002:a63:581e:: with SMTP id m30mr16721066pgb.295.1587397569662; Mon, 20 Apr 2020 08:46:09 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:09 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 12/19] avc_init: annotate deprecated Date: Mon, 20 Apr 2020 10:45:30 -0500 Message-Id: <20200420154537.30879-13-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499239 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 599C9112C for ; Mon, 20 Apr 2020 15:46:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 415B220775 for ; Mon, 20 Apr 2020 15:46:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KM9u1JrV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729377AbgDTPqN (ORCPT ); Mon, 20 Apr 2020 11:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbgDTPqM (ORCPT ); Mon, 20 Apr 2020 11:46:12 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6163DC061A0C for ; Mon, 20 Apr 2020 08:46:12 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id d184so734731pfd.4 for ; Mon, 20 Apr 2020 08:46:12 -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=B3TwQUklf9Fn7jFTh/RI/uyTKJIg58Qu3phgEeCNtRs=; b=KM9u1JrVBZGNFliK+ud3/qCv8TPNV9XnGpPqCMNzQTdtpY+ENfZCgPVtFyjT2u3n92 B/pzcL/Q/DhVMVdOuTtizedwfx1yoiBam/4IIJUpDywLVsIm+lO+udhTTwB3xQn3Xme2 O8iEuNmaW3/wRmi2MUls+qUzDrJxodgTBgHrAAroPWmKXB1iFjO87rL2ArG9D5zmYGHN ovltwHoTT2LT3ZGEvk4x7X+v8L+r3UbgOjrJz5wL1pmAP0+wToBnJraRKpCrXk6lv5Zw eBcqjfJSIGzX+X2oux2mHC+pkh2BKRcR+XBNcbQ8VIMQLl8DJSMRdgp4/uOUe7msp51T hfGg== 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=B3TwQUklf9Fn7jFTh/RI/uyTKJIg58Qu3phgEeCNtRs=; b=lfY7CrcreiNJjbWLOodTPF/rOiDEOpeMgfhp7HpAqnl3IsLK+b6FxUrzLt/DizzN/E K6At/2nZ6uqoqEkxGzytpwjP3y2g8lglB0xy+xXGOLWlQTuG8BlvNaf+R+Z5ZUG6C4yt P27rWyPxXxmstwFKWDyNEvbuavnPR7lKZvkhDHUhWU3Gv+bVX2uCrAhIILIPhWbsf+xO 9/+c9WTlIVyGANAkOloU/vu1BxKfVSAa8d8AAq+hPnOhOMzZ7g+YasAmkMyE1ZRqDXji 5QAyTgWwjcV3dOBfxP0e2gkqz3fbRzTipYOkxlwEQcS5xHRyWkZ2F/43MET7uh/Uga1v dOiw== X-Gm-Message-State: AGi0PuaofOEUfMdMYV/g1C3z8cVTTIZAN+3OqQYDfb5OwUaoOHcsJUyn Zx2zg0fMAsgGPPsr8sPKROY= X-Google-Smtp-Source: APiQypKpsRrPrjmMDsk/gR9jnRbq6Mqrc59MupsuITRbasecne2aJAT+pK/dMSmztatyS4A7HNNFEQ== X-Received: by 2002:a63:1c50:: with SMTP id c16mr16909467pgm.255.1587397571875; Mon, 20 Apr 2020 08:46:11 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:11 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 13/19] avc: create internal avc_init interface Date: Mon, 20 Apr 2020 10:45:31 -0500 Message-Id: <20200420154537.30879-14-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 | 11 ++++++++++- libselinux/src/avc_internal.h | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c index ab10b0f9f1cb..505641406995 100644 --- a/libselinux/src/avc.c +++ b/libselinux/src/avc.c @@ -157,7 +157,7 @@ int avc_open(struct selinux_opt *opts, unsigned nopts) break; } - return avc_init("avc", NULL, NULL, NULL, NULL); + return avc_init2("avc", NULL, NULL, NULL, NULL); } int avc_init(const char *prefix, @@ -165,6 +165,15 @@ int avc_init(const char *prefix, const struct avc_log_callback *log_cb, const struct avc_thread_callback *thread_cb, const struct avc_lock_callback *lock_cb) +{ + return avc_init2(prefix, mem_cb, log_cb, thread_cb, lock_cb); +} + +int avc_init2(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) { struct avc_node *new; int i, rc = 0; diff --git a/libselinux/src/avc_internal.h b/libselinux/src/avc_internal.h index 3f8a6bb1cf84..c8d26a8ae254 100644 --- a/libselinux/src/avc_internal.h +++ b/libselinux/src/avc_internal.h @@ -173,4 +173,9 @@ int avc_ss_set_auditdeny(security_id_t ssid, security_id_t tsid, /* netlink kernel message code */ extern int avc_netlink_trouble ; +extern int avc_init2(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); #endif /* _SELINUX_AVC_INTERNAL_H_ */ From patchwork Mon Apr 20 15:45:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499241 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 8AD5E14DD for ; Mon, 20 Apr 2020 15:46:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72DC620775 for ; Mon, 20 Apr 2020 15:46:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R3iXQbQu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729386AbgDTPqP (ORCPT ); Mon, 20 Apr 2020 11:46:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbgDTPqO (ORCPT ); Mon, 20 Apr 2020 11:46:14 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F38BC061A0F for ; Mon, 20 Apr 2020 08:46:14 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id g30so5128555pfr.3 for ; Mon, 20 Apr 2020 08:46:14 -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=U1To/FE2fo06GVscvLcra+k1YFjbs4QDa36op6rS+9Q=; b=R3iXQbQuL91FyeOEp7cA6xv+nqBLxHye/ZCKcc5tLKvqzfxcp7KAJXzsrMKbiCMR5H QNqslt7gqquFGTLavnlvC+dKYlsXT/v19uc6u60qE186pzVnr2qx1uvmhD3ZV2Y03eV+ qbWSnyOF8OcSeluB/5YUtTRTjSDLbhpV3NXN5ZZjV/y51+IAPUSi27vqYlTxADpXK1Gi 3rmIvgwsXyhSBXMguEvGZ1u/stu9DFJBDUGymDkQ/YLEz33Cs1XyY1BtH1G1CCf9k/ew UnuGW593pK+sPI58qP1dhcEvDMFooRZflUetHKO7z8hpO0J2Hu0UYI4LlK8RBIJ/sCg2 LGyw== 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=U1To/FE2fo06GVscvLcra+k1YFjbs4QDa36op6rS+9Q=; b=Valr7jmuA9mZH40GKsHDYdcpBFQYBGA8Cjy2vxCOwlp+vyB/lSAToPzqXUsssyW7Bj WoOFKyZEljhQ7dtmGvldCkKT15gyBjlqg8kD3XVtykGbqmP+J9BPxZLI83/gsiVoDEFN X8eWVmuJK71QraV4NttAUQA4JrK8T7fcd4UOLMgFOmTuI3KJ8L/JnjnG68P/8WWdmHt+ +aKFaJzoseaUNZ56jxfA5ZLE6c6W5DzNEowrSvE5cDXpURJD/yfuaZ6MdXQGZUi+p04y D+E/TFRLFK7TYkWK8TS2Ay8CM1SR6OQ9f0qbgDkTtXxMSPja5tN3ENfCZtfg64aqcOfc eVqw== X-Gm-Message-State: AGi0PuYKZVPp7FFQYqghBQOv/sg956Mj2fBMpvN3MOQ0ddOpO4sXXZf3 rI4GngaS9mv91a6Ym8iQKXw= X-Google-Smtp-Source: APiQypJhwJMHm03E1IHO24d8OL17mlR1ir0u1Ggfk8AJDmSldWbO/iamT+7h09JRaJ53o5kshTXKTg== X-Received: by 2002:a63:e708:: with SMTP id b8mr17588308pgi.128.1587397574085; Mon, 20 Apr 2020 08:46:14 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:13 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 14/19] matchpathcon: create internal matchpathcon_fini interface Date: Mon, 20 Apr 2020 10:45:32 -0500 Message-Id: <20200420154537.30879-15-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 | 10 ++++++++-- libselinux/src/matchpathcon_internal.h | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 libselinux/src/matchpathcon_internal.h diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c index bddf77a49ce1..8515c88c2bb8 100644 --- a/libselinux/src/matchpathcon.c +++ b/libselinux/src/matchpathcon.c @@ -3,6 +3,7 @@ #include #include #include "selinux_internal.h" +#include "matchpathcon_internal.h" #include "label_internal.h" #include "callbacks.h" #include @@ -317,7 +318,7 @@ void matchpathcon_filespec_destroy(void) static void matchpathcon_thread_destructor(void __attribute__((unused)) *ptr) { - matchpathcon_fini(); + matchpathcon_fini2(); } void __attribute__((destructor)) matchpathcon_lib_destructor(void); @@ -357,7 +358,7 @@ int matchpathcon_init(const char *path) return matchpathcon_init_prefix(path, NULL); } -void matchpathcon_fini(void) +void matchpathcon_fini2(void) { free_array_elts(); @@ -367,6 +368,11 @@ void matchpathcon_fini(void) } } +void matchpathcon_fini(void) +{ + matchpathcon_fini2(); +} + /* * We do not want to resolve a symlink to a real path if it is the final * component of the name. Thus we split the pathname on the last "/" and diff --git a/libselinux/src/matchpathcon_internal.h b/libselinux/src/matchpathcon_internal.h new file mode 100644 index 000000000000..3affa687327f --- /dev/null +++ b/libselinux/src/matchpathcon_internal.h @@ -0,0 +1,6 @@ +#ifndef SRC_MATCHPATHCON_INTERNAL_H_ +#define SRC_MATCHPATHCON_INTERNAL_H_ + +void matchpathcon_fini2(void); + +#endif From patchwork Mon Apr 20 15:45:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499243 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 E0A7C112C for ; Mon, 20 Apr 2020 15:46:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C988C2078E for ; Mon, 20 Apr 2020 15:46:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RiVFLhWQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729418AbgDTPqS (ORCPT ); Mon, 20 Apr 2020 11:46:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729384AbgDTPqR (ORCPT ); Mon, 20 Apr 2020 11:46:17 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02A03C061A0C for ; Mon, 20 Apr 2020 08:46:17 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id w3so4091287plz.5 for ; Mon, 20 Apr 2020 08:46:16 -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=ThytxPAXFKfJwqL1E34wdemZ6YzRL2kXegLVFr+oRIk=; b=RiVFLhWQy+s+TaZvKpB9avxR3PXqAAfmaRHomA7K3x0yV4nqyun5+rBYRh+Odab5Lt rubXjloMRpR/JxusSuxEHYwnVEhKLz4BlLuUcmUo3qq87bEie0zsI6Y+vp6GMnxiGro5 hAorRzYERQDmYDJumob3kU4CazCxCKDzSYFHRTWGfaNVCp9Wl24UfwWmNLPINjYM7oW0 D0R/2squcNUz7QzNj3bdfp1J0YaRV4ijKVw75ld54HBiuXce1dyCfZfxx4Y2rWHTnoJR jEIDk/veKfQlgfbfb8OENUGEWpDKEClItPwmz9ps+A2+N4aiaBKroR03NJqzJTSLH47H SgjQ== 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=ThytxPAXFKfJwqL1E34wdemZ6YzRL2kXegLVFr+oRIk=; b=Eg9UG3kVjtIwxPbBVGE8Z9bifajTqtmLHY2Tj1hJo5KBWjAy4WVST224YxLZ67H9TK UeLqaMtIu2yZXuEPzm09wJMggoyHYTTMtHpuNU7DS/WiPUk26xzDoamB5QQYdDo2S7RL ByeXUI4HsrVe4mziP8RnkM1zx8Nx4tbzvyeqVTty2uwo5LgNUB7WF7C58OWKWxJtZxOC ybpYyjbEqNCTkP7L2JGoeDXauab9moIjybGhU6ZxQfptW0s7/yA+fbkYR9Da0idozafp FRDzhj+Ac9WjDXZnkY46F8UQROm5qxKskIV+B+EJNY2uKWU3YsMUzMx4h7oQcrQ1vRaT amsA== X-Gm-Message-State: AGi0PubYPyvlRXkWvq6LsdUeD6uUDI0JMWBHwQowT59F//r6OSUpqPsS YLzPnAMCjs8qL7iRbtS/U30= X-Google-Smtp-Source: APiQypIP2DBxeqHCxFLkUgogH0fygVWiKmkLtiUyrmXjnHsitMqPPlY9MUHfY1A9bTYB+W3OM7u3Jw== X-Received: by 2002:a17:90a:d0c3:: with SMTP id y3mr23696pjw.128.1587397576164; Mon, 20 Apr 2020 08:46:16 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:15 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 15/19] matchpathcon: create internal matchpathcon interface Date: Mon, 20 Apr 2020 10:45:33 -0500 Message-Id: <20200420154537.30879-16-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 is marked deprecated, create an matchpathcon2 interface for internal users. Signed-off-by: William Roberts --- libselinux/src/matchpathcon.c | 8 ++++++-- libselinux/src/matchpathcon_internal.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c index 8515c88c2bb8..88539e627f5d 100644 --- a/libselinux/src/matchpathcon.c +++ b/libselinux/src/matchpathcon.c @@ -433,7 +433,11 @@ out: return rc; } -int matchpathcon(const char *path, mode_t mode, char ** con) +int matchpathcon(const char *path, mode_t mode, char ** con) { + return matchpathcon2(path, mode, con); +} + +int matchpathcon2(const char *path, mode_t mode, char ** con) { char stackpath[PATH_MAX + 1]; char *p = NULL; @@ -456,7 +460,7 @@ int matchpathcon(const char *path, mode_t mode, char ** con) int matchpathcon_index(const char *name, mode_t mode, char ** con) { - int i = matchpathcon(name, mode, con); + int i = matchpathcon2(name, mode, con); if (i < 0) return -1; diff --git a/libselinux/src/matchpathcon_internal.h b/libselinux/src/matchpathcon_internal.h index 3affa687327f..c63bcecfec89 100644 --- a/libselinux/src/matchpathcon_internal.h +++ b/libselinux/src/matchpathcon_internal.h @@ -3,4 +3,6 @@ void matchpathcon_fini2(void); +int matchpathcon2(const char *path, mode_t mode, char ** con); + #endif From patchwork Mon Apr 20 15:45:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499245 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 17CE514DD for ; Mon, 20 Apr 2020 15:46:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01A7B2078E for ; Mon, 20 Apr 2020 15:46:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KCPb1ezw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729421AbgDTPqU (ORCPT ); Mon, 20 Apr 2020 11:46:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729384AbgDTPqT (ORCPT ); Mon, 20 Apr 2020 11:46:19 -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 26150C061A0F for ; Mon, 20 Apr 2020 08:46:19 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id a32so13530pje.5 for ; Mon, 20 Apr 2020 08:46:19 -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=LOHtashYMoC2LM7s1Gr3sElALlN26IIpG8KhKdYwP18=; b=KCPb1ezwho92TYVXYl4I4KoOL+U/e+ttuvk/WqBVt6eX4QUl4eOoeocPSmlBwD+m9H 31xDUg6RdybGQXmRg+mCwXXG0SvEOwgJfVfM5rnz8PVHn1u43iufw+aNJplmLc7VyuO5 txSLDtPbCi6j21wH17x8f9V+8d6ZAi4XzZ2tPAUVRcNZjyiOq5cy9rsMZpdXymnyzidR Jp8KjwXAeUKowUxO/xp+tLCSSsAP9iOa5U+ROL+8uDRZtl5LttQfitwB3eoprow7SsiN Js2hcDQ0UdZgMCMDoKl2QqaIyvIKpM64Cc6zlSP9onTeOtSBbzQYI1q5DZm3Si4gvbhu c7uw== 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=LOHtashYMoC2LM7s1Gr3sElALlN26IIpG8KhKdYwP18=; b=IqATqLvgpuft38Jf7BhvsOp0O4Eg2uKs9bflRB9zFONYI7pwjKlrEa106Ph+WqTIzf Q+cTrKe7XxNl/4DcYp1YwuFbZmuqH1i2sWRcMfN7488vzGkBuIzgJdMRK7/M57alFNse ZJ/TPIeXxMQt8DVjXNXyqc1ERB6cDcbzKnpTvlNSNuPduOVMCql4csbYJKKBSouNb94g 2j+GGdtLleQhnq05sVkst3jlNLC9ezY/qyQpB3DB430c392cMepSqjYeIb2vd27fhO+g b8wI86/V0f1jTM6Nz6cbJytrejRvmedH9wz/lMSZMrNP0mG1DKKxcNyNGe1n4885XXv1 1WHA== X-Gm-Message-State: AGi0Pua8oWmzsu3iruplo8AtzoXWl57x7C5/0Raz/eWh1AiSZwkwj/6c k5PeyQktHPSM7ZcoTuVdqow= X-Google-Smtp-Source: APiQypJqcK9tpzMhMK3yN7ibogYQ5aQq0QV4Qq8LT6cCk2ryY6dM+BduJrqCSBCHBE6MkO7LZHBAtw== X-Received: by 2002:a17:902:9048:: with SMTP id w8mr16945214plz.24.1587397578618; Mon, 20 Apr 2020 08:46:18 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:18 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 16/19] selinux_check_passwd_access: annotate deprecated Date: Mon, 20 Apr 2020 10:45:34 -0500 Message-Id: <20200420154537.30879-17-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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..555d7ff3cca5 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_access2(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_access2(requested); +} int checkPasswdAccess(access_vector_t requested) { - return selinux_check_passwd_access(requested); + return selinux_check_passwd_access2(requested); } From patchwork Mon Apr 20 15:45:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499247 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 EF24E14DD for ; Mon, 20 Apr 2020 15:46:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D908C2078E for ; Mon, 20 Apr 2020 15:46:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="edXKHyfA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729423AbgDTPqV (ORCPT ); Mon, 20 Apr 2020 11:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726931AbgDTPqV (ORCPT ); Mon, 20 Apr 2020 11:46:21 -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 41444C061A0C for ; Mon, 20 Apr 2020 08:46:21 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id j7so1668969pgj.13 for ; Mon, 20 Apr 2020 08:46:21 -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=Mvx8CVPDkpLMKh1QkX8lBW0rcaH4/MGYAavupQUIPc0=; b=edXKHyfApQGeMfvuKqS8RF6OfnvEB6krjNaIWr9VmQZAAzhU3nIOQa1l2ir5FqvpPd xCC/yNCOEdMouhILjkVdmdjuZksuq2dFAAQ9lnpbkbGtCeJREGFiNWgHfkDUlUdbjcKY GvdCyW5xuazIIB7RylGa1zDXzLODH1jukSUTI2KO/oCK2LwAeQKWOsMEPw/BIbx6QpRe 9YIw9QG4Z42bJMWCuT3WFCjeTd0C4xJFz1g3OaNHcvOb8RD31TWkGdIGuSGhETFkvBd2 Xd8PVFlZZ1L4/nURLdYmgHUqDaoci5s3+q0Rkk5OmkFNWU2jBPPbPc0fbTtoPiRhOzOr m5AQ== 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=Mvx8CVPDkpLMKh1QkX8lBW0rcaH4/MGYAavupQUIPc0=; b=DsuEmztSHTGpXDaWxd758y7gw6wJsk7PrX1ckredC6gPae/iESTDTGRO0Z2OwgH93w mgtngrUJ97qVwl8MtlCtpl6sMV5NVPgJBtWkHeZOJR02PUmTcSo1RwrVXnZXptwfNFU6 yOLznByZnbFp9eYjDOdPgrrk67aIOCWCaWIl6hD5B63ublETPZQhc6bdt2++gtuxJzb/ IvAUmAkYxz1B5EfGCSMWiHKh1/2hfa4zOIF/eG273M0aORctDJJoBCvxwyk3dX6nty8Q GrBrD6RQ+QSfOLMRDhvcpJECaahwOX8om93EO2MgDLTsMbvqIhSU/NG5AUV4ZvZow6PW UrUw== X-Gm-Message-State: AGi0PuZ0SEMbrlSCenoS2hQH7tgQdy/5/4f+rM2mfGdyXdLt4k3I7eCl M6WYMl6k/W2SCEBMCQhPNT0H5GswPsM= X-Google-Smtp-Source: APiQypKKsdRhLhoSdSpnPduDofyN99LUR6gYnbNy3535pFX7SE1mWtVvmqX5r9BRr0+l9MeNKUKHOg== X-Received: by 2002:a63:6f4c:: with SMTP id k73mr16857074pgc.241.1587397580788; Mon, 20 Apr 2020 08:46:20 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:20 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 17/19] matchpathcon: allow use of deprecated routines Date: Mon, 20 Apr 2020 10:45:35 -0500 Message-Id: <20200420154537.30879-18-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 a5632b7c38ec..d66c333ec65a 100644 --- a/libselinux/utils/Makefile +++ b/libselinux/utils/Makefile @@ -58,6 +58,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 20 15:45:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499249 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 AB477112C for ; Mon, 20 Apr 2020 15:46:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C36420775 for ; Mon, 20 Apr 2020 15:46:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MJeU7SsU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729384AbgDTPqY (ORCPT ); Mon, 20 Apr 2020 11:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726931AbgDTPqY (ORCPT ); Mon, 20 Apr 2020 11:46:24 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 359A2C061A0C for ; Mon, 20 Apr 2020 08:46:23 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id r14so5133224pfg.2 for ; Mon, 20 Apr 2020 08:46:23 -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=MJeU7SsUyhwTUZFwztC88MNQXAf4mfNTlQ8Mpt5g8npPURDu+QeBA0IKxRyrPtfpMD /HudXvY4I2L7t+4Ozo0Uf0Udcio+mCyaOo4SADiH1j2vC4bM7wd6C1/0u1R+t26g17AM PtNSoWAk+uUbhbRSYKu6NRTcAphh2sXhelACc2Z5mRgRgx8ny4vXFLNFvfhA6kha8849 h89b+aBBjprh3dQu7//EDwegPG6gu2oIiAwFo47N0a33RIvCaYhjzazPu/8HFPAqHA+d ASlQHelrGy7HAm7zEKTXXbxW5Gv/ppX2arGqoxJ8yt2nGCRHdM7YCO1+j2f5iMhUNCYE 5gkw== 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=XfFNJiPU4pwh0157dpVPWAUq8heJuXnjHkYSc8ta5Z8lvgWtab09FuCEW9TjAXrERI f0P9GhcDt0M9GD1Og/3MovxBSgLoEM+FbiJ7AKl+HxBTWUAXCEcpTRcv88H2wthqCa6q E4A3LwJKWZVq8H9J4OHj6gRDexxnEkiiWmENQ0c/u+YER4p9mhc1GbHIQxnLbHwwRFbv UB6nKF2Wh3WtqYjCOn52MWwYE2n0z24Nxv47voxt7/Lwa9eUktmsUeAY6TRLNqXiwLYf 925/HlNSbfXylgalbT0EMSpdAq83y8su+SsBAoxlq2R/k4ASBweuiJ1vwYgW2WBOBCeK 40WA== X-Gm-Message-State: AGi0PubVyDDwHpXxswarW9lbKnWAZirDW3IefPIzWqIruLYd9Js1jKZ/ ahay/cnAP7Aag02tGr3yAGo= X-Google-Smtp-Source: APiQypK4SRM3B/+RfYdLD/dqhNgTdJ51aK6MSBo6UdrQh8V0k4Ui96DY1ecXCZ99Jg7g5qzn+8KcMQ== X-Received: by 2002:a63:fe54:: with SMTP id x20mr16382780pgj.195.1587397582687; Mon, 20 Apr 2020 08:46:22 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:22 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 18/19] utils: matchpathcon add deprecated warning Date: Mon, 20 Apr 2020 10:45:36 -0500 Message-Id: <20200420154537.30879-19-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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 20 15:45:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11499251 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 4B8D414DD for ; Mon, 20 Apr 2020 15:46:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3332920775 for ; Mon, 20 Apr 2020 15:46:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CNLk87hW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728779AbgDTPq0 (ORCPT ); Mon, 20 Apr 2020 11:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729426AbgDTPqZ (ORCPT ); Mon, 20 Apr 2020 11:46:25 -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 74A5EC061A0C for ; Mon, 20 Apr 2020 08:46:25 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id a7so21515pju.2 for ; Mon, 20 Apr 2020 08:46:25 -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=CNLk87hWaP+5y2NXSYgGuu2EB8GvzL4yj56klO+DOsE28rYeaDwgJZ9Yv8f99Awy+Z aWeUrRCVoUegLUnnU3xgNk3TPUYMDcJtlUVrX6sHTePw2DJ2sIIrAzYqkTBmCFi6JKlr c2+7DIWkdwozck919K921BxUO48BWjkUZVeXIWXkqtPtjIDGMIaDQJSLIg45vo5Y/ZUW N0f0PnMZPo57tp9IbJPePLIJET8FO88Kf94SMzDtJUSON24695tUEeRlkxAIFcdOQdvC Qv7PsgXmIzb4YEFfpwYrVV7Z7Joq0I0CLzbNmU7CMKCdherzVSN5ydYibxI5CpAA10g5 7n8Q== 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=WrsVCnDu5Og+voQitc7gf8BGexez4cALS5v6sz4e/wPWfXsbH0KUiHvNOrKXiEjOis dQMrBhFNNHHrPUXXZQdjaQrO2Ra8WT5dRXuz87QeMHIr/aB/F7SrQ9TLVq3HvjRUBPDI DBFQcRoti+TROiu8Iqs37H1FDTTeAKWtW9Oy57uiehofOLeWxYt0Vej11T1yGJGJBa7R lDk9CGHwUP8J9eZTLLT9/N1V6kv9QyacYBz0Ja7oER2nHAc3WbAnhxEt8AKakv0RyQfk 1ZXdPgTbul7ew2w9Suzfa1ZSz0L9ivsCW6bEtuxN+eg+Te2jOPwGidmkCvIYocRnxXuF Q1JA== X-Gm-Message-State: AGi0PubXx2t2JwQj8QkyEHVH4TOVjpWWHmLykdnP/SVCVu8T2krfMdy7 zSRyU6VLU24CKg36d1CP4Kg= X-Google-Smtp-Source: APiQypL+Aw36wr9YuWYUMEWZzdLmlmCq1eW4aw6K5APekphN/vEDbzsIBN107TKEW8eRI8FUl+VnVA== X-Received: by 2002:a17:902:7c09:: with SMTP id x9mr8358964pll.54.1587397584970; Mon, 20 Apr 2020 08:46:24 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id i15sm1367507pfo.195.2020.04.20.08.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 08:46:24 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: nicolas.iooss@m4x.org Cc: bill.c.roberts@gmail.com, selinux@vger.kernel.org, William Roberts Subject: [PATCH v3 19/19] Makefile: swig build allow deprecated functions Date: Mon, 20 Apr 2020 10:45:37 -0500 Message-Id: <20200420154537.30879-20-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420154537.30879-1-william.c.roberts@intel.com> References: <20200420154537.30879-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