summaryrefslogtreecommitdiff
path: root/scheduler/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'scheduler/process.c')
-rw-r--r--scheduler/process.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/scheduler/process.c b/scheduler/process.c
index 1b587ca31..53767053f 100644
--- a/scheduler/process.c
+++ b/scheduler/process.c
@@ -287,11 +287,16 @@ cupsdStartProcess(
strerror(errno));
if (job && job->printer)
- cupsdSetPrinterReasons(job->printer, "+cups-missing-filter-warning");
+ {
+ if (cupsdSetPrinterReasons(job->printer, "+cups-missing-filter-warning"))
+ cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL,
+ "Printer driver %s is missing.", command);
+ }
return (0);
}
- else if (commandinfo.st_mode & (S_ISUID | S_IWOTH))
+ else if ((commandinfo.st_mode & (S_ISUID | S_IWOTH)) ||
+ (!RunUser && commandinfo.st_uid))
{
*pid = 0;
@@ -306,7 +311,12 @@ cupsdStartProcess(
command, commandinfo.st_mode);
if (job && job->printer)
- cupsdSetPrinterReasons(job->printer, "+cups-insecure-filter-warning");
+ {
+ if (cupsdSetPrinterReasons(job->printer, "+cups-insecure-filter-warning"))
+ cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL,
+ "Printer driver %s has insecure file permissions (0%o).",
+ command, commandinfo.st_mode);
+ }
errno = EPERM;