Exemplo n.º 1
0
int
pam_chauthtok(pam_handle_t *pamh,
	int flags)
{
	int r;

	ENTER();
	if (flags & ~(PAM_SILENT|PAM_CHANGE_EXPIRED_AUTHTOK))
		RETURNC(PAM_SYMBOL_ERR);
	r = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK,
	    flags | PAM_PRELIM_CHECK);
	if (r == PAM_SUCCESS)
		r = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK,
		    flags | PAM_UPDATE_AUTHTOK);
	pam_set_item(pamh, PAM_OLDAUTHTOK, NULL);
	pam_set_item(pamh, PAM_AUTHTOK, NULL);
	RETURNC(r);
}
Exemplo n.º 2
0
int
pam_acct_mgmt(pam_handle_t *pamh,
	int flags)
{
	int r;

	ENTER();
	r = openpam_dispatch(pamh, PAM_SM_ACCT_MGMT, flags);
	RETURNC(r);
}
Exemplo n.º 3
0
int
pam_open_session(pam_handle_t *pamh,
	int flags)
{
	int r;

	ENTER();
	if (flags & ~(PAM_SILENT))
		RETURNC(PAM_SYMBOL_ERR);
	r = openpam_dispatch(pamh, PAM_SM_OPEN_SESSION, flags);
	RETURNC(r);
}
Exemplo n.º 4
0
int
pam_authenticate(pam_handle_t *pamh,
	int flags)
{
	int r;

	ENTER();
	if (flags & ~(PAM_SILENT|PAM_DISALLOW_NULL_AUTHTOK))
		RETURNC(PAM_SYMBOL_ERR);
	r = openpam_dispatch(pamh, PAM_SM_AUTHENTICATE, flags);
	pam_set_item(pamh, PAM_AUTHTOK, NULL);
	RETURNC(r);
}
Exemplo n.º 5
0
int
pam_setcred(pam_handle_t *pamh,
	int flags)
{
	int r;

	ENTER();
	if (flags & ~(PAM_SILENT|PAM_ESTABLISH_CRED|PAM_DELETE_CRED|
		PAM_REINITIALIZE_CRED|PAM_REFRESH_CRED))
		RETURNC(PAM_SYMBOL_ERR);
	/* XXX enforce exclusivity */
	r = openpam_dispatch(pamh, PAM_SM_SETCRED, flags);
	RETURNC(r);
	/*NOTREACHED*/
}