pam_setcred
Name
pam_setcred -- set the module-specific credentials of the user
Synopsis
#include <security/pam_appl.h> |
extern int
pam_setcred
(pam_handle_t
*pamh, int
flags);
Description
pam_setcred sets the module-specific credentials of
the user. It is usually called after the user has been authenticated,
after the account management function has been called and after a
session has been opened for the user.
flags maybe specified from among the following
values:
- PAM_ESTABLISH_CRED
set credentials for the authentication service
- PAM_DELETE_CRED
delete credentials associated with the authentication service
- PAM_REINITIALIZE_CRED
reinitialize the user credentials
- PAM_REFRESH_CRED
extend lifetime of the user credentials
Additionally, the value of flags may be
logically OR'd with PAM_SILENT.
Return Value
- PAM_SUCCESS
Success.
- PAM_CRED_UNAVAIL
Module cannot retrieve the user's credentials.
- PAM_CRED_EXPIRED
User's credentials have expired.
- PAM_USER_UNKNOWN
User is not known to an authentication module.
- PAM_CRED_ERR
Module was unable to set the credentials of the user.
Errors
May be translated to text with pam_strerror.