OPENPAM_BORROW_CRED(3)
π NAME π
okay bestie, welcome to the OPENPAM_BORROW_CRED(3) page from the Library Functions Manual π this is all about openpam_borrow_cred β temporarily borrow user credentials. yes, it's giving identity-swap side quest, and it's lowkey iconic β¨
β¨ SYNOPSIS β¨
bestie, here's the exact summoning circle π―οΈ
#include <sys/types.h>
#include <security/pam_appl.h>
#include <security/openpam.h>
int
openpam_borrow_cred(pam_handle_t *pamh, const struct passwd *pwd);
π¦ DESCRIPTION π¦
The openpam_borrow_cred() function saves the current credentials and switches to those of the user specified by its pwd argument. The affected credentials are the effective UID, the effective GID, and the group access list. no cap, those are the three things getting swapped π«Ά
The original credentials can be restored using openpam_restore_cred(3) β and yes, you should give them back, bestie π
π RETURN VALUES π
openpam_borrow_cred() returns one of the following values:
PAM_SUCCESSβ Success πPAM_BUF_ERRβ Memory buffer error πPAM_PERM_DENIEDβ Permission denied πPAM_SYSTEM_ERRβ System error π
πΈ SEE ALSO πΈ
go read these next, iykyk π
β STANDARDS β
The openpam_borrow_cred() function is an OpenPAM extension. periodt. π
π AUTHORS π
The openpam_borrow_cred() function and this manual page were developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (βCBOSSβ), as part of the DARPA CHATS research program. historical icon behavior, fr fr π«Ά
The OpenPAM library is maintained by Dag-Erling SmΓΈrgrav <des@des.no>. bow down to the maintainer π
mwah π β source/version: Debian; date: June 27, 2023; page: OPENPAM_BORROW_CRED(3). bye bestie π«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- nixos 26.05: openpam 20230627
- nixpkgs unstable: openpam 20230627
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms