From patchwork Tue Aug 9 13:24:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Lautrbach X-Patchwork-Id: 9271965 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 7FB776075A for ; Tue, 9 Aug 2016 17:44:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74DA428364 for ; Tue, 9 Aug 2016 17:44:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69A742838C; Tue, 9 Aug 2016 17:44:15 +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=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (emsm-gh1-uea10.nsa.gov [8.44.101.8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1760C28364 for ; Tue, 9 Aug 2016 17:44:11 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.28,495,1464652800"; d="scan'208";a="16430791" IronPort-PHdr: =?us-ascii?q?9a23=3A76GSvRW1aoNhobG/PRmOye/DWyfV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYZhODt8tkgFKBZ4jH8fUM07OQ6PG5HzRZqszY+DBaKdoXBkdD0Z?= =?us-ascii?q?1X1yUbQ+e9QXXhK/DrayFoVO9jb3RCu0+BDE5OBczlbEfTqHDhpRQbGxH4KBYn?= =?us-ascii?q?br+tQt2asc272qiI9oHJZE0Q3XzmMOo0dEz991yZ9pFPx9AzcuBpklqBi0ALUt?= =?us-ascii?q?we/XlvK1OXkkS0zeaL17knzR5tvek8/dVLS6TwcvdwZ7VZCDM7LzJ9v5Wz5lH+?= =?us-ascii?q?Vw/H2l8wGiVTy0IJUED560ThU5PwtDbqnvZs0ymde8vtRPY7Xirxwb1sTUrQhT?= =?us-ascii?q?sdfxow7X3NgMV7jOoPuBaougBlyYf8eoyZNPNiOKjaeIVJFiJ6Qs9NWnkZUcuH?= =?us-ascii?q?ZIwVAr9EZL5V?= X-IPAS-Result: =?us-ascii?q?A2HtBgBNFapX/wHyM5BdHQGDJ4FSuxUlh1JMAQEBAQEBAgJ?= =?us-ascii?q?aJ4IyBAMRghwCNxQgDgMJAhcpCAgDAS0VHwsFGASIEME1JYYqiF8RAWiEch0Fm?= =?us-ascii?q?TmPCgKJaoVVApAsVIN8bIV2gTYBAQE?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 09 Aug 2016 17:41:45 +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 u79FBQXO015500; Tue, 9 Aug 2016 11:11:42 -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 u79FB9s4086096 for ; Tue, 9 Aug 2016 11:11:09 -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 u79FBNji015497 for ; Tue, 9 Aug 2016 11:11:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1BrAQAy8alXhxy3hNFdHQGEeaV8ggIBjxaEDBSGCYFMTAEBAQEBARMBAQEKCwkJGYYNgVGIMcIRhiqJWYRyHQWZOY8KAo8/ApAsghUBYYFZOjKHLAEBAQ X-IPAS-Result: A1BrAQAy8alXhxy3hNFdHQGEeaV8ggIBjxaEDBSGCYFMTAEBAQEBARMBAQEKCwkJGYYNgVGIMcIRhiqJWYRyHQWZOY8KAo8/ApAsghUBYYFZOjKHLAEBAQ X-IronPort-AV: E=Sophos;i="5.28,495,1464667200"; d="scan'208";a="5633533" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 09 Aug 2016 11:15:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0GwAgB78alXhxy3hNFdrRaTIhSGCYFMT?= =?us-ascii?q?AEBAQEBAQQPAQEBCgsJCRkvhV6KAsIQhiqOSx0FmTmPCgKPPwKQLIJ3gVk6h14?= =?us-ascii?q?BAQE?= X-IPAS-Result: =?us-ascii?q?A0GwAgB78alXhxy3hNFdrRaTIhSGCYFMTAEBAQEBAQQPAQE?= =?us-ascii?q?BCgsJCRkvhV6KAsIQhiqOSx0FmTmPCgKPPwKQLIJ3gVk6h14BAQE?= X-IronPort-AV: E=Sophos;i="5.28,495,1464652800"; d="scan'208";a="18323871" Received: from mx1.redhat.com ([209.132.183.28]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2016 13:24:32 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 119B97DD39 for ; Tue, 9 Aug 2016 13:24:31 +0000 (UTC) Received: from rhel-at-redhat.localdomain.com ([10.40.2.167]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u79DOTZC006214; Tue, 9 Aug 2016 09:24:30 -0400 From: Petr Lautrbach To: selinux@tycho.nsa.gov Subject: [PATCH] policycoreutils: 'fixfiles check' should not change anything Date: Tue, 9 Aug 2016 15:24:15 +0200 Message-Id: <1470749055-22365-1-git-send-email-plautrba@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 09 Aug 2016 13:24:31 +0000 (UTC) X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP -n was not being passed down to restorecon properly in the code path for -C and -N Patch-by: Dan Callaghan Signed-off-by: Petr Lautrbach --- policycoreutils/scripts/fixfiles | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles index 5c29eb9..fa43a53 100755 --- a/policycoreutils/scripts/fixfiles +++ b/policycoreutils/scripts/fixfiles @@ -150,8 +150,9 @@ fi # newer() { DATE=$1 + shift for m in `echo $FILESYSTEMSRW`; do - find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} -i -0 -f - + find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} $* -i -0 -f - done; } @@ -190,7 +191,7 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then esac; \ fi; \ done | \ - ${RESTORECON} ${VERBOSE} -i -f - -R `exclude_dirs`; \ + ${RESTORECON} ${VERBOSE} -i -f - -R $* `exclude_dirs`; \ rm -f ${TEMPFILE} ${PREFCTEMPFILE} fi } @@ -222,7 +223,7 @@ if [ ! -z "$PREFC" ]; then exit $? fi if [ ! -z "$BOOTTIME" ]; then - newer $BOOTTIME + newer $BOOTTIME $* exit $? fi [ -x /usr/sbin/genhomedircon ] && /usr/sbin/genhomedircon