Remove hard-coded paths to system tools available in $PATH

This patch implemements a new feature of libite v1.9.1, whichp(), which
instead of fexist() that requires an absolute path, searches $PATH.

For reference, see issue #69 and PRs #70 and #72.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-07-03 13:13:55 +02:00
1 parent 30822f0d68
commit 9c6e046d93
5 files changed
+23 -24

No files matched your search

+2 -2
View File
@@ -54,8 +54,8 @@ static void setup(void *arg)
makedir("/tmp/.X11-unix", 01777);
makedir("/tmp/.ICE-unix", 01777);
if (fexist("/sbin/restorecon"))
run("/sbin/restorecon /tmp/.ICE-unix /tmp/.X11-unix");
if (whichp("restorecon"))
run("restorecon /tmp/.ICE-unix /tmp/.X11-unix");
umask(022);
}