Пример #1
0
// SetCred is used to establish, maintain and delete the credentials of a
// user.
//
// Valid flags: EstablishCred, DeleteCred, ReinitializeCred, RefreshCred
func (t *Transaction) SetCred(f Flags) error {
	t.status = C.pam_setcred(t.handle, C.int(f))
	if t.status != C.PAM_SUCCESS {
		return t
	}
	return nil
}
Пример #2
0
// pam_setcred
func (t *Transaction) SetCred(flags int) int {
	return int(C.pam_setcred(t.handle, C.int(flags)))
}