Created attachment 16666 [details] proposed patch The pam_wrapper assumes that the PID is smaller than 0xFFFF, which is no longer the case (at least for several years in Linux). This is very similar construct that used to be in libssh too [1] and caused pain there so I would suggest to fix it in very same manner (see attached patch). [1] https://gitlab.com/libssh/libssh-mirror/-/commit/d2a32ca6d3c40483a6d10340d3e11da9259e1379
Created attachment 16667 [details] proposed patch (without unrelated changes)
Filled as a MR in https://gitlab.com/cwrap/pam_wrapper/-/merge_requests/13