PAM_SETENV(3)
hiii bestie π welcome to the PAM_SETENV(3) page, aka the Library Functions Manual entry for the function that literally mirrors setenv(3). itβs giving βenvironment variable but make it PAM,β and weβre gonna get into it. β¨
π NAME π
pam_setenv β literally mirrors setenv(3). π«Ά
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <security/pam_appl.h>
int
pam_setenv(pam_handle_t *pamh, const char *name, const char *value,
int overwrite);
π¦ DESCRIPTION π¦
okay so pam_setenv() sets an environment variable. its semantics are similar to those of setenv(3), but hereβs the plot twist: it modifies the PAM contextβs environment list instead of the applicationβs. π
β¨ RETURN VALUES β¨
the pam_setenv() function returns one of the following values:
[PAM_SUCCESS]β Success. π[PAM_BUF_ERR]β Memory buffer error. π[PAM_SYSTEM_ERR]β System error. π
π SEE ALSO π
the whole friend group: pam(3), pam_getenv(3), pam_getenvlist(3), pam_putenv(3), pam_strerror(3), setenv(3). iykyk. π
π STANDARDS π
the pam_setenv() function is an OpenPAM extension. periodt. π
π«Ά AUTHORS π«Ά
credit where credit is due, bestie: the pam_setenv() 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. π«Ά
The OpenPAM library is maintained by Dag-Erling SmΓΈrgrav <des@des.no>. π
mwah π stay hydrated and may your buffers never overflow β this is the Debian build, dated June 27, 2023, for PAM_SETENV(3). π
π¦ 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