Bug 14747 - pam_wrapper does not accept PIDs > 0xFFFF
Summary: pam_wrapper does not accept PIDs > 0xFFFF
Status: NEW
Alias: None
Product: cwrap
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-24 08:28 UTC by Jakub Jelen
Modified: 2021-06-25 07:51 UTC (History)
0 users

See Also:


Attachments
proposed patch (1.03 KB, text/plain)
2021-06-24 08:28 UTC, Jakub Jelen
no flags Details
proposed patch (without unrelated changes) (972 bytes, patch)
2021-06-24 08:34 UTC, Jakub Jelen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelen 2021-06-24 08:28:04 UTC
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
Comment 1 Jakub Jelen 2021-06-24 08:34:24 UTC
Created attachment 16667 [details]
proposed patch (without unrelated changes)
Comment 2 Jakub Jelen 2021-06-24 16:55:55 UTC
Filled as a MR in https://gitlab.com/cwrap/pam_wrapper/-/merge_requests/13