Research
.
Skip Search Box

SELinux Mailing List

Re: [RFC][PATCH] Coalesce setfiles and restorecon into a single program

From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Fri, 04 May 2007 15:39:47 -0400


On Fri, 2007-05-04 at 15:19 -0400, Stephen Smalley wrote:
> restorecon started life as a much simpler program, but has gradually
> grown to being largely a duplicate of setfiles, only differing in its
> interface and default behaviors. Meanwhile, people keep adding features
> and options to both programs, leading to inconsistencies.
>
> This patch coalesces setfiles and restorecon into a single program
> presenting different interfaces and default behaviors depending on
> basename(argv[0]), making restorecon a symlink to setfiles.
>
> Unresolved issue: Current policy defines separate domains for the two
> programs. We need to either coalesce the domains as well, or if there
> is legitimate reason for separating them, restorecon could remain a
> separate binary (either a complete separate copy or a wrapper) even if
> the sources are coalesced.
>
> Comments?
>

Grr...bug fix patch below, applies on top of the original one.

diff -u trunk/policycoreutils/setfiles/setfiles.c trunk/policycoreutils/setfiles/setfiles.c

--- trunk/policycoreutils/setfiles/setfiles.c	(working copy)
+++ trunk/policycoreutils/setfiles/setfiles.c	(working copy)
@@ -541,6 +541,7 @@
 			exit(0);
 		}
 		/* Parent:  Check and label the files. */
+		rc = 0;
 		close(pipe_fds[1]);
 		if (nftw(name, apply_spec, 1024, nftw_flags)) {
 			fprintf(stderr,

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Fri 4 May 2007 - 15:39:50 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service