Main index | Section 3 | Options |
#include <sys/types.h>
#include <stdio.h>
#include <security/pam_appl.h>
#include <security/openpam.h>
A word is a sequence of non-whitespace characters. However, whitespace characters can be included in a word if quoted or escaped according to the following rules:
In addition, if the first non-whitespace character on the line is a hash character (#), the rest of the line is discarded. If a hash character occurs within a word, however, it is preserved as-is. A backslash at the end of a comment does cause line continuation.
If lineno is not NULL, the integer variable it points to is incremented every time a quoted or escaped newline character is read.
If lenp is not NULL, the length of the word (after quotes and backslashes have been removed) is stored in the variable it points to.
The caller is responsible for releasing the returned buffer by passing it to free(3).
If openpam_readword() reaches the end of the line or file before any characters are copied to the word, it returns NULL. In the former case, the newline is pushed back to the file.
If openpam_readword() reaches the end of the file while a quote or backslash escape is in effect, it sets errno to EINVAL and returns NULL.
OPENPAM_READWORD (3) | June 27, 2023 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.