Page MenuHomeFreeBSD

D43376.diff
No OneTemporary

D43376.diff

diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -110,6 +110,8 @@
/* Buffer for signal handling of timeout */
static jmp_buf timeout_buf;
+char pwbuf[1024];
+struct passwd pwres;
struct passwd *pwd;
static int failures;
@@ -315,7 +317,7 @@
bail(NO_SLEEP_EXIT, 1);
}
- pwd = getpwnam(username);
+ (void)getpwnam_r(username, &pwres, pwbuf, sizeof(pwbuf), &pwd);
if (pwd != NULL && pwd->pw_uid == 0)
rootlogin = 1;
@@ -338,7 +340,7 @@
(void)setpriority(PRIO_PROCESS, 0, 0);
}
- if (pwd && rval == 0)
+ if (pwd != NULL && rval == 0)
break;
pam_cleanup();

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 23, 3:12 PM (21 m, 59 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28959366
Default Alt Text
D43376.diff (679 B)

Event Timeline