module-transaction: Do not allow parallel conversations by default
Pam conversations per se may also run in parallel, but this implies that the application supports this. Since this normally not the case, do not create modules that may invoke the pam conversations in parallel by default, adding a mutex to protect such calls.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Code generated by "pam-moduler -type integrationTesterModule"; DO NOT EDIT.
|
||||
// Code generated by "pam-moduler -type integrationTesterModule -parallel-conv"; DO NOT EDIT.
|
||||
|
||||
//go:generate go build "-ldflags=-extldflags -Wl,-soname,pam_go.so" -buildmode=c-shared -o pam_go.so -tags go_pam_module
|
||||
|
||||
@@ -43,7 +43,7 @@ func handlePamCall(pamh *C.pam_handle_t, flags C.int, argc C.int,
|
||||
return C.int(pam.ErrIgnore)
|
||||
}
|
||||
|
||||
mt := pam.NewModuleTransactionInvoker(pam.NativeHandle(pamh))
|
||||
mt := pam.NewModuleTransactionInvokerParallelConv(pam.NativeHandle(pamh))
|
||||
err := mt.InvokeHandler(moduleFunc, pam.Flags(flags),
|
||||
sliceFromArgv(argc, argv))
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user