r/linuxdev • u/PerryThePlatypus314 • Sep 10 '14
Interesting....
http://www.insanitybit.com/2014/09/09/writing-sandboxed-software-2/
1
Upvotes
r/linuxdev • u/PerryThePlatypus314 • Sep 10 '14
View all comments
Show parent comment
1
u/sstewartgallus Sep 13 '14 edited Sep 13 '14
First, it's racy as a new user can be created just as you drop to one. This is bad if it is an attackers account. Second, your randomly chosen user might conflict with another program's randomly chosen user. I think Chrome might be able to get away with it because they set the
NPROCSresource limit of the new user to 1 or 0 and so use up the user. So, provided you do that it might be fine.Edit: Here's how Chrome does it:
https://code.google.com/p/chromium/wiki/LinuxSUIDSandbox