Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102795280
D43423.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
518 B
Referenced Files
None
Subscribers
None
D43423.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
@@ -704,8 +704,10 @@
pam_err = pam_get_item(pamh, PAM_USER, &item);
if (pam_err == PAM_SUCCESS) {
tmpl_user = (const char *)item;
- if (strcmp(username, tmpl_user) != 0)
- pwd = getpwnam(tmpl_user);
+ if (strcmp(username, tmpl_user) != 0) {
+ (void)getpwnam_r(tmpl_user, &pwres, pwbuf,
+ sizeof(pwbuf), &pwd);
+ }
} else {
pam_syslog("pam_get_item(PAM_USER)");
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 7:20 AM (18 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14692509
Default Alt Text
D43423.diff (518 B)
Attached To
Mode
D43423: login: Missed an instance of getpwnam().
Attached
Detach File
Event Timeline
Log In to Comment