You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
os.getlogin() fails with OSError: [Errno 34] for usernames > 9 characters #135497
It appears that if Python is compiled in an environment without HAVE_MAXLOGNAME but with HAVE_UT_NAMESIZE, getlogin_r will return error 34 if username is >9 characters.
This appears to be a regression introduced in #132751:
The correct header file to search for is sys/param.h, not sys/params.h. As a result, HAVE_UT_NAMESIZE is satisfied (via utmp.h) but HAVE_MAXLOGNAME is not.
Activity
sobolevn commentedon Jun 14, 2025
@alebcay would you like to submit a PR with the fix?
alebcay commentedon Jun 14, 2025
Sure, I'd be happy to.
As far as processes go, should I also regenerateI found https://devguide.python.org/contrib/workflows/regenerate/#regenerate-configure and will use that.configure, and is there a particular command/script I should use for that?pythongh-135497: fix MAXLOGNAME detection in configure
pythongh-135497: fix MAXLOGNAME detection in configure
pythongh-135497: fix MAXLOGNAME detection in configure
pythongh-135497: fix MAXLOGNAME detection in configure
gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (#135508)
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…
[3.13] gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-13…
[3.14] gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-13…
picnixz commentedon Jun 14, 2025
Thank you for the report & the fix!
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…
pythongh-135497: fix `MAXLOGNAME` detection in `configure.ac` (python…