summaryrefslogtreecommitdiffstats
path: root/tdesu
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-08-09 17:34:23 +0900
committerSlávek Banko <slavek.banko@axis.cz>2020-08-26 18:11:02 +0200
commitac8c8ca54aaed1466255161a3d727dcfade4a7d9 (patch)
treea16f3955e178f3dca2daf98bf0ade9750aa13f6f /tdesu
parent56c5973b6b33df77a7491b07411cbd772c0d5d79 (diff)
downloadtdelibs-ac8c8ca54aaed1466255161a3d727dcfade4a7d9.tar.gz
tdelibs-ac8c8ca54aaed1466255161a3d727dcfade4a7d9.zip
Add a knob to use fixed path `iceauth` tool
`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 <obache@wizdas.com> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdesu')
-rw-r--r--tdesu/tdesu_stub.c4
1 files changed, 2 insertions, 2 deletions
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++)