1 .\" Generated from openpam_subst.c by gendoc.pl
2 .\" $OpenPAM: openpam_subst.c 938 2017-04-30 21:34:42Z des $
8 .Nd substitute PAM item values in a string
11 .In security/pam_appl.h
12 .In security/openpam.h
14 .Fn openpam_subst "const pam_handle_t *pamh" "char *buf" "size_t *bufsize" "const char *template"
18 function expands a string, substituting PAM item
19 values for all occurrences of specific substitution codes.
22 argument points to the initial string.
23 The result is stored in the buffer pointed to by the
27 argument specifies the size of that buffer.
28 The actual size of the resulting string, including the terminating NUL
29 character, is stored in the location pointed to by the
35 is NULL, or if the buffer is too small to hold the expanded
38 is updated to reflect the amount of space required to
39 hold the entire string, and
46 fails for any other reason, the
49 untouched, but part of the buffer may still have been overwritten.
51 Substitution codes are introduced by a percent character and correspond
55 Replaced by the current value of the
59 Replaced by the current value of the
63 Replaced by the current value of the
67 Replaced by the current value of the
71 Replaced by the current value of the
75 Replaced by the current value of the
82 function returns one of the following values:
86 .It Bq Er PAM_BAD_ITEM
87 Unrecognized or restricted item.
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 Mt des@des.no .