envar PATH when run by udev - poor choice?
Hello :)
The value of envar PATH for processes run by the udev system is "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.". If peer review (that's you!) agrees it is a poor choice how can I submit an enhancement request? The man pages do not say anything about bug reporting. Here are reasons why it is a bizarre choice:
AFAIK udevd's PATH is not configurable. The workaround is for processes initiated by udev to set a sane PATH for themselves, perhaps "/usr/sbin:/sbin:/usr/bin:/bin". EDIT: seen on Slackware 13.0 32 bit. EDIT2: rc.udev is run from rc.S, not rc.M as stated above :redface: Best Charles |
Apparently older udevd cleaned PATH but not anymore (circumstantial). W/o need for patching, could starting Udev like 'env PATH=/usr/sbin:/sbin:/usr/bin:/bin /sbin/udevd --whatever-args' work? That is, if the "Steps to reproduce" method shows that helper apps inherit that path.
|
Quote:
|
Further investigation confirms the initial impression that udev changes envar PATH, setting it to "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
Code:
root@CW8:~# strings /sbin/udevd | grep sbin |
Perhaps an strace would reveal something.
|
Quote:
I tried that but the strace output stopped before a device could be plugged in. strace showed reading many udev rules and ended with Code:
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d9c708) = 6604 Unless there are any further suggestions on how to investigate this so I can make a more useful request, how can I submit an enhancement request? |
Further investigation shows that the $PATH is bash' default so presumably udevd is not setting a PATH environment variable
Code:
c@CW8:~$ unset PATH |
Quote:
|
All times are GMT -5. The time now is 07:51 AM. |