1 .\" Generated from openpam_subst.c by gendoc.pl
2 .\" $Id: openpam_subst.c 648 2013-03-05 17:54:27Z des $
8 .Nd substitute PAM item values in a string
13 .In security/pam_appl.h
14 .In security/openpam.h
16 .Fn openpam_subst "const pam_handle_t *pamh" "char *buf" "size_t *bufsize" "const char *template"
20 function expands a string, substituting PAM item
21 values for all occurrences of specific substitution codes.
24 argument points to the initial string.
25 The result is stored in the buffer pointed to by the
29 argument specifies the size of that buffer.
30 The actual size of the resulting string, including the terminating NUL
31 character, is stored in the location pointed to by the
37 is NULL, or if the buffer is too small to hold the expanded
40 is updated to reflect the amount of space required to
41 hold the entire string, and
48 fails for any other reason, the
51 untouched, but part of the buffer may still have been overwritten.
53 Substitution codes are introduced by a percent character and correspond
57 Replaced by the current value of the
61 Replaced by the current value of the
65 Replaced by the current value of the
69 Replaced by the current value of the
73 Replaced by the current value of the
77 Replaced by the current value of the
84 function returns one of the following values:
86 .It Bq Er PAM_SYSTEM_ERR
88 .It Bq Er PAM_TRY_AGAIN
93 .Xr pam_get_authtok 3 ,
100 function is an OpenPAM extension.
104 function and this manual page were
106 .An Dag-Erling Sm\(/orgrav Aq des@des.no .