Authentication Management (Cont.) Function: PAM_EXTERN int pam_sm_setcred(pam_handle_t* pamh, int flags, int argc, const char** argv); Macro used: PAM_SM_AUTH The function alters the credentials of the user. This info comes in addition to the authentication token, e.g. a kerberos ticket. This function be called only after the user has been authenticated, and after a session was established. The return value of the function should match the value returned by the pam_sm_authenticate function, to preserve the order of modules being consulted by the pam library. 'flags' may contain any of the following values, possibly OR'd with PAM_SILENT: PAM_ESTABLISH_CRED - set the credentials for the authentication service. PAM_DELETE_CRED - delete the credentials associated with the authenticatin service. PAM_REINITIALIZE_CRED - reinitialize the user's credentials. PAM_REFRESH_CRED - extend the lifetime of the user's credentials.