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
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.
Bug report
Bug description:
It appears that if Python is compiled in an environment without
HAVE_MAXLOGNAMEbut withHAVE_UT_NAMESIZE,getlogin_rwill return error 34 if username is >9 characters.This appears to be a regression introduced in #132751:
https://github.com/duaneg/cpython/blob/675342cf59ffe53337d92af989b97dad687a10ea/configure.ac#L5434
The correct header file to search for is
sys/param.h, notsys/params.h. As a result,HAVE_UT_NAMESIZEis satisfied (viautmp.h) butHAVE_MAXLOGNAMEis not.This was originally reported to Homebrew via Homebrew/homebrew-core#226857.
CPython versions tested on:
3.15
Operating systems tested on:
macOS
Linked PRs
MAXLOGNAMEdetection inconfigure.ac(GH-135508) #135516MAXLOGNAMEdetection inconfigure.ac(GH-135508) #135517