I am having a very weird issue with my
PATH variable. In particular, at some point
/usr/lib/hardening-wrapper/bin is added and I would like it not to be.
The first thing I did was to check
/etc/environment to see if any of them were setting it, but they were not.
Next I thought perhaps a stealthy script chain might be doing so, so I ran:
PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>log
To see if it would shed some light. To my amazement,
/usr/lib/hardening-wrapper/bin wasn't there. To see if this was replicable in a simpler environment, I just ran a naked
bash from the prompt. However in this
PATH once again contains
The scary thing is that the same path exists in my root user shell too; however, it doesn't happen if I don't run X. I thought it could have to do with the X configuration scripts, but none of them modified
PATH. I also thought it could be in the configuration of my terminal (termite), but it doesn't do so either. Frankly, at this point, I'm at a loss.
Can anybody tell me how I can stop this path from being added to my
Overnight I ran a
find . -type f -print0 | parallel --progress --null -L 100 -m -j 4 grep -I 'hardening-wrapper' to see what it would find. Overall it found the following matches:
.bash_historybecause I've been running a bunch of commands that include it
./csassignments/ece454/thrift-0.10.0contains my thrift installation for a course I took on distributed computation. In the 'tutorial_client' it sets and exports the PATH in 'relink_command'. I suspect this is because my PATH contained it when I installed thrift?
- The source code of GNU binutils and GCC that I use to build cross compilers both contain logs that print PATH. Like above I suspect they just read what my path was.
- A bunch of CMake projects I've built from source (llvm) seem to have also read my old PATH
As far as I can tell, none of those is being loaded automatically. And the only one that actually exports the path it modifies is the thrift tutorial client which I haven't touched since I took the course.