45564281bb
- unify logging a bit - cleanup some warnings and fix a typo in TZ code - 450993 improve and fix inotify support
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
diff -up cronie-1.1/src/security.c.keycreatecon cronie-1.1/src/security.c
|
|
--- cronie-1.1/src/security.c.keycreatecon 2008-05-30 11:29:46.000000000 +0200
|
|
+++ cronie-1.1/src/security.c 2008-06-17 10:08:39.000000000 +0200
|
|
@@ -356,7 +356,7 @@ static int cron_change_selinux_range(use
|
|
#endif
|
|
syslog(LOG_ERR,
|
|
"CRON (%s) ERROR:"
|
|
- "Unauthorized range %s in MLS_LEVEL for user %s ",
|
|
+ "Unauthorized range %s in MLS_LEVEL for user %s",
|
|
u->name, (char*)ucontext, u->scontext);
|
|
return -1;
|
|
}
|
|
@@ -370,18 +370,18 @@ static int cron_change_selinux_range(use
|
|
}
|
|
}
|
|
|
|
- if ((setexeccon(ucontext) < 0) && (setkeycreatecon(ucontext))) {
|
|
+ if (setexeccon(ucontext) < 0 || setkeycreatecon(ucontext) < 0) {
|
|
if (security_getenforce() > 0) {
|
|
syslog(LOG_ERR,
|
|
"CRON (%s) ERROR:"
|
|
- "Could not set exec context to %s for user",
|
|
+ "Could not set exec or keycreate context to %s for user",
|
|
u->name, (char*)ucontext);
|
|
return -1;
|
|
}
|
|
else {
|
|
syslog(LOG_ERR,
|
|
"CRON (%s) ERROR:"
|
|
- "Could not set exec context to %s for user, "
|
|
+ "Could not set exec or keycreate context to %s for user,"
|
|
" but SELinux in permissive mode, continuing",
|
|
u->name, (char*)ucontext);
|
|
|