mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-127081: use getlogin_r
if available (gh-132751)
The `getlogin` function is not thread-safe: replace with `getlogin_r` where available.
This commit is contained in:
parent
54ca55978e
commit
1ffe913c20
5 changed files with 79 additions and 1 deletions
14
configure.ac
14
configure.ac
|
@ -5219,7 +5219,7 @@ AC_CHECK_FUNCS([ \
|
|||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \
|
||||
getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \
|
||||
getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin getlogin_r \
|
||||
getpeername getpgid getpid getppid getpriority _getpty \
|
||||
getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \
|
||||
getspnam getuid getwd grantpt if_nameindex initgroups kill killpg lchown linkat \
|
||||
|
@ -5538,6 +5538,18 @@ PY_CHECK_FUNC([setgroups], [
|
|||
#endif
|
||||
])
|
||||
|
||||
AC_CHECK_DECL([MAXLOGNAME],
|
||||
[AC_DEFINE([HAVE_MAXLOGNAME], [1],
|
||||
[Define if you have the 'MAXLOGNAME' constant.])],
|
||||
[],
|
||||
[@%:@include <sys/params.h>])
|
||||
|
||||
AC_CHECK_DECLS([UT_NAMESIZE],
|
||||
[AC_DEFINE([HAVE_UT_NAMESIZE], [1],
|
||||
[Define if you have the 'HAVE_UT_NAMESIZE' constant.])],
|
||||
[],
|
||||
[@%:@include <utmp.h>])
|
||||
|
||||
# check for openpty, login_tty, and forkpty
|
||||
|
||||
AC_CHECK_FUNCS([openpty], [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue