]> granicus.if.org Git - cronie/commitdiff
Protect the call to setexeccon with WITH_SELINUX.
authorTomas Janousek <tjanouse@redhat.com>
Mon, 27 Aug 2007 17:47:34 +0000 (19:47 +0200)
committerTomas Janousek <tjanouse@redhat.com>
Mon, 27 Aug 2007 17:47:34 +0000 (19:47 +0200)
Signed-off-by: Tomas Janousek <tjanouse@redhat.com>
src/security.c

index 3e04f8e43f3532a2639c11d36f9f9f1fe85f5b4e..4156041c49a3b45ffac5ac92857f2af2c8ad8146 100644 (file)
@@ -42,7 +42,9 @@ static int cron_get_job_range( user *u, security_context_t *ucontextp, char **jo
 #endif
 
 void cron_restore_default_security_context() {
+#ifdef WITH_SELINUX
        setexeccon(NULL);
+#endif
 }
 
 int cron_set_job_security_context(entry *e, user *u, char ***jobenv) {