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 commented on Jun 14, 2025
@alebcay would you like to submit a PR with the fix?
alebcay commented on Jun 14, 2025
Sure, I'd be happy to. As far as processes go, should I also regenerate configure, and is there a particular command/script I should use for that? I found https://devguide.python.org/contrib/workflows/regenerate/#regenerate-configure and will use 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 commented on 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…