Function bsd_auth_sys::auth_userokay[][src]

pub unsafe extern "C" fn auth_userokay(
    _name: *mut c_char,
    _style: *mut c_char,
    _type: *mut c_char,
    _password: *mut c_char
) -> c_int
Expand description

Provides a single function interface to a BSD Authentication session

From authenticate(3):

Provided with a user's name in `name`, and an optional `style`, `type`, and `password`, the
`auth_userokay()` function returns a simple yes/no response. A return value of 0 implies
failure; a non-zero return value implies success. If `style` is not NULL, it specifies the
desired style of authentication to be used. If it is NULL then the default style for the
user is used. In this case, `name` may include the desired style by appending it to the
user's name with a single colon (':') as a separator. If `type` is not NULL then it is used
as the authentication type (such as "auth-myservice"). If `password` is NULL then
`auth_userokay()` operates in an interactive mode with the user on standard input, output,
and error. If `password` is specified, `auth_userokay()` operates in a non-interactive mode
and only tests the specified passwords. This non-interactive method does not work with
challenge-response authentication styles. For security reasons, when a `password` is
specified, `auth_userokay()` will zero out its value before it returns.