ghostscript/ijs_exec_server_dont_use_sh.patch
Tomáš Chvátal 0dd7230d55 Accepting request 682767 from home:mwilck:branches:Printing
- Fix IJS printing problem (bsc#1128467)
  * added ijs_exec_server_dont_use_sh.patch
  * allow exec'ing hpijs in apparmor profile

OBS-URL: https://build.opensuse.org/request/show/682767
OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=107
2019-03-08 12:28:32 +00:00

33 lines
983 B
Diff

From 0d58bab5cdc7e76d7220ce441d39812c85329ba2 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Fri, 8 Mar 2019 12:01:13 +0100
Subject: [PATCH] ijs: ijs_exec_server(): don't use "sh"
If ghostscript is confined using security profiles, executing "sh"
must be obviously avoided. So, try to exec the IJS server binary
directly. This should enable security profile writers to select
which IJS binaries to allow.
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
ijs/ijs_exec_unix.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/ijs/ijs_exec_unix.c b/ijs/ijs_exec_unix.c
index 6225694..e775dc3 100644
--- a/ijs/ijs_exec_unix.c
+++ b/ijs/ijs_exec_unix.c
@@ -70,9 +70,6 @@ ijs_exec_server(const char *server_cmd, int *pfd_to, int *pfd_from,
argv[i++] = "gdb";
#endif
- argv[i++] = "sh";
- argv[i++] = "-c";
-
argv[i++] = (char *)server_cmd;
argv[i++] = NULL;
status = execvp (argv[0], (char * const *)argv);
--
2.21.0