BSD-style securelevel comes to Linux — again
Posted Sep 19, 2013 21:29 UTC (Thu) by
mm7323 (guest, #87386)
In reply to:
BSD-style securelevel comes to Linux — again by giraffedata
Parent article:
BSD-style securelevel comes to Linux — again
I've always rejected the concept of a program dropping privileges, and I run systems in which untrusted programs never do that and instead receive an environment with only the capabilities they need.
Being able to drop caps can be useful to programs which may startup, perform some privileged actions, then drop the caps that aren't needed.
The simplest example would be a server process that wished to bind to a low port (<1024) using CAP_NET_BIND_SERVICE. Once the bind() is done, the capability can be dropped, but the already obtained file descriptor for the socket stands and can still be used.
There are other ways this could be done, but using libcap to drop capabilities at the right time is straight forward to implement.
(
Log in to post comments)