*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> openpam_readline (3)              



NAME    [Toc]    [Back]

     openpam_readline -- read a line from a file

LIBRARY    [Toc]    [Back]

     PAM Library (libpam, -lpam)

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <security/pam_appl.h>
     #include <security/openpam.h>

     char *
     openpam_readline(FILE *f, int *lineno, size_t *lenp);

DESCRIPTION    [Toc]    [Back]

     The openpam_readline function reads a line from a file, and returns it in
     a NUL-terminated buffer allocated with malloc(3).

     The openpam_readline function performs a certain amount of processing on
     the data it reads.  Comments (introduced by a hash sign) are stripped, as
     is leading and trailing whitespace.  Any amount of linear whitespace is
     collapsed to a single space.  Blank lines are ignored.  If a line ends in
     a backslash, the backslash is stripped and the next line is appended.

     If lineno is not NULL, the integer variable it points to is incremented
     every time a newline character is read.

     If lenp is not NULL, the length of the line (not including the terminating
 NUL character) is stored in the variable it points to.

     The caller is responsible for releasing the returned buffer by passing it
     to free(3).

RETURN VALUES    [Toc]    [Back]

     The openpam_readline function returns NULL on failure.

SEE ALSO    [Toc]    [Back]

     free(3), malloc(3), pam(3)

STANDARDS    [Toc]    [Back]

     The openpam_readline function is an OpenPAM extension.

AUTHORS    [Toc]    [Back]

     The openpam_readline 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.

FreeBSD 5.2.1                    July 15, 2003                   FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
line IRIX read one line
read HP-UX read a line from standard input
read IRIX read a line from standard input
line HP-UX read one line from user input
edit Tru64 Edits a file line by line with a simplified command set
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
e Tru64 Edits a file line by line
ed Tru64 Edits a file line by line
red Tru64 Edits a file line by line
ldfhread Tru64 read the file header of a common object file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service