Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145647645
D43376.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
679 B
Referenced Files
None
Subscribers
None
D43376.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D43376: login: Use getpwnam_r() instead of getpwnam().
Attached
Detach File
Event Timeline
Log In to Comment