]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
fixed error checking on setexeccon()
authorThibault Godouet <yo8192@users.noreply.github.com>
Sun, 10 Apr 2011 13:53:45 +0000 (14:53 +0100)
committerThibault Godouet <yo8192@users.noreply.github.com>
Sun, 10 Apr 2011 13:53:45 +0000 (14:53 +0100)
job.c

diff --git a/job.c b/job.c
index a3d463dcc1df4cac533bfee50dc1d23f90ff6298..7f4daf2af2298ea83f20404a0db06096da4e2c92 100644 (file)
--- a/job.c
+++ b/job.c
@@ -619,9 +619,9 @@ run_job(struct exe_t *exeent)
 #endif /* CHECKJOBS OR CHECKRUNJOB */
 
 #ifdef WITH_SELINUX
-           if(flask_enabled && setexeccon(line->cl_file->cf_user_context) )
-               die_e("Can't set execute context \"%s\".",
-                     line->cl_file->cf_user_context);
+           if(flask_enabled && setexeccon(line->cl_file->cf_user_context) < 0)
+               die_e("Can't set execute context '%s' for user '%s'.",
+                     line->cl_file->cf_user_context, line->cl_runas);
 #else
            if (setsid() == -1) {
                die_e("setsid(): errno %d", errno);