diff options
author | tijl <tijl@FreeBSD.org> | 2017-01-13 00:33:12 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2017-01-13 00:33:12 +0800 |
commit | cd3012f02c825845219df51a566cad42ccdd8e00 (patch) | |
tree | 3234c77e99ec05d6d673a5486cdceede6baa0aa9 /print | |
parent | c5d80caf5b3b76bd68d0eb498d5190a76c0e9102 (diff) | |
download | freebsd-ports-gnome-cd3012f02c825845219df51a566cad42ccdd8e00.tar.gz freebsd-ports-gnome-cd3012f02c825845219df51a566cad42ccdd8e00.tar.zst freebsd-ports-gnome-cd3012f02c825845219df51a566cad42ccdd8e00.zip |
The return value of cupsdStartProcess is zero on error. Fix two cases
where this is checked incorrectly.
PR: 211465
Diffstat (limited to 'print')
-rw-r--r-- | print/cups/Makefile | 1 | ||||
-rw-r--r-- | print/cups/files/patch-scheduler_client.c | 13 | ||||
-rw-r--r-- | print/cups/files/patch-scheduler_subscriptions.c | 13 |
3 files changed, 27 insertions, 0 deletions
diff --git a/print/cups/Makefile b/print/cups/Makefile index df2fef5c7be1..d556a94328c9 100644 --- a/print/cups/Makefile +++ b/print/cups/Makefile @@ -4,6 +4,7 @@ PORTNAME= cups PORTVERSION= 2.2.1 DISTVERSIONPREFIX=v +PORTREVISION= 1 CATEGORIES= print MAINTAINER= tijl@FreeBSD.org diff --git a/print/cups/files/patch-scheduler_client.c b/print/cups/files/patch-scheduler_client.c new file mode 100644 index 000000000000..a5b6b0ac848d --- /dev/null +++ b/print/cups/files/patch-scheduler_client.c @@ -0,0 +1,13 @@ +--- scheduler/client.c.orig 2016-10-03 19:55:40 UTC ++++ scheduler/client.c +@@ -3818,8 +3818,8 @@ pipe_command(cupsd_client_t *con, /* I - + * Then execute the command... + */ + +- if (cupsdStartProcess(command, argv, envp, infile, fds[1], CGIPipes[1], +- -1, -1, root, DefaultProfile, NULL, &pid) < 0) ++ if (!cupsdStartProcess(command, argv, envp, infile, fds[1], CGIPipes[1], ++ -1, -1, root, DefaultProfile, NULL, &pid)) + { + /* + * Error - can't fork! diff --git a/print/cups/files/patch-scheduler_subscriptions.c b/print/cups/files/patch-scheduler_subscriptions.c new file mode 100644 index 000000000000..9a888d8ecc56 --- /dev/null +++ b/print/cups/files/patch-scheduler_subscriptions.c @@ -0,0 +1,13 @@ +--- scheduler/subscriptions.c.orig 2016-10-03 19:55:40 UTC ++++ scheduler/subscriptions.c +@@ -1561,8 +1561,8 @@ cupsd_start_notifier( + * Create the notifier process... + */ + +- if (cupsdStartProcess(command, argv, envp, fds[0], -1, NotifierPipes[1], +- -1, -1, 0, DefaultProfile, NULL, &pid) < 0) ++ if (!cupsdStartProcess(command, argv, envp, fds[0], -1, NotifierPipes[1], ++ -1, -1, 0, DefaultProfile, NULL, &pid)) + { + /* + * Error - can't fork! |