From patchwork Tue May 3 08:23:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 12835264 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 58278C433FE for ; Tue, 3 May 2022 08:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232727AbiECI1F (ORCPT ); Tue, 3 May 2022 04:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232739AbiECI1E (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 06A0F2980A for ; Tue, 3 May 2022 01:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651566209; 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; bh=JWWAcnDySCtldags5m/3bGqlDmlMSLlq7nqRiIzMD+k=; b=Ic7shHxfNBpKu0qMt83bJaX5P+MMtJjCT1uGZo4gFgtOEecPcUwNffwj1RgN/RpvERF6fV 7U3Q8f/g9x+fy+lIsLqiHvs8mYXLIMqtq91G9xN5CovV8Lq0jmlBPWiAdLY6IxVhuJFd21 EqI9CuXQ7IR5sRhJHJ3O3G9liZsVal0= 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-576-QVjlbtkXMMCWr-XdQ2NxMQ-1; Tue, 03 May 2022 04:23:28 -0400 X-MC-Unique: QVjlbtkXMMCWr-XdQ2NxMQ-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 5215F833942 for ; Tue, 3 May 2022 08:23:28 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (unknown [10.39.192.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69E29400E896; Tue, 3 May 2022 08:23:27 +0000 (UTC) From: Laszlo Ersek To: SELinux List , Laszlo Ersek Cc: "Richard W.M. Jones" , Petr Lautrbach Subject: [PATCH v2 0/5] selinux_restorecon(3), setfiles(8): skip relabeling errors Date: Tue, 3 May 2022 10:23:21 +0200 Message-Id: <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 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1794518 v1: https://lore.kernel.org/selinux/20220428065354.27605-1-lersek@redhat.com/ In version 2, I've picked up Daniel Burgener's R-b for patch#3, and moved the new symbol "selinux_restorecon_get_skipped_errors" to section LIBSELINUX_3.4 of "libselinux.map" in patch#4, according to Petr's feedback. Please CC me on all replies to the series; I'm not subscribed to the SELinux mailing list. ("CONTRIBUTING.md" does not say that subscribing is a requirement.) Cc: "Richard W.M. Jones" Cc: Petr Lautrbach Thanks, Laszlo Laszlo Ersek (5): setfiles: fix up inconsistent indentation setfiles: remove useless assignment and comment (after RHBZ#1926386) setfiles: remove useless "iamrestorecon" checks in option parsing selinux_restorecon: introduce SELINUX_RESTORECON_COUNT_ERRORS setfiles: introduce the -C option for distinguishing file tree walk errors libselinux/include/selinux/restorecon.h | 15 ++++++++ libselinux/man/man3/selinux_restorecon.3 | 22 +++++++++++- libselinux/man/man3/selinux_restorecon_get_skipped_errors.3 | 28 +++++++++++++++ libselinux/src/libselinux.map | 1 + libselinux/src/selinux_restorecon.c | 34 +++++++++++++++--- policycoreutils/setfiles/restore.c | 8 +++-- policycoreutils/setfiles/restore.h | 4 ++- policycoreutils/setfiles/setfiles.8 | 22 ++++++++++++ policycoreutils/setfiles/setfiles.c | 36 +++++++++----------- 9 files changed, 141 insertions(+), 29 deletions(-) create mode 100644 libselinux/man/man3/selinux_restorecon_get_skipped_errors.3 base-commit: 2a167d1156578fc29541f6fb60af65452f431aae Acked-by: Petr Lautrbach