Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-11-30 | transaction: Skip some tests requiring confdir if not available | Marco Trevisan (Treviño) | |
2023-11-30 | transaction_test: Add tests checking the loaded services match | Marco Trevisan (Treviño) | |
2023-11-30 | transaction: Add a test finalizer checking if transaction has ended | Marco Trevisan (Treviño) | |
Check if a transaction is ended in in tests. | |||
2023-11-30 | transaction: Add End() method and Remove Transaction finalizer | Marco Trevisan (Treviño) | |
A PAM transaction needs to be ended in order to release the associated resources, however this can't be sadly automated as the go finalizers run in goroutines and this could cause problems to modules that we load. In fact a module code may be called back during pam_end (to cleanup data for example) and the module code could not be thread safe. So let's make this more manual, but safer. The transaction status is still preserved in the transaction so end will be automatically called with the last-known status. Closes: #14 | |||
2023-11-30 | transaction: Do not make Transaction to implement error interface anymore | Marco Trevisan (Treviño) | |
As per previous commit, Transaction can't be used anymore as an error value, but we instead we always return the status code. | |||
2023-11-30 | transaction: Never return Transaction as error | Marco Trevisan (Treviño) | |
While transaction does implement error, it's not a valid error implementer because it may have bogous values since it's not thread-safe and so we may read the result of Error() when it's into an invalid state As per this never return it as an error, while always return the Status unless when not available, where we still return pam.Error. | |||
2023-11-30 | transaction: Return errors wrapping pam.Error values on failure | Marco Trevisan (Treviño) | |
If the transaction fails during start, there's no way to get the error detail in a programmatic way, so let's wrap the pam.Error to allow more per-type checks. | |||
2023-11-30 | transaction: Add tests for all the possible Status (and error) values | Marco Trevisan (Treviño) | |
Use pam_debug.so to generate pam configurations at test time and check if the returned values expect the ones we want. | |||
2023-09-23 | Run go fmt | Michael Steinert | |
2023-09-19 | transaction_test: Add root-less tests to check pam conversation | Marco Trevisan (Treviño) | |
Use pam_succeed_if to make it implicitly ask for the user name and verify that the provided one is correct. This can safely run as user. | |||
2023-09-19 | transaction_test: Add more authentication tests to run as user | Marco Trevisan (Treviño) | |
So that it's possible also to verify an info text conversation | |||
2023-09-19 | transaction_test: Enable conf-dir tests without root | Marco Trevisan (Treviño) | |
They don't require the `test` user nor being ran as root | |||
2023-09-19 | tests: Move services to a subdirectory | Marco Trevisan (Treviño) | |
It makes it cleaner to handle, plus it allows adding more. Also rename the `my-service` to something more self-explanatory. | |||
2022-09-16 | Integration test for confdir handling. | Didier Roche | |
Add tests to cover StartConfDir with custom services path. | |||
2021-12-03 | Attempt to modernize the repov1.0.0 | Michael Steinert | |
2019-02-15 | Update CI build matrix & fix some lint | Michael Steinert | |
2015-12-04 | Remove dead code | Michael Steinert | |
2015-04-10 | Test some failure conditions | Michael Steinert | |
2015-04-10 | Fix golint warnings | Michael Steinert | |
2015-04-09 | Improve test coverage | Michael Steinert | |
2015-03-30 | Test coverage for SetItem/GetItem | Michael Steinert | |
2015-03-30 | Fix a silly bug and add test coverage | Michael Steinert | |
2015-03-30 | Rework pam_getenvlist so it doesn't leak | Michael Steinert | |
2015-03-29 | Add a test suite | Michael Steinert | |