From 00e38c1947411eef9b86a23c17ca1e8fc1f5c6a6 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Thu, 2 Mar 2023 15:11:55 +0100 Subject: [PATCH] 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. --- tools/ippeveprinter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.47.2