News for hackers. Stuff that matters.
Re:Path Isn't Real on Linux by LegionMammal978 on Tuesday April 29, 2025 @08:33PM (#43839804)
One thing I was surprised to learn a couple years ago is that users and groups aren't really tracked much by the Linux kernel: they're just numeric IDs that track process and file ownership. So if you setuid() to a user ID that doesn't exist in /etc/passwd or anywhere else, the kernel won't stop you.
Re:Path Isn't Real on Linux by latchkey on Tuesday April 29, 2025 @08:40PM (#43839860)
If I have a file on machineA with uid10001 and I copy the file to machineB, I might want it to retain that uid, but it shouldn't matter to machineB that it doesn't map to a real user.
Re:Path Isn't Real on Linux by rafram on Tuesday April 29, 2025 @11:16PM (#43840914)
Hopefully that user actually doesn’t exist on the second machine!
Re:Path Isn't Real on Linux by MrDarcy on Tuesday April 29, 2025 @09:47PM (#43840313)
You’ll see this observation all the time building containers.
Re:Path Isn't Real on Linux by danielrico on Tuesday April 29, 2025 @10:28PM (#43840583)
Don't if you only run them with root user.
Re:Path Isn't Real on Linux by kurisufag on Wednesday April 30, 2025 @12:44AM (#43841361)
or with ipa-esque authentication schemes and shared mounts
Re:Path Isn't Real on Linux by dimatura on Wednesday April 30, 2025 @03:00AM (#43842042)
And NFS!