From patchwork Thu Apr 16 15:43: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: 11493215 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 5F0F114B4 for ; Thu, 16 Apr 2020 15:44:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44EC422246 for ; Thu, 16 Apr 2020 15:44:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Brds3kwB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406042AbgDPPoN (ORCPT ); Thu, 16 Apr 2020 11:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2395396AbgDPPoJ (ORCPT ); Thu, 16 Apr 2020 11:44:09 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB59BC061A10 for ; Thu, 16 Apr 2020 08:44:08 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id t40so1526022pjb.3 for ; Thu, 16 Apr 2020 08:44: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=mK6rHo6KUM5WsO4Xh6SckGgAQp4XOee8g5xpZh7S2Rc=; b=Brds3kwBvgn1TfryKTNlivbbjlCnUehPsE/vGya1m8xvqllxkbEELAKci4+FYbrQ6L aqXE0H7xazSxkvHoauim8eOTM74vx3WbqjYc2Usl/Qq4FLQ7ssV8DUkQCt/izw0wOPSX Xnu/QP4JkOxTM78W+hj+Wwqq18Nb5WypPee6E9GzHGRdMe80+27f2ktoXqHmDFry0FQP mjAkhA+uxaIFQPfq6sJ1UtFDES7EhP/Mzeg3gOR7nhyo7BAWBFC6rZxkU6LDZkRW5iQE IekktJgtd7u5FB49TuUIIqGZM9sBb7b+E1Ge1RgCGpGmXhp0umokFudlcqVE1uT/sbi4 jZ6A== 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=abz7fOkwRcWFAJs0eQC08o7oFoEAO265/G/+sYk4q9SvDqUcbbWsWuIWioNyuARq4l rh6AgQE3V/Pp/G5P6m3RNiTEizdYeocZgyGCIftPgYXJDKM6zhlXiAXh25Z1LecnvnLm Wrj3thgcvD+clWCQLX2bpbe7lb327SlHuXenD3AwD1lielYyeHMIkj09ufL+wsbtTDKe 10lX3hV93bv525azG2NfqovM8znLguZZHH8GRm9kjPvf4XgUoy2XbwfRkRkIzIvtQ7Mq BjNI0MEhjY4zP44Wzh+1hrZEPC88RgBj1+U1hIUxhz7aSUPSndt9sOyz70mQWy0ZtIYG c9MQ== X-Gm-Message-State: AGi0PuaCxuJsUPUSUZgro6msYTFrwJBTVXOlqS802ENCghyng+VqPrVN fAIkjSY+tgqKD+/jVRv44Gw= X-Google-Smtp-Source: APiQypLsgi+IZ59ulfiIG/qK8upSEc2X7G/7ZbOSB2P2RoIWQ5MfPR2KXhibSI2xZN8NS2JrjaNh9g== X-Received: by 2002:a17:90b:3714:: with SMTP id mg20mr5813931pjb.127.1587051848466; Thu, 16 Apr 2020 08:44:08 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:08 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 01/18] security_load_booleans: update return comment Date: Thu, 16 Apr 2020 10:43:35 -0500 Message-Id: <20200416154352.21619-2-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43: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: 11493217 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 C418414B4 for ; Thu, 16 Apr 2020 15:44:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB3BA214AF for ; Thu, 16 Apr 2020 15:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="szMmDe8k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405656AbgDPPoQ (ORCPT ); Thu, 16 Apr 2020 11:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2404563AbgDPPoL (ORCPT ); Thu, 16 Apr 2020 11:44:11 -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 9FD89C061A41 for ; Thu, 16 Apr 2020 08:44:10 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id d24so1485894pll.8 for ; Thu, 16 Apr 2020 08:44: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=J0tpirrIHAr4uXEvJ6/40RQ9XnxiPyilCzlgegHGP6M=; b=szMmDe8kI7h6fO6jBhhc6a/UtqGHSulo6gM8YjlaNH4wLD3sETq227bugLkam5ighI 7EarM7nsELtgWfQmGGkiQqqn8wQoqRffNMBEWx906E+U54YmmRFavGqwCY5HvZCunOCY pmAHGMrxHdjp6FnR4/XBHHFnWv9FI0Cj8Bd16reMtIUzJc2RCBijUxx/K+g/+PDEM5HO ENq1ZB+2eWmOrfO4pYtKXNAtMrCiz1tPXgXpYJs8EQU71MGLBE8PU00K7/ybGa9nG21Y p56l49lYSqEYQ97KepXRdsc1wFfwPeJdFJN33qQ0HD4jToeMUbcjmWUXu3hoPx95S/wu VsBg== 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=J0tpirrIHAr4uXEvJ6/40RQ9XnxiPyilCzlgegHGP6M=; b=bWDG8KoiUfTkTZz4eq6KaxaLMbdTnQPIZ1ZlAGSvfzOMYu50CtuQxgE0ZRi4S0jbey xIx+xpSOE66quv+DfLlzuPQa18/WEHllBsKUV3o7RXb2iLyHhHIZBHu+nd+rn/gXv9jA lYOKvEtXqvekvhEg02oAL81Cb+yc6cj8O+ce4TlMa2nNdYpprZV3EkKuElRfFrF82Qvh 0q9fKJOuyNJaXdWc2IRpqMOte9MIqy7UN5fvTMx5vb5AlZG9LhGKilhREXtNf+DFIs2W HvMSnA/fKxa9FPrSkRkyl1Uges/HlpUqYPXn/f/kSf5rC2YM4BkXqyPnfAR+iBeEneqB dElA== X-Gm-Message-State: AGi0PuaHIm3K/nRE/flPHHxyqnGgvFvikuYhLzu6OOFUKg0uWi1QdXp3 8GC1QWzvNPs3JpeU7EKQ/Xo= X-Google-Smtp-Source: APiQypIh3u2LyNa4GJJQizL0+dxYVdq3fpN4pczOHQAaKbUfAnBhBXp1VC/lIPwuZ9RS0ZhA+duHZQ== X-Received: by 2002:a17:90a:ca8c:: with SMTP id y12mr6022970pjt.195.1587051850172; Thu, 16 Apr 2020 08:44:10 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:09 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 02/18] security_load_booleans: annotate deprecated Date: Thu, 16 Apr 2020 10:43:36 -0500 Message-Id: <20200416154352.21619-3-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 948ca0689a07..38030fa8802e 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -325,7 +325,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 Thu Apr 16 15:43: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: 11493223 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 1132F14B4 for ; Thu, 16 Apr 2020 15:44:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED06420732 for ; Thu, 16 Apr 2020 15:44:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lTWdCtTy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395396AbgDPPoO (ORCPT ); Thu, 16 Apr 2020 11:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2405656AbgDPPoM (ORCPT ); Thu, 16 Apr 2020 11:44:12 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417FFC0610D5 for ; Thu, 16 Apr 2020 08:44:12 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id r14so617689pfg.2 for ; Thu, 16 Apr 2020 08:44: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=2LCHADiUGK83p/IY6cD7pVPCbs2oe3Hvj02tNShqMew=; b=lTWdCtTyo2fdPGaA5j0HEAR0aB0Xn1MyUM6qUzGE0rU9eRtMcP2W3SP7EmdxiqtJgL JgbXTUD3utQ3sZBveJ8hUC/eP4q/fFGECGIL1XPZtG7B+k3mu7ybvtRylZPCf8SN1DVn lJ3TJWwx3XvJD12TIofkS924AGqIXBxYGMAL42kpZGfKgpmxCvrHNY6hBN59chTYQasI d2r3ZlU9rfCJRntINsa56iP6PcHWNDOxXQvt1KloO88H+g03aJy7hRpsKzXkHC4NzkoI IQDENA1jk2amLPwEFELyeGOy3sPWhz9qsGWpWdnnDcNVdk3ZOa5JoWEiBS/aBLCfuUYH VbpA== 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=2LCHADiUGK83p/IY6cD7pVPCbs2oe3Hvj02tNShqMew=; b=rAuMlr7BXA+klLbJejng9UgO3MiJHOys3xU/lV/hRe0UFta/vTBEBV+9ah33QWCUow OdL/09BfT7KqDQxCZaEf/OWlbMJ+26RanHrwLHcWQdBEYbJeUgi9EU1ZfMybIPA6h4hx adUBsiS1GNxsJhK8yEJGdB0rEKpFNfa4zAIkD0bsxArwCgFjATQpUd2DSbOxtbqI1Ce0 FwXGjUEP862344HxIM+CNGivgyG6KRgqVjwOBLeHH8ZRWFihzy0IQCEVbXNFrLXVJmVZ 5eW/Ez4yYJ4J2VY4mRuKEcGlPzHrcM2M3uAcB+fOCAv8DazpeSYTmRqO3irdk79o2u2x ZKnA== X-Gm-Message-State: AGi0PuYaGyNsMh0rjKsXE+2yLuLt7qhf1IZyS4j4uP/Clgwb3G8l+D20 FORnhIhYdAhEfJWceL30j4Q= X-Google-Smtp-Source: APiQypJ+pnEdxVQ+dnMdAQAWGvPtJvQfTYhYd2zDZHtunPBvOWawR29TspIAMMpFt4QdGQJLp5Zv+Q== X-Received: by 2002:a63:6543:: with SMTP id z64mr32701420pgb.260.1587051851747; Thu, 16 Apr 2020 08:44:11 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:11 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 03/18] selinux_booleans_path: annotate deprecated Date: Thu, 16 Apr 2020 10:43:37 -0500 Message-Id: <20200416154352.21619-4-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 38030fa8802e..454d3772ec38 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -575,7 +575,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 Thu Apr 16 15:43:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493219 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 E2D98912 for ; Thu, 16 Apr 2020 15:44:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB18A21927 for ; Thu, 16 Apr 2020 15:44:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c2KFw7d4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410264AbgDPPoU (ORCPT ); Thu, 16 Apr 2020 11:44:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2406131AbgDPPoO (ORCPT ); Thu, 16 Apr 2020 11:44:14 -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 DEED9C061A0C for ; Thu, 16 Apr 2020 08:44:13 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id np9so1557186pjb.4 for ; Thu, 16 Apr 2020 08:44:13 -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=J/XRHfKAVF4HBNq1KhwctA1RFZEdtPwZFyUbWWSe0Nc=; b=c2KFw7d4SQ7XHrArheOlVoGhiDnUBdae3T4A2ka8EeTu08RP5axYr+8nBOJ2fUL7g4 hfhFNVfCHjSheUE2B6OpudRxMQqdZb3+mCyir+ca1AbzWcr9A2Ckj2/AA4VenXES/Yqy IF4KRDbErI7n7FMHKqXJV7++GAEKt1xZUZs8sBwevPRvdgU2CI8rSYkIaH0iISqm4+Jm phDa/z+ic251PlMpuyyvddBgALNVXz+bZtwlhMHjqIcfCXidW1XCqfUlQMiOFuR0jYbx vuc7+Ir1wnWywmtGD8jrLCPcVkADWMGhIWC6Crwf7M5g9v1ZHI0h8gxSz1cTp4I5d/QO 9QmA== 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=J/XRHfKAVF4HBNq1KhwctA1RFZEdtPwZFyUbWWSe0Nc=; b=bitRFmen6oHpzdHA7ZkBLTJnZ37z3VxXwv9xd6UNnyQBSmRVxu9zvGcnFYhd31Vxvd oEK5JWqpKyvCjJw7W3KfUj7IExFhoXK+2XKOEhs35yd3xSdtlrIkszLPTwZGQzLEwwqz fxxDiWvlcslUeo6UhaSCRzs0CoqUOLQBm9K8DOu+V8OM+96X2YwOvFzXdzc6cV5B0Z78 ifwV13WOJtGX/APUnlwASeDpvrTj4CN+PllXBDONPUt4Rsyqgm/vV3MIgk4TnTm+8MxB l+8q0UDoN2M6KnNeIF9oPsuEw8GuDFTJ9KDlqVs+bY2Djj3DjxSi2dM/qfVZDECjRs2F UGmw== X-Gm-Message-State: AGi0PuYR4+LhjpxN7nofrkDeo916NslsBj5AAEL1Qzlnc+30hpC21FAN GTqatD2K0BUmvCjsL2WbkXo= X-Google-Smtp-Source: APiQypI71xMc+fwoJ1dZYnP/O+f7ZKSjMKEsLKG0UMOHTd9LqNQwmdQU93SRh941jGLpO+TCHCXFDQ== X-Received: by 2002:a17:90a:d98e:: with SMTP id d14mr5710738pjv.178.1587051853431; Thu, 16 Apr 2020 08:44:13 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:13 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 04/18] selinux_users_path: annotate deprecated Date: Thu, 16 Apr 2020 10:43:38 -0500 Message-Id: <20200416154352.21619-5-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 454d3772ec38..cf2b81ba3162 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -578,7 +578,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 Thu Apr 16 15:43:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493221 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 99F0D14B4 for ; Thu, 16 Apr 2020 15:44:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8206F214AF for ; Thu, 16 Apr 2020 15:44:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MHn2+5Zd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395447AbgDPPoV (ORCPT ); Thu, 16 Apr 2020 11:44:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2406241AbgDPPoP (ORCPT ); Thu, 16 Apr 2020 11:44:15 -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 8BC86C061A0C for ; Thu, 16 Apr 2020 08:44:15 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id ay1so1498239plb.0 for ; Thu, 16 Apr 2020 08:44:15 -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=Bw9tlQSVaapo0Tpj45xIpZF0qK2BZ6nzqw95EBFXPX0=; b=MHn2+5Zdo2dnPm+gJ36/DYK90So4XLaFzj0Q7rv/MXDh0BEmi9v1BMa2+XcW/sU2Fy 66mZ+t+vtBS2eqIIDJI+6ugxb2pYEhdwEiGG2vEh0IEecNG5A0H+FdiruK4KKrfy3hNm +67iBVReyye0gfpsj98Xq6+FiMOBw2VMyVu/mrX1l/rdTbHuaGwlWyhak9s8EhnHwWU+ m1UcxLsMX7PZ2Z0/lHR6F5xSRMxVAsQIyUM1JIiHm4Tjwwf70MCPUuc5fl5/oDmRYcbv Hd0MxWl9wiMKjcXMeoK97EvJJZdL/jAy0JB6YDIg2OF3lA3GfbHDU3+QnYRF4DLOJfeb raCw== 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=Bw9tlQSVaapo0Tpj45xIpZF0qK2BZ6nzqw95EBFXPX0=; b=TsRrZOvaQaYVUq7DTAM9k0WIdMBQdQbV3oMmakOToU9nK5rJJq5G/uhq2c02TFPyxI +j9+5rDt2AeQd8w5K0nf3/syvoi9c5DtfMhDcCF1Yrlab4ZkhTrPWNd4D1isWTO9UYW1 kXgarifyAKnGdGDyHaLN5oOvvfyaavnvf2p6IcAZAVuI0Lvu3qoDCjIKCJec0TwdZ3zn xXp1wo/i8uoXfrxvaz43Clm4kcrVMEsaIvSCYb7AOLWDblg63p8kLseLRzELClZSQNbu sSW6k4ityThraeMt5ZZ9Vh53iaYy+s27Ci2Js2U6Omec77V5OOo69eaH68tdPTgyvGx/ s/UQ== X-Gm-Message-State: AGi0PuYUHTwT0r/MIRCxLeNyokavwFLZm6M2sq23PBpWWukx8bli1vFO GFO0RZy+6NZc2/K0e1NFggU= X-Google-Smtp-Source: APiQypIJOcmcGmf71M+6V5GmyN/DLibDhRySrjtk44rKarJVW7F0mqEoCsrr9pIhEPTEuCYGug185g== X-Received: by 2002:a17:90a:252f:: with SMTP id j44mr5823493pje.9.1587051855052; Thu, 16 Apr 2020 08:44:15 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:14 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 05/18] rpm_execcon: annotate deprecated Date: Thu, 16 Apr 2020 10:43:39 -0500 Message-Id: <20200416154352.21619-6-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 cf2b81ba3162..0b99850ad23d 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -633,7 +633,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 Thu Apr 16 15:43:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493225 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 8004A912 for ; Thu, 16 Apr 2020 15:44:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E94D20732 for ; Thu, 16 Apr 2020 15:44:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rgr9Hp/O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438976AbgDPPoW (ORCPT ); Thu, 16 Apr 2020 11:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2408887AbgDPPoR (ORCPT ); Thu, 16 Apr 2020 11:44:17 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92B81C061A10 for ; Thu, 16 Apr 2020 08:44:17 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id z6so1481550plk.10 for ; Thu, 16 Apr 2020 08:44:17 -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=l+nIMu7MVaQt819iJF4TNdRJ3FE4M38+ER7rHwSq2KQ=; b=Rgr9Hp/OA+rK7FH/EbnjYtA/Q9vKdEKEw/5ct65Eqqjh2qZq/eX+8v2ZxtpGI5pnKq lDS2NtK0SfDZ1dFmXXc8cp7rLG9CvOojXxPzQq+CU95uLPym0J6nCnviPp91XvJCkQCN xIlWpS+cHripCsrd9dk6VYaLa/BzF3Oub2tMTLTIXesS0YDokRmuJuIyL+IATWoRqeyl SqMF66pzCbJe7DPulCho8cbeSSBu1OS5DRcKVt/0b97mgNKMP9/xi6TGOvIHqJSvUwQU 0DankxyTGizKpMCu4i/OfyKPaass8XiNWaIQ3NvquZTYC1oXkdC0JrUMWNwesnGSR4T9 /Njw== 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=tkG9WgYGJH/tVrXMMfSnm91L9HXDaKsqY8+W6GumPrTAmlO8ts2sZ2hbEdhLGmcJH2 AYzy+khHTCIhh4DIvCZhazJuWSYsdUW/4ngsqPzIrTal2jdnYTHiBi54kzH8wjUCy34w 273+DyvWdaO9QfEPEwV9bVvx5w9R6BII/Ant30rgFFdSqa1JifQb+szaOq1Zmw6or6UB E00yvbHO23n2aS+NVlDKk6EWo39fDT9/BeCCaK1n1SwxrBXc5JkU8WwkBmIk2D0EX33N mO8BQTf3M9dFFWC4B9ZiTC7/3s/AphIRK58XH0hzoSi8K/xL0iOdVAOGLKj8pZDbIj9y XWLA== X-Gm-Message-State: AGi0PuZpFCWRbJBkeOJV/I5zT5yC5V5ajhmIms2wPvwaGlp6Oh74PQdx ifh9f3ODrH48wJ50LXyvZ9k= X-Google-Smtp-Source: APiQypLOrcJJ8edYGd6GWITSSZhgEvMsrHNq461SLbckg9R0/7ic+T0sM3Icr6TSMblr4l6ZvhA5nA== X-Received: by 2002:a17:90a:4a4:: with SMTP id g33mr5723434pjg.81.1587051857045; Thu, 16 Apr 2020 08:44:17 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:16 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 06/18] sidget: annotate deprecated Date: Thu, 16 Apr 2020 10:43:40 -0500 Message-Id: <20200416154352.21619-7-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493229 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 8BA6A912 for ; Thu, 16 Apr 2020 15:44:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F7E0214AF for ; Thu, 16 Apr 2020 15:44:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f285e8BZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404061AbgDPPoW (ORCPT ); Thu, 16 Apr 2020 11:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2409096AbgDPPoT (ORCPT ); Thu, 16 Apr 2020 11:44:19 -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 4B839C061A0C for ; Thu, 16 Apr 2020 08:44:19 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id p8so1814535pgi.5 for ; Thu, 16 Apr 2020 08:44: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=JPfhyaVGjlncBwrhSSr7GTZqxFHYwwKsyDxbfAgBSBg=; b=f285e8BZoW63OSmdI0Tz18BafGLHF+WrLZpr4ZtJBZ82kE/t46Sq1MxMFyhx/msHfV 7mOwR3ccDPGW8K0aj62da+9o0BfsKcwXTE8OihtSIF35kQiiwYzpdzK2h6iNO/6m+i6l HP+K0hCyPe06LP0cNfg1K9XJ9WJ/gsO69MJBor6Ye7l2KPJnVSAfXG5HZ3XecRGDFJFq glGTO39Y18GFFrtA6XPvcSZECnlPO1HdbTupLmI7rEVn3Juw1q2l9zniNLDFDqZtpsLh zcFZfh3EDvDjGDlo7E8+V5MwgDfgHevjL5oVg8CM+l0x6sKYkXTHkQGGmMmFBru2iyZu AL+Q== 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=gcY/rwoy7KJO1aSE6taa04pylBZLFvcGLLG0fenHzmx1+RDOmbkULA7a6H7dpGNA3r ZnUydFTvBNfekZY9tPTNRDX3ktV9aFioTT3TaRvnyo3szE/OkcZOI3Fm9tf5ikeTIyIB rSZsxboIFj94VP1bBWsvYFRwRISCPkn37AWSNrZkoER05+FGzhM1a83TIRtkrjbU2X2p 30qv4z54tewiB7F58e6/Tq/AisZ5xbS5uMjc6fZwoGpEdM28cgtz1Lln7Is7L2peX+gB vAyObz0y8nqnhaNKqgVGfNpPQ6Tqk4WlaTqKt/000+xAOaxQ1xP8WY51cPRVVdxJGQSF Er/Q== X-Gm-Message-State: AGi0PuaoQCuk1rtmlsNwfoWBMRX5pKVKMYtQrsbXpHAq1PA2BDkPzgqt 4kO5dIewAButpA+wvs/z5EM= X-Google-Smtp-Source: APiQypLwdM8m0aqoOGos51FXsjIXyiGyscgEPUXSJK7E+SsWrQScdB6cmlvE7lQW6PXvmfRvTtrPFQ== X-Received: by 2002:a63:e749:: with SMTP id j9mr31412493pgk.319.1587051858817; Thu, 16 Apr 2020 08:44:18 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:18 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 07/18] sidput: annotate deprecated Date: Thu, 16 Apr 2020 10:43:41 -0500 Message-Id: <20200416154352.21619-8-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493227 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 D1CEA14B4 for ; Thu, 16 Apr 2020 15:44:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B845D20732 for ; Thu, 16 Apr 2020 15:44:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZCH/URW+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408887AbgDPPoZ (ORCPT ); Thu, 16 Apr 2020 11:44:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2437796AbgDPPoV (ORCPT ); Thu, 16 Apr 2020 11:44:21 -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 063E5C061A0C for ; Thu, 16 Apr 2020 08:44:21 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id t11so1823386pgg.2 for ; Thu, 16 Apr 2020 08:44: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=udMYv4KCCPv1msDPSSZX+YXwuWEwFbaHQfw+epucwgs=; b=ZCH/URW+9Y4BxJna5er0cXu/lAygyAFkAjTIXcokdZ5Vt8WFc4BO98pKwBptnKjbHT Kn3tXSnrFK9ahp0PyxV3QaR3OvcczW4fG9MbtszHe0ZjBkJIBqphHvPBBaiP8p0NEbCK MX8CJbf953M6lLmvrY1ylFJ5jLK6Q4dV/RyfFrcbYEbnWgb2f/03Ke0toaZDmB8Yt1vr C/iYvXf6lit/e/fS+0S0IP2WauD0iA9xuqGZemy50E9B7R8za38J7uLoda6cFsla9X3V Sr5tR/ogVe7Fwrw+JyK/CTv0MMpt4No0rFcvY/KWqn7xEct9s9DUHvysjc4Nkndx4nJ/ iejA== 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=udMYv4KCCPv1msDPSSZX+YXwuWEwFbaHQfw+epucwgs=; b=Yl+Yyk4KCzMAughOjlLhIyGB4+LW+jFZeWABSwtzU96ZLnd9nUSwSzKfubz605x+Tp v+NcFcqtOryWN3oGSuSgwYtWYkOezGX/WU0mOSHKGN8RGwmK/3laIWl6U7R+TGol5QCg fSb1RribWpfplYCjdMQ6WmkZr+/tmlJrIvV+u6Q1lCZA1w9F78xsMMPbF4IVGsCeAOEz hTVaoth5ThPi14mTRlxECgKZ24KSAQ/LXITmccmapDoWKT6XgsEYbZBnZ42Qz0BWdLq9 7AQ6FztCrQX02tdfqnlf3WGImxsUNV1xPexYmV6eF/Gyaw5Lu2zJF3bLm69ktw49c4sn R6ug== X-Gm-Message-State: AGi0Pub2cbBtw4aqxeHlITfQqpIYfi+w3LHlscbj36cf770A6kJbYuqI 3DEKEMO2EVkCARS+NQ10kB0NfVXEUEM= X-Google-Smtp-Source: APiQypIKpaSfHBP/C5DyvacwIdZAf+PwI/Zo6Y6Mu3QcTyvgBaykhka5A2aO44/4Tl6UbFGtTznspg== X-Received: by 2002:a63:545:: with SMTP id 66mr24304423pgf.66.1587051860517; Thu, 16 Apr 2020 08:44:20 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:20 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 08/18] checkPasswdAccess: annotate deprecated Date: Thu, 16 Apr 2020 10:43:42 -0500 Message-Id: <20200416154352.21619-9-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 0b99850ad23d..2767daff17e7 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -607,7 +607,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_access"))); /* Check if the tty_context is defined as a securetty Return 0 if secure, < 0 otherwise. */ From patchwork Thu Apr 16 15:43:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493233 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 0B4ED186E for ; Thu, 16 Apr 2020 15:44:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7F7A214AF for ; Thu, 16 Apr 2020 15:44:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vFQwGpZZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437796AbgDPPo1 (ORCPT ); Thu, 16 Apr 2020 11:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2395459AbgDPPoW (ORCPT ); Thu, 16 Apr 2020 11:44:22 -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 AB52AC061A0C for ; Thu, 16 Apr 2020 08:44:22 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id r4so1820267pgg.4 for ; Thu, 16 Apr 2020 08:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8dX+4yVeqg7kaZfVDMKnr/lDPx5yPCOAjwr6+7Pg0fk=; b=vFQwGpZZUXQ3Ib7JySu6nIDYDmIpfiGvTf6095N9F5vk1AIbIXFgMbMctNoG3q3kcC bSFviQv0VczLLvx2ZajMd4YJfh+05vBPdHeA6GYso9yXyiB3CMQ6rJtsYtIF0kiYZk7E BUdR1i99yLXQcvASpwVWuWJiKUyNOy6M0eoOw9nn/SXHGA570GINSFzaskZUTnn6lNwp awTRInVjTHdJY0n3Yh4YoQZToJ6F8TUXNYVNvnfs7RyiMcaObpdfdVKKSNsgk6zTE3gs 17rUC8xIPRwH5W8/hpeUjaLfQc1glCdWcQo4djsgjtm/DuQfohk56Qid++BUqBhVS6O7 R5zQ== 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=8dX+4yVeqg7kaZfVDMKnr/lDPx5yPCOAjwr6+7Pg0fk=; b=MpB8It+/eLD2Cc0ZJfQeZ9RbRPrJ6f7WuZ9wrAd445yJX4Ea7ok28JKYhY7vJ5NbdO nFFa095OWlocALKC/iAbqxV5zAPhsFRaTI33DvTfGdXu5JxXI1dORss7DB/Nu/d07vZK +R+1wnqm/tCdTC+Lf1jXY856iXmzm5fvHkH/QWJ+7p0HPv20GViLkteQZAgS0MyofuLw coWeApp87F9fv06bFzUzFR6sZ/rJSpv7VQ/HadBJ+vsXplWTDJiyEkBdJhgV5dxd2FSM V5e0weLk+R/ggCNqw9flTdDBELyWSuD+fmEQJELn2vuVTX/6yPHPstNwCgAFu4A3ospb /gKg== X-Gm-Message-State: AGi0PuajAJNOv18N/Sj+qlhApLWRVjeNEwTyFyGGcUMvLm/OfzBXC3eu YBJBXS/H0y8KxC7rcMrokQvuaKkHGdE= X-Google-Smtp-Source: APiQypKW8Je8KnCtONMiB6izB3p33b1y38Hmj6zokTp5ZN8PY8jnT5JeeYaUFxIGZFhi6t5PKDE3uQ== X-Received: by 2002:a63:da47:: with SMTP id l7mr33683691pgj.315.1587051862178; Thu, 16 Apr 2020 08:44:22 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:21 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 09/18] matchpathcon_init: annotate deprecated Date: Thu, 16 Apr 2020 10:43:43 -0500 Message-Id: <20200416154352.21619-10-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 2767daff17e7..9e209d2ab75e 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -461,7 +461,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 Thu Apr 16 15:43:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493231 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 25823912 for ; Thu, 16 Apr 2020 15:44:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E425214AF for ; Thu, 16 Apr 2020 15:44:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WQwu1jqO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410294AbgDPPo0 (ORCPT ); Thu, 16 Apr 2020 11:44:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2406241AbgDPPoY (ORCPT ); Thu, 16 Apr 2020 11:44:24 -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 60CC1C061A10 for ; Thu, 16 Apr 2020 08:44:24 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d1so1850146pfh.1 for ; Thu, 16 Apr 2020 08:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0wJPvLBd1mr4QlWMA46+l3SN0G/g2cbCdq9C8VJcbe4=; b=WQwu1jqOGhhaSvcMUts1O1a26/8k75RevAV9bYJLum9bNy82vrN8BttCqNKXVD6z1a MMNLjf2O++8Vx36mKX6GVFM+74bzWbfUGOMftEqXSn1sVxUPtHnH1mZFs7pBAQ8c4QW4 Wj8PWd7LfSOdejHu61LnrDZSwjZ3T+Mq+WCE23ICcUAHucl0Ci0BHXbQbg0GWsLUMjQL pAhH1NBN4rCAy/1fB9U6IGlwLLdhXHWaCtrresClsCrwCZCNvqjqlgf7LpfSDHxYUJfw XcXAsDi7kpHYsOThB5GHcxLj8NL9dz8pmZXLqDuqggxpGRev7tPiggqxmaRD4JoFozI1 oRzQ== 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=0wJPvLBd1mr4QlWMA46+l3SN0G/g2cbCdq9C8VJcbe4=; b=HXT1eDbLtCGZZTB8zO31aqLY8Lmg8E7aw/0L8XIgnb44ON9tGplefKBqfTR/LBZlmm oq3e4KIvjSel40smKv06toYn8v2NjyQCn6EHCzckmIs96IIwEAm69NtI4AVC7luIteSv g8+N614jrv/nkiOpjYhjQZAEFugMKsARyI/KGn9Z8pmxqxEx3qyO5uXLEFt5Q6qSc/4g FFc6GaTFtcmV/XRP+Xtx2G708+09mgqy3SqZMGu2l1LozHQUi3BTGTVgsawtWl8fX524 mMqf92Kbq7LzbsEgrGYUe0ZS6Zu9p8vb1HClPkdOVmhktYjJ4FDWdVMyRAwgx/elOSaI BklA== X-Gm-Message-State: AGi0PubfdV77BIWNtPenQ0d5UU3v4mkXAKAfWaCrqjCKNevidFErIauh I1eyb+19khsdXP2/jc/6qaM= X-Google-Smtp-Source: APiQypIDEY4ZeyJsOUcGvlTfxWEQKOutKFYstskjjhmhorbIeudzQ18VIYNuXy/8/C25WWrKArKshg== X-Received: by 2002:a62:fc02:: with SMTP id e2mr6746225pfh.195.1587051863885; Thu, 16 Apr 2020 08:44:23 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:23 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 10/18] matchpathcon_fini: annotate deprecated Date: Thu, 16 Apr 2020 10:43:44 -0500 Message-Id: <20200416154352.21619-11-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 9e209d2ab75e..96a071a8dea4 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -469,7 +469,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 Thu Apr 16 15:43:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493235 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 CA2EC912 for ; Thu, 16 Apr 2020 15:44:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1CD5214AF for ; Thu, 16 Apr 2020 15:44:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UQuGgJ+Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395482AbgDPPob (ORCPT ); Thu, 16 Apr 2020 11:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2409096AbgDPPo0 (ORCPT ); Thu, 16 Apr 2020 11:44:26 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0413CC061A41 for ; Thu, 16 Apr 2020 08:44:26 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id a22so1522091pjk.5 for ; Thu, 16 Apr 2020 08:44: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=Pkf6RDUcM+U9vRmkqya6tgtwe70FQLzaa9VRXRP+Hrs=; b=UQuGgJ+YjXIdwtdKSnfEQshp5BdM7TjNFr5WLe1lYeYzLaXYGrnGp0WV8XrEpIalgi sCpQblFp8njZFRWz69eDdFxYlKw5ZCX99jhvrlJ4IPeINHXoXHRV7eaR6OEZ8V9OnCF3 wLDW5BaK5mAd46ZDVPGIpX4rAdi/CIs6eI2i/YuJYjvhIYTzfEvYVOfC5hpaEfnANu6r yp7GSxwrH/8MXEfr5ffemIaRvtzaPDFhyuxqLtA2X+3/4meo6nZoQUxkDv4mk0u/mt0U ft+IEmhcyDRSGTLNMGZs/nyRHjLuDcfmijS8+Wa3pkrue1ukTaDNPR/+x6aUxoievM/C XsOQ== 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=Pkf6RDUcM+U9vRmkqya6tgtwe70FQLzaa9VRXRP+Hrs=; b=XRhaXR1SY4iNDRqUTbKBikmdUtbZj/0YC7wPyv6x+7kusosSV0Fh8LoXmADXHK1LH+ rXuqjdjNWelRkcIK1VRCmIfJM9FFPJGy2ZHsBYPTszYnVQAe7INHkSMAMl04nPj0f64P K0LBw1gOPmvr/tGeNSSAW61gAlxl2Qt8VyUsZn52bZNxPg0rY6gsP7RnOx+IdGLD9PgB vpL3MCM3knK9uOv2FKH3Axo6cOggD8x9/XxKooz3YBEdgwCLUQYS4DkzwlK1Qor65akb 2W2YoBuT6zpJ15Q0ROYaKA7jVH5K53J8+MKW7P8vTi2Qa1yQARsZwBrIMRtlnqFbzljE p94Q== X-Gm-Message-State: AGi0PuYAKyH4SyeNwH5bxXKhKSO7ce1vWeG7r4nkRaXoT89ZOiz1VmE7 Q2emsAu5Z3y5NhUbfK5xiS0= X-Google-Smtp-Source: APiQypLkb42Dg6zL821BfypdqqBw7fuvl4X7iTPt9CnslYN9R4ETs/ayWmIFz+U4QQO+kSAmnRUhXQ== X-Received: by 2002:a17:90b:4d0b:: with SMTP id mw11mr5957557pjb.45.1587051865467; Thu, 16 Apr 2020 08:44:25 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:25 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 11/18] matchpathcon: annotate deprecated Date: Thu, 16 Apr 2020 10:43:45 -0500 Message-Id: <20200416154352.21619-12-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 96a071a8dea4..5a66fa6f9d78 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -484,7 +484,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 Thu Apr 16 15:43:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493237 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 A0EDB81 for ; Thu, 16 Apr 2020 15:44:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83FC5214AF for ; Thu, 16 Apr 2020 15:44:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cwaeEWAK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395495AbgDPPoc (ORCPT ); Thu, 16 Apr 2020 11:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2439129AbgDPPo1 (ORCPT ); Thu, 16 Apr 2020 11:44:27 -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 89BF0C061A0C for ; Thu, 16 Apr 2020 08:44:27 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id z9so1531835pjd.2 for ; Thu, 16 Apr 2020 08:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iYDpnOO9HSE5if04ORcNe1FlF4m09kM1ja7Zo3O70HM=; b=cwaeEWAKArGMuxWNO6McrB6tOdXImAT+AxuipY5tlfkSTetEjRiIk9GlNAHa63MVwD HrZwHVkVWUEG2SG/vh2IZCuWteV6fp8XbDD9U18gTlkEdOnkFOzaNkqpQiE6onCMdJGa NtTH38GQRwteB+Mm0oRMsBh5CPG/D8HSw5F+iMJPeCDFvTvR4zSrF6doI8aNdgkVzB13 qsM/v0vYerkflmu6SXWWRgygrcwyfRTuE4/V1rGEzeknJElsJS4kYwXgWtzAnIbhRqHE x+5qoKakiDV4Ay09dMIppweOXaSURZ5SGw4TCG6/HGze080hR3wK9qKKXtiEcpY1R6vZ fzlA== 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=PRt+ajYVYaIrUcgeHXH2+fiUfa5NwGEVcw9+SfP5TiheGvTo9K2zkx/WQ0OyqfipRb uxJlMtyZwnzKUabp/G6idF1uIRSYFAMEiiXEUkJLncbPBSNHH5HVGzHFC/yselPvguqi o5baazz7lTD+N1usl57V5/gvQz4OWmCOsKwt6yHE2JhQW97BpVymhJ5lL6PvXFOGgqnQ mp2k1mb8uHmXIr1IHCkliN7wIdmHPGNS+7UIuee3vPJEuq5G+i0nZongfMIqlgF2kX61 /A0thHi9+Z1ARTDXH2ogrJYVRchFOCfSgGfFMuk6X5elsuX4of+BR8Q3EMjQLYoMQ1Y5 0eZQ== X-Gm-Message-State: AGi0PuYxoe6ee6wobKKvPTNennAwfyLnnK/87CbI4qqnwr7rUEVz80sM Sqf4+ywugT/ccbVlmeZeQ5Q= X-Google-Smtp-Source: APiQypJHzPOmB0dlEaUpgCBXWMFQ2ed3SH4aqE/woMLllIkc74+1udEDbHwQFmwYBIrhE0LW75VASQ== X-Received: by 2002:a17:90a:d3d1:: with SMTP id d17mr5777045pjw.191.1587051867090; Thu, 16 Apr 2020 08:44:27 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:26 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 12/18] avc_init: annotate deprecated Date: Thu, 16 Apr 2020 10:43:46 -0500 Message-Id: <20200416154352.21619-13-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493239 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 11CDF186E for ; Thu, 16 Apr 2020 15:44:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC14D214AF for ; Thu, 16 Apr 2020 15:44:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JMPnGoCZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439129AbgDPPoc (ORCPT ); Thu, 16 Apr 2020 11:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2395459AbgDPPo3 (ORCPT ); Thu, 16 Apr 2020 11:44:29 -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 33EE0C061A0C for ; Thu, 16 Apr 2020 08:44:29 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id a22so1522160pjk.5 for ; Thu, 16 Apr 2020 08:44:29 -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=JMPnGoCZhXdBPbg2cCPSGr3RwoqBYff1a0jAeGVJnM4yIcqzrbRLtu33rTMSwGHEBm UEoazlnetHUGrPkRPGcv/iiMLUiAHW7b+wUQDFPZzHm2ZsSjkJpM3D7zYQL8XNfKtsG0 fSUYftw/5L/j6NZL0EjkOQ6WO9bH6fHALtbV3fdpYN9prB6IYdKEaXStSzRsX/UydPHu AqguFkX0nheagoYImi7RchSj5zhFvA1keGmmu4YU4OKo9y5t/C3ZCuniRr8BYSvyysH2 HHXvmQJmix++AwoBlW+zCXDiFOSU989Z8rvy3GdMSkpzNLpqSgrRvPahwgdWPwFsU8R9 vugQ== 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=UXBUbNlN6FROZGFnDSjApWooqAuyNNbPU9ihL3H0yy/g2fzuoDwUR2ef6P3LaBivTC M0dUxWvDqZOjXhc9N+dHlRDbwozzQtiQR3ud9CuHR+YcxhDjMZVtJgPtwqRAIra2+IMH LH7iSIEd1viBWk/1Ta2fmJLT8RqPrKIivfc9nju/coAXv1pFQQ+Uol1kL145GCPqc43U Ogc/PehwgjDBA0gq5kitmOGxUT1Rj/9HHE+kBVZpKVlycXBfaROmRauRccARSO8gclJ9 1NxVVKbOVmBYYmLSHeyH3CKTQs7tg4pyM7w25RutdJ/z50swRoVwt9nMtUAnOu+kS+gD aGBg== X-Gm-Message-State: AGi0PuZdHGlQ1vnJQxLuW21O8FRPdlZY7g67IKM1OpiWZyMpITB8qUEd VSKFBrsjlOC7j4wSxL7MoOI= X-Google-Smtp-Source: APiQypKMhCluJ2u5d+ouagaDuzJDowPRJU7Ag1m8Nmk2Eg2RIEZnCL8IUEkIKbol7bS0OcfFlV6G1w== X-Received: by 2002:a17:90a:a796:: with SMTP id f22mr5877840pjq.134.1587051868663; Thu, 16 Apr 2020 08:44:28 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:28 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 13/18] avc: create internal avc_init interface Date: Thu, 16 Apr 2020 10:43:47 -0500 Message-Id: <20200416154352.21619-14-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493241 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 2A4DC912 for ; Thu, 16 Apr 2020 15:44:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D00A214AF for ; Thu, 16 Apr 2020 15:44:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uCQ2t5Fm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395459AbgDPPod (ORCPT ); Thu, 16 Apr 2020 11:44:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2442475AbgDPPob (ORCPT ); Thu, 16 Apr 2020 11:44:31 -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 BC08EC061A10 for ; Thu, 16 Apr 2020 08:44:30 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id i3so1830780pgk.1 for ; Thu, 16 Apr 2020 08:44:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U1To/FE2fo06GVscvLcra+k1YFjbs4QDa36op6rS+9Q=; b=uCQ2t5Fmg/2qCCETh/D2qdMGRo701M67dH+hPyNE0LtLgzt13QLRd7dQaXlRBctstd hQQ58BfEU59yGxH9c+B2YoM0vYoNw56r3EpGvqzNHfMsPe3LHSl/LpylxZtjS8do403X 1/+pzFvy/pioKbSrg6raKXPclPMJ48H/WpdeLjyPmq+6maNg9fckINn4DIqjI/mg2+NC U/Y2PDwMvwWKf5PmRTJ05PODYNbBkZZ1mOodldvDSROWf2v6Hl8UKPEMzqA3u1+Eq61V AATOlI/ysVW06TXcxt46ItYrq9l9sfqDZsiX1lhUPG97L534m31yvLgtsw1xn7oZkII6 vOLg== 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=G4lQXsvYdRPsNXVVIUKMa3SbgbYBvoje3cP5yNg6EKAU1122izH5/ANIL7Tjv5T8nK DWFj5puMswhrLdyNCC6E7xSd1ijWO7iy6XWpAdEggtbhKk2/bPM8DNQPJrdqSA8AE/Ue Bdr4GgdUwnIo1J2ipG4KBLZvqGB0dlBM2zqRV5DxM9AZlMyXA5gmjnFtH1yKGju5PiUs Np0bT3z9G/7pClds5WUpQ5d78x0Zc0J6MpO8IvnnaWgCxCiG+05TFL811QnBizk9KhSB 9HtesZuOikFVOSPKVi15CsO0FsE8hqSYc7k03PdryGMVVVMVjJ5M4Tkqh3Et2aTdFQo0 xZ4A== X-Gm-Message-State: AGi0PuaD8Ssdg108rGFYns8q1s9cox4TQIbVu8ztqU09tf2mE9iaXq+j 9pZInzCv3nVkc+TWMqBr68w= X-Google-Smtp-Source: APiQypJO7qFaWgNce6zeOx/bQnSLcuLGLVzvqfUJVy0ofRvBoAIFL8GBzpwR7xgq3XgwYktAMQbxHQ== X-Received: by 2002:a65:498f:: with SMTP id r15mr23544492pgs.345.1587051870251; Thu, 16 Apr 2020 08:44:30 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:29 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 14/18] matchpathcon: create internal matchpathcon_fini interface Date: Thu, 16 Apr 2020 10:43:48 -0500 Message-Id: <20200416154352.21619-15-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493243 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 9B46981 for ; Thu, 16 Apr 2020 15:44:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C5F020732 for ; Thu, 16 Apr 2020 15:44:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jwkCsiUl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406241AbgDPPof (ORCPT ); Thu, 16 Apr 2020 11:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2442510AbgDPPoc (ORCPT ); Thu, 16 Apr 2020 11:44:32 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1FDCC061A0C for ; Thu, 16 Apr 2020 08:44:32 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id a22so1522216pjk.5 for ; Thu, 16 Apr 2020 08:44:32 -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=jwkCsiUlganqK8GCKG+pL9/jRBE6K1xbyHxTlyMK27hhx+3PCtBgayKEMufmTuPF1q XtDIL/RZK/yrb7HRG5h/LUwO/lEInIzLvtNM0IAID4LYKM7kqblYY1KWSngs9Vo7jJhL lO4TKvCSO2yTRi1J1toesy0+JW4/u4pPmxIOlAfdJxmfzxCEbEuHHBAaIZ3bzf+PmdC2 dbxY0HBhtPv33GZBNTP4fQ05wXWrFc+Aa0KabqaKH2l0WeOftJpJtuEIyEFfItA72vD0 i3tMeIWSZgKbUq4nsM3NtQUosxRPK5U5E+i94FpL4j069bpzJYluNYa2wZ0QlumtvPLF MuFw== 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=Aa5DOPPATYzSCi+TKJMpelJCELU5jIF42T5MmkEdwtNDwRTZmwdMl+HQ7j/bUnVzWe ScOhxeHWkc97k1akDDjDe7GbnNq1SoaCiDdr4cUsBpJWrGVwUcqyIdljJv0xBaKUDCQz lz19xz29UhQKeyPx1xEt324IpI/c9qOfoNMJbOhXz7ySgWa3SvvsxNwNUC6TAK4QeOX8 70XZAyUYC5R5bR/TvM05zhAbASYwjkVq/o7o1J7GiZcDjYJfKPrUSruDV9D//OjjU45y e0FVoqH9b43aQnS52JaMsIN2hfruY+6Tv/h+1s2QW6PMxPofTs48gychiNKztBqSxqYn xwDA== X-Gm-Message-State: AGi0PubuKP1S15+5hAzdohapMprmXiKQiqgdBAASRXdJPl256FgFg9jL UU7loFAEPspI2UMm8cmsDdxAmE+t1Hs= X-Google-Smtp-Source: APiQypJSHAodTtdRDwSAGialKRZmTOBVJDFbtlvvag+pFRUl4GWOU7O7bdgP3EHEBF5+H3goqFsnwg== X-Received: by 2002:a17:90b:190c:: with SMTP id mp12mr6014816pjb.109.1587051871825; Thu, 16 Apr 2020 08:44:31 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:31 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 15/18] matchpathcon: create internal matchpathcon interface Date: Thu, 16 Apr 2020 10:43:49 -0500 Message-Id: <20200416154352.21619-16-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Thu Apr 16 15:43:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493245 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 C2A1F186E for ; Thu, 16 Apr 2020 15:44:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3A5320732 for ; Thu, 16 Apr 2020 15:44:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="k8P15Nll" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442475AbgDPPog (ORCPT ); Thu, 16 Apr 2020 11:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2395504AbgDPPoe (ORCPT ); Thu, 16 Apr 2020 11:44:34 -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 24822C061A0C for ; Thu, 16 Apr 2020 08:44:34 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id b8so1827209pfp.8 for ; Thu, 16 Apr 2020 08:44:34 -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=dIncQSwCNx/aPdpe4r94CQyn+890WYtRiOUFVSN6ZnU=; b=k8P15NllPGZVtnvdmyfUgMOmu4mZCfh/Y3yyJCTO7RQuAI1f6N9gtgVcQptGmD/eY8 LAzBjMTG8Rayx3S/3LF7LC2yNYgVsSK8/W9BhMQJl83ZXVw8G27qEK4iq6DsQQLVPOYj N4/V9Bjb27wJ21P6Hs83cXaMlDj52XktykQcqNfxGXKpV3cuLKYqjJpeW9uY7j4Q/Jlw mp/kasqXraMvvyF4RoMUBeNpVdIMUrn07dmxBBWZrTTE1zCwXO+7UU2DbELGEuQ4eVOO jsKFPPmuBeqzM1Ks2Aj0sj3No0RXBJg/b39pf26D9mlAhCK5dnqIkGPQCZs3QlRFbCJV Xf4A== 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=dIncQSwCNx/aPdpe4r94CQyn+890WYtRiOUFVSN6ZnU=; b=F5QhOVZmSrrFvedQVONc4OmqJSvcHWdzZqwZ8FgyXVWdU7MnBMiIeu3+yEyRp4m/8y IIjvxXGPQ2/VbaOE1U4+OW/YUzrX7LPAQ+Xex3AFavsy95m4tUXiCpwpo9KajGZmbLyP NMX5iBo4/7VLovcFCa9GxqjqR+BO97qS8pwWFEodXBEvaC7XaI9lwEASVW/mpwlzMQR7 aS5lH4q12/0xl7nrzqyi1M5YYsBbZfF0hUm27cYCS4KxGXEXw66/6WJ2u7BkGgc3lZ6p 8PaeCu4SenfnkhmBtSfmehk2AcqDtOfwIaWSZCzivGTfvI9mz8LefWfBqAQH68PqV79+ i5zA== X-Gm-Message-State: AGi0PuZ44VB+nUXsZY/vPDWUjrWZv42T8mEc6B0i/FbsT0IktFeBOdgs WSY25nK50BNknPtHgypx1YI= X-Google-Smtp-Source: APiQypLvx6hsyPKwUQI9hVNmrS/kEsPt4S/bFuW3TivE7FmB9TnhqHO3RDGoFtOw9cHw6JuwtXEBlA== X-Received: by 2002:a63:ea4e:: with SMTP id l14mr32030238pgk.431.1587051873637; Thu, 16 Apr 2020 08:44:33 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:33 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 16/18] selinux_check_passwd_access: annotate deprecated Date: Thu, 16 Apr 2020 10:43:50 -0500 Message-Id: <20200416154352.21619-17-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 | 4 +++- libselinux/src/checkAccess.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h index 5a66fa6f9d78..b8d011fa07a7 100644 --- a/libselinux/include/selinux/selinux.h +++ b/libselinux/include/selinux/selinux.h @@ -609,7 +609,9 @@ 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) + __attribute__ ((deprecated("Use selinux_check_access"))); + extern int checkPasswdAccess(access_vector_t requested) __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 Thu Apr 16 15:43:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493249 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 3D9DB186E for ; Thu, 16 Apr 2020 15:44:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23DB3214AF for ; Thu, 16 Apr 2020 15:44:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sJl8yAag" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395504AbgDPPoj (ORCPT ); Thu, 16 Apr 2020 11:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2442510AbgDPPog (ORCPT ); Thu, 16 Apr 2020 11:44:36 -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 C81CFC061A0C for ; Thu, 16 Apr 2020 08:44:35 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id c138so1852312pfc.0 for ; Thu, 16 Apr 2020 08:44:35 -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=6g4lTpDJfVXb819MiCId1J60ZYOsQkaUzZp2uDWfNMA=; b=sJl8yAagBYU+K8Nf3LrprOYxUYCs6NAAenRQT8rDoKSPWmMTbcegrWMPO2jjNiyzpI 4HxXgGCk/0fhSo7wBGjXWCBplXWwNDZ4YNav5q8Dwis+jmyz7Bu4qp8uAY/aF7I+k0lG 82cSjozzGE2wxL7s+2CPkUXrQfoTGM+UjDfE3o0Xbk50tLgqWQw7BoQ338gzREstmytB evzjYXYhrciw4qdnzauMtKunXom1wK09JlP+7/VvHVYQJkrCN+15e62Ih6R80vJE4llW fP94xr15nLQaF3O2/QV/wHsTgCiwtK5llCXt+plWgh1lK5S5iYKDtfC8i1dyqycyfplw E9Zg== 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=6g4lTpDJfVXb819MiCId1J60ZYOsQkaUzZp2uDWfNMA=; b=A1Oc8B0gqLTSk43t1dSvCeJ5S6Z3sWcE9mGiNH1Qj9dH8tIz/Obbb8gyzA1BRk55mg PN26iCowdrXrP4EQ2EEjnRVkJYEIshZntIYCLXXhcw3woqVSScd6D8yFuaun+Rucpj7e 5pvFXOUOZljEUbM4nthdXsIsIRoBKcaH5Fc9e2uIK7ehQYlWZ/gaKoHhml+5DoNzw/Rg uXfYbwCQloUQSpyN5HY9iAJ70MsAl4ukns4iuIyk3IROcTrYQ3XdZ1+oIPjCdTr7qgSD b4nGxUSMBTOHzXS8QRvCfmZDvDZdEjsNF3mSpovClfK7Kk6+GVriLa3sgwhc2mTLqf9s 5mVA== X-Gm-Message-State: AGi0PuY9NGTwtLgdEplAtPXnk2fmNgL2WGN668FcqwDB7sca4wBayFx9 Zl2kyTGJty10glyioLHlgQM= X-Google-Smtp-Source: APiQypIjh0MFrXKDmfdrCPQvfAiFFdU93RnF3eYTy5AMVEi3le9L3F2QIao2w3rvQ5OQEXLZyzMKIw== X-Received: by 2002:aa7:9515:: with SMTP id b21mr12245582pfp.226.1587051875271; Thu, 16 Apr 2020 08:44:35 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:34 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 17/18] utils: matchpathcon to use interal interfaces Date: Thu, 16 Apr 2020 10:43:51 -0500 Message-Id: <20200416154352.21619-18-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 Not that the matchpathcon library interfaces are deprecated, matchpathcon needs to use the 2 variants and statically link. Signed-off-by: William Roberts --- libselinux/src/matchpathcon.c | 6 +++++- libselinux/src/matchpathcon_internal.h | 2 ++ libselinux/utils/Makefile | 6 ++++++ libselinux/utils/matchpathcon.c | 9 ++++++--- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c index 88539e627f5d..d71e792c3f8e 100644 --- a/libselinux/src/matchpathcon.c +++ b/libselinux/src/matchpathcon.c @@ -352,10 +352,14 @@ int matchpathcon_init_prefix(const char *path, const char *subset) return hnd ? 0 : -1; } +int matchpathcon_init2(const char *path) +{ + return matchpathcon_init_prefix(path, NULL); +} int matchpathcon_init(const char *path) { - return matchpathcon_init_prefix(path, NULL); + return matchpathcon_init2(path); } void matchpathcon_fini2(void) diff --git a/libselinux/src/matchpathcon_internal.h b/libselinux/src/matchpathcon_internal.h index c63bcecfec89..73f0c78fc9d0 100644 --- a/libselinux/src/matchpathcon_internal.h +++ b/libselinux/src/matchpathcon_internal.h @@ -1,6 +1,8 @@ #ifndef SRC_MATCHPATHCON_INTERNAL_H_ #define SRC_MATCHPATHCON_INTERNAL_H_ +int matchpathcon_init2(const char *path); + void matchpathcon_fini2(void); int matchpathcon2(const char *path, mode_t mode, char ** con); diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile index a5632b7c38ec..5f16ab957610 100644 --- a/libselinux/utils/Makefile +++ b/libselinux/utils/Makefile @@ -58,6 +58,12 @@ sefcontext_compile: LDLIBS += $(PCRE_LDLIBS) ../src/libselinux.a -lsepol sefcontext_compile: sefcontext_compile.o ../src/regex.o +matchpathcon: LDLIBS += $(PCRE_LDLIBS) ../src/libselinux.a + +matchpathcon: CFLAGS += -I../src + +matchpathcon: matchpathcon.o ../src/regex.o + all: $(TARGETS) install: all diff --git a/libselinux/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c index eb39a1881066..3d94af365071 100644 --- a/libselinux/utils/matchpathcon.c +++ b/libselinux/utils/matchpathcon.c @@ -11,6 +11,9 @@ #include #include +#include "matchpathcon_internal.h" + + static __attribute__ ((__noreturn__)) void usage(const char *progname) { fprintf(stderr, @@ -22,7 +25,7 @@ static __attribute__ ((__noreturn__)) void usage(const char *progname) static int printmatchpathcon(const char *path, int header, int mode) { char *buf; - int rc = matchpathcon(path, mode, &buf); + int rc = matchpathcon2(path, mode, &buf); if (rc < 0) { if (errno == ENOENT) { buf = strdup("<>"); @@ -103,7 +106,7 @@ int main(int argc, char **argv) exit(1); } init = 1; - if (matchpathcon_init(optarg)) { + if (matchpathcon_init2(optarg)) { fprintf(stderr, "Error while processing %s: %s\n", optarg, @@ -195,6 +198,6 @@ int main(int argc, char **argv) error |= printmatchpathcon(path, header, mode); } } - matchpathcon_fini(); + matchpathcon_fini2(); return error; } From patchwork Thu Apr 16 15:43:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Roberts X-Patchwork-Id: 11493247 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 CC6CF81 for ; Thu, 16 Apr 2020 15:44:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3D9420732 for ; Thu, 16 Apr 2020 15:44:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QD0DRzHI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410348AbgDPPoi (ORCPT ); Thu, 16 Apr 2020 11:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2395504AbgDPPoh (ORCPT ); Thu, 16 Apr 2020 11:44:37 -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 6BDBCC061A10 for ; Thu, 16 Apr 2020 08:44:37 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id d17so1830578pgo.0 for ; Thu, 16 Apr 2020 08:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zinydhZTS7ZFQXHDqJakUjvKtN1SGrUoEJDQesMA15w=; b=QD0DRzHIBcHE7omT5f6kNF3zGfQIOuqpd7Z9gXnK/zTyjudBFukP3EfgatWhWuNqFx L9H3Qy4eCj0jHW3RdGvLeCkukZfwLzJ0aZZaDIrAufhYKEIvd3cbu3I8Q/6UShkn5cJK hkjEz3ObQ3yxuhrDJCvkN4o9vnD4EJjaOQPOCAskjJ8zcW5VlhPK9aVMwCxok2wVpTLK LjV0XQbny2B8BKzD3cGLfmQid3m3ElbEY4GhT24Gdlbrp1pGXAVmXL8HIOPoDX0FdC10 M52nLvboqJ1sOHXsQAH/CZw10x25I0MEBP6xmNrdvG6EuE4F6YunLn9jYcPlfqnpHj/w QCoA== 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=zinydhZTS7ZFQXHDqJakUjvKtN1SGrUoEJDQesMA15w=; b=Bp51d0HLS3YyAu7W2IHcsVWMVYCyhZRXcIF4wLmFp/OocyAngUEtDvKNnJuqjDTtAo YzLJInESP0MRv161OiID+MwltLOHf7HJ/t9uw8aKhJfRtNshynTUs5QfM4h+hlt7Eyof zpxEAbyzK9w3dwwBqqRR1zcS1fwtzmJa8TYmWaoCwzpDrXHMOAR4bpbD6SquW+1PkdWA cuw6UqPn3uDSd9/m9g/h4IcTVPk7J+ojF/tkX8TH6aVjfd4L9QBHIRvKbIkg9YwYagVn glfS7gFOWEnPINc3Hck6OlJEgzIy70qz8IDyTRDgzJFteEPetBEgAwdLAdF48nYdit8i e3ww== X-Gm-Message-State: AGi0Pubvxm22UdyKlFcdLwg2YIvIx57DvKLCGK4rhNdEqrLwf9yVMZJQ y8jP4sXHIlLhZtrGVeaBfcg= X-Google-Smtp-Source: APiQypIZUPFvWIgOCHSKSv6883R+fSypE+R3qki0zAO0R3uHduSsq2I9PWusEk1nwt/C+0B1i9IrGA== X-Received: by 2002:a62:164d:: with SMTP id 74mr17425796pfw.52.1587051876947; Thu, 16 Apr 2020 08:44:36 -0700 (PDT) Received: from localhost.localdomain ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id g25sm16888626pfh.55.2020.04.16.08.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 08:44:36 -0700 (PDT) From: bill.c.roberts@gmail.com X-Google-Original-From: william.c.roberts@intel.com To: bill.c.roberts@gmail.com Cc: plautrba@redhat.com, sds@tycho.nsa.gov, selinux@vger.kernel.org, William Roberts Subject: [PATCH v2 18/18] utils: matchpathcon add deprecated warning Date: Thu, 16 Apr 2020 10:43:52 -0500 Message-Id: <20200416154352.21619-19-william.c.roberts@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416154352.21619-1-william.c.roberts@intel.com> References: <20200225200219.6163-1-william.c.roberts@intel.com> <20200416154352.21619-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 3d94af365071..2615a7fd3d25 100644 --- a/libselinux/utils/matchpathcon.c +++ b/libselinux/utils/matchpathcon.c @@ -76,6 +76,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]);