msteinert / pam

Go wrapper module for the Pluggable Authentication Modules (PAM) API
http://godoc.org/github.com/msteinert/pam
BSD 2-Clause "Simplified" License
133 stars 36 forks source link

Safer transaction: add End() method and don't use as error #15

Closed 3v1n0 closed 1 year ago

3v1n0 commented 1 year ago

As per discussions we had, Transaction is not fully thread safe and the fact it could be returned as an error makes things worse because its Error() value, that depends on the state could be changed while it's processed.

So:

These are both breaking changes, but would simplify #13 too.

Closes: #14


Note that this also includes #16