News for hackers. Stuff that matters.
Re:Capsudo: Rethinking Sudo with Object Capabilities by PunchyHamster on Friday December 12, 2025 @07:28PM (#46250728)
That's functionally equivalent to using sudo but only allowing a certain shell script that's a wrapper for what needs to be done by a given user (to avoid the whole syntax mess). But somehow with more boilerplate.
Re:Capsudo: Rethinking Sudo with Object Capabilities by ryukafalz on Friday December 12, 2025 @07:55PM (#46250889)
If I'm a user who's been given access to run such a wrapper script via sudo, how do I further delegate that access?
Re:Capsudo: Rethinking Sudo with Object Capabilities by LiamPowell on Friday December 12, 2025 @08:05PM (#46250955)
You can probably use a copy of sudo owned by a non-root user, but I can't say I've ever tried that. You can also just write another setuid shell script.
Re:Capsudo: Rethinking Sudo with Object Capabilities by thwarted on Friday December 12, 2025 @10:47PM (#46251804)
What's missing in this writeup is if/how capsudod can be configured to drop/acquire capabilities (in the capabilities(7) sense, in a namespace sense, or using openbsd's pledge(2)) before executing the command. From looking at the code it seems to rely on filesystem permissions to access the capsudod socket; when in order to make mounting USB drives actually safe via this kind of permission proxying method, you'd want to only give it very limited access to operations, like only the ability to make the mount(2) syscall. I generally agree, this is sudo in a different format and with a daemon; perhaps that's better. And it's written in C, which doesn't speak to avoiding the classic C-related privilege escalation risks (although this is a small amount of code compared to sudo).