From patchwork Tue May 3 08:23:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 12835265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3BB2C433F5 for ; Tue, 3 May 2022 08:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232752AbiECI1F (ORCPT ); Tue, 3 May 2022 04:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232750AbiECI1E (ORCPT ); Tue, 3 May 2022 04:27:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE38F2A266 for ; Tue, 3 May 2022 01:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651566211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=13LIhIH8ENFwdPN6Fw6ExK/xjeONIgl/fIJM5yJ7c7Q=; b=Ot66y3fupU8LfeutWM524++gf8B0KxOx6salyY97CSjIOHCPbacjvTG8Dt24Oeh4wuwa64 SpJcgVzK9j0gvPIUXQbvvCVoibM490J1aryQyV8s/7NnfKKtvI+MREIPT77Re14KfZIU1L O52Dh8khOgM5Zo+07P9I0L3zKBrsUnw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-596-hXGeRQElPiCxsc7nUG_jqw-1; Tue, 03 May 2022 04:23:30 -0400 X-MC-Unique: hXGeRQElPiCxsc7nUG_jqw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A710185A5A8 for ; Tue, 3 May 2022 08:23:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (unknown [10.39.192.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF21340CF8F9; Tue, 3 May 2022 08:23:29 +0000 (UTC) From: Laszlo Ersek To: SELinux List , Laszlo Ersek Cc: "Richard W.M. Jones" , Petr Lautrbach Subject: [PATCH v2 2/5] setfiles: remove useless assignment and comment (after RHBZ#1926386) Date: Tue, 3 May 2022 10:23:23 +0200 Message-Id: <20220503082326.11621-3-lersek@redhat.com> In-Reply-To: <20220503082326.11621-1-lersek@redhat.com> References: <20220503082326.11621-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org Commit 9207823c8ff0 ("setfiles: Do not abort on labeling error", 2021-02-01) hoisted the zeroing of "r_opts.abort_on_error" above the branching on "setfiles vs. restorecon". Clean up two aspects: - "r_opts" is altogether zeroed a bit higher up, so remove the explicit zero-assignment; - neither "setfiles" nor "restorecon" aborts on errors during the file tree walk now, so remove the comment "Do not abort on errors during the file tree walk" from the "restorecon" branch as well. Cc: "Richard W.M. Jones" Cc: Petr Lautrbach Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1794518 Signed-off-by: Laszlo Ersek --- policycoreutils/setfiles/setfiles.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/policycoreutils/setfiles/setfiles.c b/policycoreutils/setfiles/setfiles.c index be88be5d5497..cf504618d38f 100644 --- a/policycoreutils/setfiles/setfiles.c +++ b/policycoreutils/setfiles/setfiles.c @@ -162,7 +162,6 @@ int main(int argc, char **argv) request_digest = 0; policyfile = NULL; - r_opts.abort_on_error = 0; if (!argv[0]) { fprintf(stderr, "Called without required program name!\n"); exit(-1); @@ -197,7 +196,6 @@ int main(int argc, char **argv) * restorecon: * No recursive descent unless -r/-R, * Expands paths via realpath, - * Do not abort on errors during the file tree walk, * Do not try to track inode associations for conflict detection, * Follows mounts, * Does lazy validation of contexts upon use.