From: Zdenek Dohnal Date: Thu, 2 Mar 2023 14:11:55 +0000 (+0100) Subject: ippeveprinter.c: Check the created `path` string instead of `command` X-Git-Tag: v2.4.3~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00e38c1947411eef9b86a23c17ca1e8fc1f5c6a6;p=thirdparty%2Fcups.git ippeveprinter.c: Check the created `path` string instead of `command` If a user passes the command by only its name, we have to check the path string we created instead of command string alone. --- diff --git a/tools/ippeveprinter.c b/tools/ippeveprinter.c index d3daffafee..857ba7cf77 100644 --- a/tools/ippeveprinter.c +++ b/tools/ippeveprinter.c @@ -1634,9 +1634,9 @@ create_printer( { snprintf(path, sizeof(path), "%s/command/%s", cg->cups_serverbin, command); - if (access(command, X_OK)) + if (access(path, X_OK)) { - _cupsLangPrintf(stderr, _("Unable to execute command \"%s\": %s"), command, strerror(errno)); + _cupsLangPrintf(stderr, _("Unable to execute command \"%s\": %s"), path, strerror(errno)); return (NULL); }