summaryrefslogtreecommitdiff
path: root/src/providers/krb5/krb5_become_user.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-24Include header file in implementation module.Lukas Slebodnik1-0/+1
Declarations of public functions was in header files, but header files was not included in implementation file.
2013-09-11Fix formating of variables with type: gid_tLukas Slebodnik1-1/+1
2013-09-11Fix formating of variables with type: uid_tLukas Slebodnik1-2/+3
2013-09-09krb5: Add calls to change and restore credentialsSimo Sorce1-0/+125
In some cases we want to temporarily assume user credentials but allow the process to regain back the original credentials (normally regaining uid 0). Related: https://fedorahosted.org/sssd/ticket/2061
2013-04-05Further restrict become_user drop of privileges.Simo Sorce1-15/+18
We never need to regain root after we call become_user() so tighten up even further our privilege drop. Add a setgroups() call to remove all secondary groups root may have been given for whateve reason. Then use the setres[ug]id function to also drop the saved uid/gid so the process cannot regain back root id. Capabilities are also implicitly dropped here, no more CAP_SETUID so this is a Point of No Return, once changed to non-root the process can't get back. Remove redefinition of sys/types.h and unistd.h, they are already defined in util.h and they need to be included after _GNU_SOURCE/_BSD_SOURCE is defined or the prototypes for setres[ug]id will not be found. Add grp.h after util.h for the same reason.
2012-11-26Save errno before it might be modified.Simo Sorce1-8/+16
The DEBUG() macro may, at any time, change and start calling functions that touch errno. Save errno before logging and then return the saved error.
2012-06-14Add a credential cache back end structureJakub Hrozek1-1/+1
To be able to add support for new credential cache types easily, this patch creates a new structure sss_krb5_cc_be that defines common operations with a credential cache, such as create, check if used or remove.
2010-02-18Rename server/ directory to src/Stephen Gallagher1-0/+61
Also update BUILD.txt