3 ms·
WARNING: I implemented a tiny library for that in go a while ago. Go under Linux is not safe! Linux is not posix compliant and only sets the IDs for the current
by sarnowski 13y ago
WARNING: I implemented a tiny library for that in go a while ago. Go under Linux is not safe! Linux is not posix compliant and only sets the IDs for the current thread. Go almost always spawned more threads before initializing your code which are then still owned by root and are in the threadpool for your goroutines:
https://github.com/sarnowski/mitigation/blob/master/mitigation.go https://github.com/sarnowski/mitigation/blob/master/mitigati...
Comments mentions safe OS and golang bugticket.
- laumars 13y agoI'm guessing it might depend on the point in your Go code whrn you setuid as the tests that I did on my own project, setuid changed the user id as expacted then the processes were spawned. However you have given me reason to test my own code again and more thoroughly :-)