gh-127081: use getlogin_r if available - #132751
Conversation
The getlogin function is not thread-safe: replace with getlogin_r where available. Note that this function is untested (unit test is skipped with a note it caused CI failures as behaviour differs between NIX environments).
getlogin_r if available
…at order) if available, falling back to a hard-coded maximum login name length of 255 if neither is available.
ZeroIntensity
left a comment
There was a problem hiding this comment.
This should get a test case.
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit 675342c 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132751%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
colesbury
left a comment
There was a problem hiding this comment.
This LGTM assuming the build bots pass
|
Buildbot failures look unrelated to me. |
|
Thanks @duaneg for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @duaneg for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
The `getlogin` function is not thread-safe: replace with `getlogin_r` where available. (cherry picked from commit 1ffe913) Co-authored-by: Duane Griffin <duaneg@dghda.com>
|
Sorry, @duaneg and @colesbury, I could not cleanly backport this to |
|
GH-135097 is a backport of this pull request to the 3.14 branch. |
The `getlogin` function is not thread-safe: replace with `getlogin_r` where available. (cherry picked from commit 1ffe913) Co-authored-by: Duane Griffin <duaneg@dghda.com>
|
GH-135098 is a backport of this pull request to the 3.13 branch. |
The `getlogin` function is not thread-safe: replace with `getlogin_r` where available.
The `getlogin` function is not thread-safe: replace with `getlogin_r` where available.
The `getlogin` function is not thread-safe: replace with `getlogin_r` where available.

The getlogin function is not thread-safe: replace with getlogin_r where available.
Note that this function is untested (unit test is skipped with a note it caused CI failures as behaviour differs between NIX environments).