|
NAMEopenpam_straddch —
add a character to a string, expanding the buffer if
needed
SYNOPSIS#include <sys/types.h>
#include <security/pam_appl.h>
#include <security/openpam.h>
int
DESCRIPTIONTheopenpam_straddch () function appends a character to a
dynamically allocated NUL-terminated buffer, reallocating the buffer as
needed.
The str argument points to a variable
containing either a pointer to an existing buffer or
The size and len argument point to variables used to hold the size of the buffer and the length of the string it contains, respectively. The final argument, ch, is the character that should be appended to the string. If ch is 0, nothing is appended, but a new buffer is still allocated if str is NULL. This can be used to “bootstrap” the string. If a new buffer is allocated or an existing buffer is reallocated to make room for the additional character, str and size are updated accordingly. The If the RETURN VALUESTheopenpam_straddch () function returns 0 on success and
-1 on failure.
SEE ALSOpam(3), pam_strerror(3)STANDARDSTheopenpam_straddch () function is an OpenPAM extension.
AUTHORSTheopenpam_straddch () function and this manual page
were developed by Dag-Erling Smørgrav
<des@des.no>.
Visit the GSP FreeBSD Man Page Interface. |