vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, This diff makes cwm's `exec' dialogues search for executables in $PATH first before falling back on the default path. This also matches the behaviour of execvp(3) (which is used to execute the selected executable). I removed the comment because I think that with this change, no further configuration would be required here. Regards, Tim Index: kbfunc.c ================================================== ================= RCS file: /cvs/xenocara/app/cwm/kbfunc.c,v retrieving revision 1.13 diff -p -u -r1.13 kbfunc.c --- kbfunc.c 16 Jan 2008 11:39:20 -0000 1.13 +++ kbfunc.c 15 Mar 2008 23:08:50 -0000 @@ -294,8 +294,9 @@ kbfunc_exec(struct client_ctx *scratch, err(1, "getresuid failure"); TAILQ_INIT(&menuq); - /* just use default path until we have config to set this */ - path = xstrdup(_PATH_DEFPATH); + if ((path = getenv("PATH")) == NULL) + path = _PATH_DEFPATH; + path = xstrdup(path); for (ap = paths; ap < &paths[NPATHS - 1] && (*ap = strsep(&path, ":")) != NULL if (**ap != '\0') |