diff mbox series

[for-3.5,2/5] setfiles: remove useless assignment and comment (after RHBZ#1926386)

Message ID 20220428065354.27605-3-lersek@redhat.com (mailing list archive)
State Superseded
Headers show
Series selinux_restorecon(3), setfiles(8): skip relabeling errors | expand

Commit Message

Laszlo Ersek April 28, 2022, 6:53 a.m. UTC
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" <rjones@redhat.com>
Cc: Petr Lautrbach <plautrba@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1794518
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 policycoreutils/setfiles/setfiles.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

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.