From patchwork Tue Sep 12 16:04:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Smalley X-Patchwork-Id: 9949853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D9ED60360 for ; Tue, 12 Sep 2017 17:34:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 678F529074 for ; Tue, 12 Sep 2017 17:34:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C3E829076; Tue, 12 Sep 2017 17:34:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from USFB19PA15.eemsg.mail.mil (uphb19pa12.eemsg.mail.mil [214.24.26.86]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D361B29075 for ; Tue, 12 Sep 2017 17:34:04 +0000 (UTC) Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by USFB19PA15.eemsg.mail.mil with ESMTP/TLS/AES256-SHA; 12 Sep 2017 17:34:02 +0000 X-IronPort-AV: E=Sophos;i="5.42,383,1500940800"; d="scan'208,217";a="2206852" Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 12 Sep 2017 17:31:41 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id v8CHMbFr001834; Tue, 12 Sep 2017 13:24:35 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id v8CH1YTx070268 for ; Tue, 12 Sep 2017 13:01:34 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id v8CH1UG9025638 for ; Tue, 12 Sep 2017 13:01:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1CcDACGErhZfywYGNZcHgYMg1iBVScHg?= =?us-ascii?q?VaCGoE2mQ+LH4c+h1GFSAKEOgdXAQIBAQEBAQITAQELFoV2AwMjBBkBGxILAQM?= =?us-ascii?q?MBgMGBzcCAiIBEQEFARwGE4oYAQMVA44NkRtAjAuBbRgFARyDCgWDXAoZJw1Xg?= =?us-ascii?q?xsBAQEBAQEBAwEBAQEBAQEZAgYSgxmCAoFQh2OBaINKgmEBBKB0gi6SJJJylRs?= =?us-ascii?q?ZH4EVgWQyISRfGoRvDxwZgWpah0iCQQEBAQ?= X-IPAS-Result: =?us-ascii?q?A1CcDACGErhZfywYGNZcHgYMg1iBVScHgVaCGoE2mQ+LH4c?= =?us-ascii?q?+h1GFSAKEOgdXAQIBAQEBAQITAQELFoV2AwMjBBkBGxILAQMMBgMGBzcCAiIBE?= =?us-ascii?q?QEFARwGE4oYAQMVA44NkRtAjAuBbRgFARyDCgWDXAoZJw1XgxsBAQEBAQEBAwE?= =?us-ascii?q?BAQEBAQEZAgYSgxmCAoFQh2OBaINKgmEBBKB0gi6SJJJylRsZH4EVgWQyISRfG?= =?us-ascii?q?oRvDxwZgWpah0iCQQEBAQ?= X-IronPort-AV: E=Sophos;i="5.42,383,1500955200"; d="scan'208,217";a="49488" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 12 Sep 2017 13:01:07 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AhhcpxxzCyCH0VkrXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?2+sRIJqq85mqBkHD//Il1AaPBtSKra4ewLOO6ujJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fdbghMgDexe7x/IAu5oQnMqsUanJZpJ7osxBfOvnZGYf?= =?us-ascii?q?ldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbD?= =?us-ascii?q?VheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxDmki?= =?us-ascii?q?cHMyMy/n/RhMJ+kalXpAutqwFjz4LRZoyeKfhwcb7Hfd4CWGROUcReVyJBDI2y?= =?us-ascii?q?bIUBEfYOMP1CoIXhvVYDtweyCRWuCe7p1zRGhmX23ao/0+k5DA/GwBIvH8oOsH?= =?us-ascii?q?vKqtX+KbocUeWvw6nMyTXMcfNX0ir65YjTbhAuv+mMXbJufsrX00UvDAbFgU+U?= =?us-ascii?q?qYzhITyU1v8As2ee7+V6VOKvj3QrpB12ojiq38ohjJTCiIENyl3c6yl13Yk4Kc?= =?us-ascii?q?emREN0e9KoDpRduzuVOoZ5Ws8uXX1ktSIgxrAFuZO3ZjYGxIkoyhLFavGKcY6F?= =?us-ascii?q?6Q/5WumLOzd3nndldaq/hxms9UigzfXxWceq3VhTqCRInMfBuGoR2hDP68WLUO?= =?us-ascii?q?Vy8Vmk2TaU2ADf8ORELlo1larfMZIhx78wlp4LvUTCGC/5hln2gbeIekk59eWk?= =?us-ascii?q?8frrb7r8qpOCOIJ4kA7zP6s2lsy6G+s4MwwOX2aB+eS70b3u5Vb5QKlUgf0ukq?= =?us-ascii?q?nWrpbaKd4Apq68GQBV1oIj5Ai/Djq939QYmGMILFNBeB6dk4fpPFTOLOjiDfij?= =?us-ascii?q?m1SsjCtrx/feM736HJrNKnnDkLH8fbdy8ENc1Aoywsxf55JTEL0BJunzVVXruN?= =?us-ascii?q?zXCR85LV/8/+GyI9Vn15gCWGuJNYAHLL/Jul+FrrYkLPuLYoIOkDn6LPch6vvn?= =?us-ascii?q?jHt/klgYK/qHx5wSPUukE+xmLkPRWn/lhtMMAC9epRYzVOznjhuZVDdXY3ujd6?= =?us-ascii?q?057zA/TomhCNGQFciWnLWd0XLjTdVtbWdcBwXJSC/l?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CxCwC2EbhZfywYGNZcHgYMGQYMgy2BV?= =?us-ascii?q?ScHgVaCGoE2mQ+LH4c+h1GFSAKEOgdXAQEBAQEBAQECARIBAQsWXYIzJIJCBiM?= =?us-ascii?q?EGQEbEgsBAwwGAwYHNwICIgERAQUBHAYTihgBAxUDjgmRG0CMC4FtGAUBHIMKB?= =?us-ascii?q?YNdChknDVeDGwEBAQEBAQEDAQEBAQEBARkCBhKDGYICgVCHY4Fog0qCYQEEoHS?= =?us-ascii?q?CLpIkknKVGxkfgRWBZDIhJF8ahG8PHBmBalqHSIJBAQEB?= X-IronPort-AV: E=Sophos; i="5.42,383,1500940800"; d="scan'208,217"; a="2049162" Received: from ucol3cpa06.eemsg.mail.mil ([214.24.24.44]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 12 Sep 2017 17:00:59 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;81e841c5-0c88-44ef-910a-0fbfb1bb8a28 Authentication-Results: ucol19pa08.eemsg.mail.mil; dkim=pass (signature verified) header.i=@gmail.com X-EEMSG-check-008: 66850667|UCOL19PA08_EEMSG_MP6.csd.disa.mil X-EEMSG-check-001: true X-EEMSG-SBRS: 0.3 X-EEMSG-ORIG-IP: 209.85.214.67 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ALGQDRCLhZZ0PWVdFcHgYMg1slAYEsJweBVoIagTaZD4sfhz6HUQ+FOQKEOgdCFQECAQEBAQEBARMLCwsGKDGFGQYjBBkBGxILAQMMBgMCBAc3AgIiAREBBQEcBhOKGAEDFY4AkRtAjAuBbRgFARyDCgWDXQoZJw1XgxsBAQEBAQEEAQEBAQEBGgIGEoMZggKBUIULgliBaINKgmEBBKB0gi6SJJJylRsZH4EVNYEvMiEkXxqEbw8cggMkNodIgkEBAQE X-IPAS-Result: A0ALGQDRCLhZZ0PWVdFcHgYMg1slAYEsJweBVoIagTaZD4sfhz6HUQ+FOQKEOgdCFQECAQEBAQEBARMLCwsGKDGFGQYjBBkBGxILAQMMBgMCBAc3AgIiAREBBQEcBhOKGAEDFY4AkRtAjAuBbRgFARyDCgWDXQoZJw1XgxsBAQEBAQEEAQEBAQEBGgIGEoMZggKBUIULgliBaINKgmEBBKB0gi6SJJJylRsZH4EVNYEvMiEkXxqEbw8cggMkNodIgkEBAQE Received: from mail-it0-f67.google.com ([209.85.214.67]) by ucol19pa08.eemsg.mail.mil with ESMTP; 12 Sep 2017 16:04:23 +0000 Received: by mail-it0-f67.google.com with SMTP id e134so3131001ite.3 for ; Tue, 12 Sep 2017 09:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D9WlzWsHzmBqw4qTCIKz2R4sR38GDorhOW/svbD6PQk=; b=pJSKsC/tuV39GwIKX/E2Hkbos5tUyZ+yUVSqiAqU/eBA9l8t00wsUQn8Jp1gpoZGlD YjwyyO9MEaAIoj/Fq8ZuymaSB4mbI9Dm1AKUWQ2d9WdxAK6bt3iePcb+TT8axyOmCs1+ lhy7+ip2Ssf1xo59AqBY8RmnpqrNhaPNWK3b5VwuPLX/uHlEV1j94u8tkLJmmcD6TmTc R1IhJgku+mjMzbbWIYkJB2g6ZMa+C1JDS5CdwQmEOs4FPpaqs8+ekt6/gwezE0LMOXIM QH7eO+/kzFl1Pe6+tfDV59r2jspJR7Im4K977yYE3Jod2S7RXLgmOsA7XMXQxYigC7gj 06xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=D9WlzWsHzmBqw4qTCIKz2R4sR38GDorhOW/svbD6PQk=; b=GMK8B+fLF1aggwqsXuErxLOIa2Ez5Ed0f6l/6zcpp8++X36lbSTs+ycSNh6nuBhEXC K+vljkbxchKg2ZO/bQAlYM4zrGY7AymUuPZWwqJB2YGHPZdMhNQij7VOhzZByRK5Ov2r YmVrsHd9HIl3/ux1EtK41kFBCgJqBIJiFEs+QZ2rVS07A41WsAHsspQFBANcCD85bKst mx5czfz56fbt9iQrK944ZMJbAs8XmfPDcyY6q4KUGhxIBkZEXIJs7cnfHwqjs2OF9dQi yNCn03ACHqfJusqYXHE72SWTL50Jgy/M5I0Okwh8S08mLtjP6wxki/JNQ5IwQiJQM5Jx yc0w== X-Gm-Message-State: AHPjjUht/yJ6fNArr69ifMnUDB6OwrCPCVZfSFyvMB4p7SWCkvoyH7LT KQyGHryY0/sMs8AhtxDeTHTFd75e2A== X-Google-Smtp-Source: AOwi7QBGpHYB/LOpjZe3t9t7feyTAfMlBD9qLzeYgNuiXsCI10AQGHSj30QDECWlUI4t4zZpFdo8r47DGbdvsQdaSjQ= X-Received: by 10.36.193.6 with SMTP id e6mr50622itg.143.1505232262314; Tue, 12 Sep 2017 09:04:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.129.6 with HTTP; Tue, 12 Sep 2017 09:04:21 -0700 (PDT) Received: by 10.107.129.6 with HTTP; Tue, 12 Sep 2017 09:04:21 -0700 (PDT) In-Reply-To: <20170911104141.2629-1-cgzones@googlemail.com> References: <20170911104141.2629-1-cgzones@googlemail.com> X-EEMSG-check-009: 444-444 From: Stephen Smalley Date: Tue, 12 Sep 2017 12:04:21 -0400 Message-ID: To: =?UTF-8?Q?Christian_G=C3=B6ttsche?= Subject: Re: [PATCH] libselinux: log no default label warning in verbose mode X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Cc: selinux Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP On Sep 11, 2017 3:45 AM, "Christian Göttsche via Selinux" < selinux@tycho.nsa.gov> wrote: Since 1cd972f restorecon does not print a warning in recurse mode for child files without a default label. Change it back in verbose mode: $ touch /run/test.pid $ restorecon -R /run $ restorecon -v -R /run Warning no default label for /run/test.pid This seems to revert what was an intentional change to avoid noise in fixfiles check output. See the mailing list discussions that preceded and followed the patch. Signed-off-by: Christian Göttsche --- libselinux/src/selinux_restorecon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) "Warning no default label for %s\n", lookup_path); -- 2.14.1 diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_ restorecon.c index ced41152..6d0eabe0 100644 --- a/libselinux/src/selinux_restorecon.c +++ b/libselinux/src/selinux_restorecon.c @@ -614,7 +614,7 @@ static int restorecon_sb(const char *pathname, const struct stat *sb, sb->st_mode); if (rc < 0) { - if (errno == ENOENT && flags->warnonnomatch) + if (errno == ENOENT && (flags->verbose || flags->warnonnomatch)) selinux_log(SELINUX_INFO,