I have written a pam module using Golang and C, similar to https://github.com/uber/pam-ussh. I am noticing an issue with the signal handler of Golang even though my PAM module is never called to authenticate.
In strace output, I can see that all modules defined in /etc/pam.d/sudo is being opened, so I want to understand what does a shared object created using CGO do when loaded?
Tried strace and see that it creates a new child process using clone() although I am not sure why. I would have thought that unless the method pam_sm_authenticate is called, my shared object shouldn't do anything.