Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different CapBnd with libcap-ng #982

Open
mruprich opened this issue Mar 17, 2022 · 3 comments
Open

Different CapBnd with libcap-ng #982

mruprich opened this issue Mar 17, 2022 · 3 comments

Comments

@mruprich
Copy link
Contributor

Probably not a bug, I just wanted to ask this question. Having libcap-ng when building tcpdump means that when privileges are dropped, CapBnd are different than when libcap-ng is not in the system. Basically when using just initgroups and setgid and setuid, CapBnd are 000001ffffffffff, with libcap-ng are all zeroed out.

I am not sure whether I should expect both cases to have the same CapBnd or is it just that without libcap-ng it is much more complicated to drop the Bnd?

Thanks,
Michal

@infrastation
Copy link
Member

At a glance this difference does not immediately look out of place: if it was practicable to drop as many privileges without the library, it would likely be already done without the library. Of course, it would take a longer look into the documentation to tell with confidence.

@mruprich
Copy link
Contributor Author

@infrastation Hi, thanks, so do I understand this correctly, that the situation with libcap-ng is actually better because more privileges are dropped and that is desirable?

@infrastation
Copy link
Member

That's my understanding, although I cannot recall a use case that would require me to flex or to verify individual capabilities. @msekletar added support for libcap-ng 10 years ago in commit 19bb00a, it was refined a number of times since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants