heimdal/heimdal — pull request #81 by riton (2014-04-09 14:57:29+00:00)
Title: Proposal for dropping capabilities in kpasswdd

KDC daemon already support dropping capabilities (using capng if available).

This patch only moves function `kdc/main/switch_environment()` to `lib/base/heimbase/heim_switch_environment()`.

This way, KDC and KPASSWDD daemons share the same routine to manage their privileges.
It also allows KPASSWDD to be run as a non-root user while using standard port (which is quite important for us).

I don't know if `heimbase` is the best place to put this _common_ code but I didn't have any better idea at the moment.