Example:
- Code: Select all
nice su nobody -c "/bin/true"
- Code: Select all
setpriority(PRIO_PROCESS, 0, 0) = -1 EACCES (Permission denied)
- Code: Select all
su nobody -c "nice /bin/true"
I always assumed, that the root of the file system would be inherited by any sub processes no matter what (and regardless of setuid / setgid calls). I stumbled across this one while trying to find out why the updatedb script failed when being spawned by a changerooted cron daemon. Admittedly, it's trivial to work around, but could anybody give me a small push into the right direction as to why the behaviour occurs (maybe PAM related?)?