OPENPAM_BORROW_CRED(3)

πŸ“¦
version 14.5 Β· 2 versions
, in freebsd 14.5, nixos 26.05, nixpkgs unstable

πŸ’– 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