Exemplo n.º 1
0
// Ends a PAM transaction.  From Linux-PAM documentation: "The [status] argument
// should be set to the value returned by the last PAM library call."
//
// This may return SUCCESS, or SYSTEM_ERR.
//
// This *must* be called on any Transaction successfully returned by Start() or
// you will leak memory.
func (t *Transaction) End(status int) {
	C.pam_end(t.handle, C.int(status))
	C.free(unsafe.Pointer(t.conv.cconv))
}
Exemplo n.º 2
0
// transactionFinalizer cleans up the PAM handle and deletes the callback
// function.
func transactionFinalizer(t *Transaction) {
	C.pam_end(t.handle, t.status)
	cbDelete(t.c)
}
Exemplo n.º 3
0
// Finalize a PAM transaction.
func transactionFinalizer(t *Transaction) {
	C.pam_end(t.handle, t.status)
	C.free(unsafe.Pointer(t.conv.conv))
}