From ac8c8ca54aaed1466255161a3d727dcfade4a7d9 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Sun, 9 Aug 2020 17:34:23 +0900 Subject: Add a knob to use fixed path `iceauth` tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `system()` and `popen()` may unsafe unless using absolute command path. Rely on PATH environment variable set by users may result in unwanted tool. Signed-off-by: OBATA Akio Signed-off-by: Slávek Banko --- tdesu/tdesu_stub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tdesu') diff --git a/tdesu/tdesu_stub.c b/tdesu/tdesu_stub.c index f8054a313..5da4c6110 100644 --- a/tdesu/tdesu_stub.c +++ b/tdesu/tdesu_stub.c @@ -367,9 +367,9 @@ int main() close(fd); xsetenv("ICEAUTHORITY", iceauthority); - fout = popen("iceauth >/dev/null 2>&1", "w"); + fout = popen(ICEAUTH_COMMAND " >/dev/null 2>&1", "w"); if (!fout) { - perror("tdesu_stub: popen iceauth"); + perror("tdesu_stub: popen " ICEAUTH_COMMAND); exit(1); } for (i=0; host[i]; i++) -- cgit v1.2.1