not_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 4 days agoanother CVElemmy.blahaj.zoneimagemessage-square55linkfedilinkarrow-up1711arrow-down111
arrow-up1700arrow-down1imageanother CVElemmy.blahaj.zonenot_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 4 days agomessage-square55linkfedilink
minus-squaredbx12@programming.devlinkfedilinkarrow-up2·3 days agoThe interesting thing is that bash allows writing this variable. I would’ve expected it to be readonly for obvious reasons.
minus-squarepoolcritter@pawb.sociallinkfedilinkarrow-up1·3 days agoUSER is just an environment variable in the environment block like any other; even if Bash didn’t allow changing it, any other program could.
minus-square🌞 Alexander Daychilde 🌞@lemmy.worldlinkfedilinkEnglisharrow-up1·3 days agoRight? And while Linux generally seems to let you shoot yourself in your foot if you’d really like to, things like --no-preserve-root mean they do put SOME guardrails out there. lol. $USER seems worth making immutable. heh
The interesting thing is that bash allows writing this variable. I would’ve expected it to be readonly for obvious reasons.
USER is just an environment variable in the environment block like any other; even if Bash didn’t allow changing it, any other program could.
Right? And while Linux generally seems to let you shoot yourself in your foot if you’d really like to, things like
--no-preserve-rootmean they do put SOME guardrails out there. lol. $USER seems worth making immutable. heh