PWQUERY(3X)

NAME
pwquery, pexpw - password services

SYNOPSIS
pwquery(fd, name, param)
char *name;
char *param;

char *pexpw(fd, prompt)
char *prompt;

DESCRIPTION
Pwquery calls upon the password server, pwserv(8) to cause a password to be demanded from file descriptor fd and checked against the password for the named user. It is loaded by option -lipc of ld(1).

Echoing is disabled during the transaction, and the server is persnickety about when to use an Atalla challenge/response dialogue and when to use crypt(3)-style passwords. A negative return value indicates a protocol error in reaching the server or that the server is not trusted. A zero return value indicates rejection of the password. A positive return value indicates approval of the password.

The argument param may be zero (for vanilla password service) or may point to a blank-separated list of one or more keywords. Currently only one keyword is understood:

pex Reject the password if the stream is unpexable.

Pexpw reads a password from the indicated file descriptor, after prompting with the null-terminated string prompt and disabling echoing. A pointer is returned to a null-terminated string of at most 8 characters. The dialogue is not attempted if it cannot be protected from eavesdropping by the process-exclusive mechanism of pex(4).

FILES

SEE ALSO
ipc(3), getpass(3), pex(4) pwserv(8)

BUGS
Pexpw returns a pointer to static memory that is overwritten at every call.