policycoreutils -- Make restorecon return 0 when a file has changed context with no error
PATCH 4/4 policycoreutils -- Make restorecon return 0 when a file has changed context with no error
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 <[email protected]>
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(-)
policycoreutils/setfiles/restore.c +1 -2
@@ -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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 27 lines · Laurent Bigonville
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 <[email protected]>
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(-)policycoreutils/setfiles/restore.c +0
-1@@ -218,10 +218,9 @@ static int restore(FTSENT *ftsent) r_opts->progname, my_file, newcon, strerror(errno)); goto skip; } - ret = 1;
Quoted 7 lines
out:
freecon(newcon);
- return ret;
+ return 0;
skip:
freecon(newcon);
return SKIP;
Is this right? Don't we get to "out" from a number of error cases? Do we always want 0?
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 30 lines · Eric Paris
Quoted 29 lines · Laurent Bigonville
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 <[email protected]>
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(-)policycoreutils/setfiles/restore.c +0
-1@@ -218,10 +218,9 @@ static int restore(FTSENT *ftsent) r_opts->progname, my_file, newcon, strerror(errno)); goto skip; } - ret = 1;out:
freecon(newcon);
Quoted 8 lines
Quoted 5 lines
- return ret;
+ return 0;
skip:
freecon(newcon);
return SKIP;Is this right? Don't we get to "out" from a number of error cases? Do we always want 0?
The return value of 1 when some file context is changed is needed by restorecond.
This patch fixes the same bug:
http://permalink.gmane.org/gmane.comp.security.selinux/16793
Signature · 8 lines
Martin Orr -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.