Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/lib/libpam/modules/pam_nologin Pull up revision 1.5 (requ...
details: https://anonhg.NetBSD.org/src/rev/49f0ad211fc5
branches: netbsd-3
changeset: 576549:49f0ad211fc5
user: tron <tron%NetBSD.org@localhost>
date: Mon Jul 11 11:19:40 2005 +0000
description:
Pull up revision 1.5 (requested by lukem in ticket #539):
check for pwd != in getpw*_r functions.
diffstat:
lib/libpam/modules/pam_nologin/pam_nologin.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r ae33074956c7 -r 49f0ad211fc5 lib/libpam/modules/pam_nologin/pam_nologin.c
--- a/lib/libpam/modules/pam_nologin/pam_nologin.c Mon Jul 11 11:19:34 2005 +0000
+++ b/lib/libpam/modules/pam_nologin/pam_nologin.c Mon Jul 11 11:19:40 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pam_nologin.c,v 1.3.2.1 2005/04/04 17:55:24 tron Exp $ */
+/* $NetBSD: pam_nologin.c,v 1.3.2.2 2005/07/11 11:19:40 tron Exp $ */
/*-
* Copyright 2001 Mark R V Murray
@@ -40,7 +40,7 @@
#ifdef __FreeBSD__
__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_nologin/pam_nologin.c,v 1.10 2002/04/12 22:27:21 des Exp $");
#else
-__RCSID("$NetBSD: pam_nologin.c,v 1.3.2.1 2005/04/04 17:55:24 tron Exp $");
+__RCSID("$NetBSD: pam_nologin.c,v 1.3.2.2 2005/07/11 11:19:40 tron Exp $");
#endif
@@ -92,7 +92,8 @@
* Do not allow login of unexisting users, so that a directory
* failure will not cause the nologin capability to be ignored.
*/
- if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0) {
+ if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
+ pwd == NULL) {
return PAM_USER_UNKNOWN;
} else {
if (pwd->pw_uid == 0)
Home |
Main Index |
Thread Index |
Old Index