libselinux/selinux_restorecon: Skip customized files also without -v
PATCH 1/1 libselinux/selinux_restorecon: Skip customized files also without -v
In the original code, customizable file contexts were not changed only if -v was used. It lead to different behavior when selinux_restorecon was run with -v and without it.
Based on an initial patch by Jan Zarsky <[email protected]>
--- libselinux/src/selinux_restorecon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libselinux/src/selinux_restorecon.c +1 -1
@@ -672,8 +672,8 @@ static int restorecon_sb(const char *pathname, const struct stat *sb,selinux_log (SELINUX_INFO ,"%s not reset as customized by admin to %s\n" , pathname, curcon); - goto out; } + goto out; }if (!flags->set_specctx && curcon) {
Signature · 1 line
2.20.1
Quoted 8 lines · Petr Lautrbach
In the original code, customizable file contexts were not changed only if -v was used. It lead to different behavior when
selinux_restoreconwas run with -v and without it.Based on an initial patch by Jan Zarsky <[email protected]>
Signed-off-by Petr Lautrbach <[email protected]>
Quoted 21 lines
--- libselinux/src/selinux_restorecon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libselinux/src/selinux_restorecon.c +1
-2@@ -672,8 +672,8 @@ static int restorecon_sb(const char *pathname, const struct stat *sb,selinux_log (SELINUX_INFO ,"%s not reset as customized by admin to %s\n" , pathname, curcon); - goto out; } + goto out; }if (!flags->set_specctx && curcon) { --2.20.1
Quoted 7 lines · Nicolas Iooss
Quoted 5 lines · Petr Lautrbach
In the original code, customizable file contexts were not changed only if -v was used. It lead to different behavior when
selinux_restoreconwas run with -v and without it.
Quoted 5 lines
Quoted 3 lines
Based on an initial patch by Jan Zarsky <[email protected]>
Signed-off-by Petr Lautrbach <[email protected]>Acked-by Nicolas Iooss <[email protected]>
Merged.
Nicolas
Quoted 21 lines
Quoted 21 lines
--- libselinux/src/selinux_restorecon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libselinux/src/selinux_restorecon.c +1
-2@@ -672,8 +672,8 @@ static int restorecon_sb(const char *pathname, const struct stat *sb,selinux_log (SELINUX_INFO ,"%s not reset as customized by admin to %s\n" , pathname, curcon); - goto out; } + goto out; }if (!flags->set_specctx && curcon) { --2.20.1