The modern POSIX capabilities model

Consider this (fictional) scenario: Vidya is on a project developing a Linux application for Alan and his team. She is working on a component that captures network packets and saves them to a file (for later analysis). The program is called packcap. However, to successfully capture the network packets, packcap must run with root privileges. Now, Vidya understands that running applications as  root is not a good security practice; not only that, she knows the customer will not accept the statement: Oh, it didn't work? You must run it logged in as a root or via sudo. Running it via sudo(8) might sound reasonable, but, when you stop to think about it, that implies that every member of Alan's team must be given the root password, and this is simply not acceptable.

So, how does she solve the problem? The answer suddenly jumps out at her: Make the packcap binary executable a setuid-root file; this way, when it's launched, the process will be running with root privileges, so there will be no need for a root login/password or sudo. Sounds fantastic.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset