From eeeb216451ebda4c100167497e831ef693ceaa85 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Mon, 14 Nov 2016 01:00:50 -0500 Subject: [PATCH] Restore unconditional use of getpwent vs. non-POSIX getpwent_r --- lib/libedit/src/readline.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libedit/src/readline.c b/lib/libedit/src/readline.c index fd25c0164..70ff6b03d 100644 --- a/lib/libedit/src/readline.c +++ b/lib/libedit/src/readline.c @@ -1784,11 +1784,7 @@ username_completion_function(const char *text, int state) setpwent(); while ( -#if defined(HAVE_GETPW_R_POSIX) || defined(HAVE_GETPW_R_DRAFT) - getpwent_r(&pwres, pwbuf, sizeof(pwbuf), &pass) == 0 && pass != NULL -#else (pass = getpwent()) != NULL -#endif && text[0] == pass->pw_name[0] && strcmp(text, pass->pw_name) == 0) continue;