OPENPAM_READLINE(3)

πŸ“¦
version 14.5 Β· 2 versions
, in freebsd 14.5, nixos 26.05, nixpkgs unstable

okay so this is the OPENPAM_READLINE(3) page from the Library Functions Manual β€” and yes, bestie, we’re reading a line from a file πŸ’–

🌸 NAME 🌸

openpam_readline β€” read a line from a file, literally that’s the whole vibe ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

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

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

πŸŽ€ DESCRIPTION πŸŽ€

🚨 warning, bestie: this function is deprecated and may be removed in a future release without further warning. The openpam_readlinev() function may be used to achieve similar results. no cap, keep that in mind πŸ’…

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

The openpam_readline() function performs a certain amount of processing on the data it reads:

  • Comments (introduced by a hash sign) are stripped. bye-bye comment text πŸ‘‹
  • Blank lines are ignored. not even acknowledged πŸ’€
  • If a line ends in a backslash, the backslash is stripped and the next line is appended. the backslash ate and left no crumbs πŸ“

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). yes, that means you, bestie β€” clean up after yourself 🧚

⭐ RETURN VALUES ⭐

The openpam_readline() function returns NULL on failure. sad girl hours 😭

🌈 SEE ALSO 🌈

πŸ‘‘ STANDARDS πŸ‘‘

The openpam_readline() function is an OpenPAM extension. it’s giving special edition πŸ’…

πŸ’œ AUTHORS πŸ’œ

so the lore is: 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.

The OpenPAM library is maintained by Dag-Erling SmΓΈrgrav <des@des.no>. crown-holding icon energy πŸ‘‘


πŸŽ€ that’s the whole page, bestie β€” source/version: Debian, date: June 27, 2023, manual page: OPENPAM_READLINE(3). periodt πŸ’…βœ¨

πŸ“¦ where this page comes from