[PATCH 4/4] policycoreutils -- Make restorecon return 0 when a file has changed context with no error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

restorecon should return 0 when a file has changed context with no
error. With the last version it's returning 1.

I'm not sure if a patch has already been proposed for this issue.

Laurent

Description: Make restorecon return 0 when a file has changed context with no error
Author: Russell Coker <russell@xxxxxxxxxxxx>
Last-Update: 2012-03-07
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662990

---
 setfiles/restore.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/policycoreutils/setfiles/restore.c b/policycoreutils/setfiles/restore.c
index 9a7d315..a378af0 100644
--- a/policycoreutils/setfiles/restore.c
+++ b/policycoreutils/setfiles/restore.c
@@ -218,10 +218,9 @@ static int restore(FTSENT *ftsent)
 			r_opts->progname, my_file, newcon, strerror(errno));
 		goto skip;
 	}
-	ret = 1;
 out:
 	freecon(newcon);
-	return ret;
+	return 0;
 skip:
 	freecon(newcon);
 	return SKIP;

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux