Commit Graph

4 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
ac879208ea module-transaction: Add support for binary conversations
A module can now initiate a binary conversation decoding the native
pointer value as it wants.

Added tests to verify the main cases
2023-12-14 22:07:50 +01:00
Marco Trevisan (Treviño)
883dc86533 module-transaction: Add support for initiating PAM Conversations
Modules have the ability to start PAM conversations, so while the
transaction code can handle them we did not have a way to init them.
Yet.

So add some APIs allowing this, making it easier from the go side to
handle the conversations.

In this commit we only support text-based conversations, but code is
designed with the idea of supporting binary cases too.

Added the integration tests using the module that is now able to both
start conversation and handle them using Go only.
2023-12-14 22:07:50 +01:00
Marco Trevisan (Treviño)
7a073f5ba0 module-transaction: Add support for setting/getting module data
Module data is data associated with a module handle that is available
for the whole module loading time so it can be used also during
different operations.

We use cgo handles to preserve the life of the go objects so any value
can be associated with a pam transaction.
2023-12-14 22:07:50 +01:00
Marco Trevisan (Treviño)
4b39bd8e11 transaction: Define C functions as unexported static inlines
This will make it easier to avoid exporting unexpected symbols to the
generated PAM libraries.

Also it makes less messy handling C code inside go files.
2023-12-14 22:07:50 +01:00