Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpam/modules use login_getpwclass() everywhere for con...
details: https://anonhg.NetBSD.org/src/rev/c921491ba2d4
branches: trunk
changeset: 787500:c921491ba2d4
user: christos <christos%NetBSD.org@localhost>
date: Thu Jun 20 20:54:52 2013 +0000
description:
use login_getpwclass() everywhere for consistency.
diffstat:
lib/libpam/modules/pam_nologin/pam_nologin.c | 6 +++---
lib/libpam/modules/pam_unix/pam_unix.c | 9 ++++-----
2 files changed, 7 insertions(+), 8 deletions(-)
diffs (68 lines):
diff -r 9a52b9599a5f -r c921491ba2d4 lib/libpam/modules/pam_nologin/pam_nologin.c
--- a/lib/libpam/modules/pam_nologin/pam_nologin.c Thu Jun 20 20:54:02 2013 +0000
+++ b/lib/libpam/modules/pam_nologin/pam_nologin.c Thu Jun 20 20:54:52 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pam_nologin.c,v 1.8 2010/01/17 23:17:08 wiz Exp $ */
+/* $NetBSD: pam_nologin.c,v 1.9 2013/06/20 20:54:52 christos 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.8 2010/01/17 23:17:08 wiz Exp $");
+__RCSID("$NetBSD: pam_nologin.c,v 1.9 2013/06/20 20:54:52 christos Exp $");
#endif
@@ -100,7 +100,7 @@
rootlogin = 1;
}
- lc = login_getclass(pwd->pw_class);
+ lc = login_getpwclass(pwd);
ignorenologin = login_getcapbool(lc, "ignorenologin", rootlogin);
nologin = login_getcapstr(lc, "nologin", nologin_def, nologin_def);
login_close(lc);
diff -r 9a52b9599a5f -r c921491ba2d4 lib/libpam/modules/pam_unix/pam_unix.c
--- a/lib/libpam/modules/pam_unix/pam_unix.c Thu Jun 20 20:54:02 2013 +0000
+++ b/lib/libpam/modules/pam_unix/pam_unix.c Thu Jun 20 20:54:52 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pam_unix.c,v 1.14 2009/11/18 17:06:23 drochner Exp $ */
+/* $NetBSD: pam_unix.c,v 1.15 2013/06/20 20:54:52 christos Exp $ */
/*-
* Copyright 1998 Juniper Networks, Inc.
@@ -40,7 +40,7 @@
#ifdef __FreeBSD__
__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.49 2004/02/10 10:13:21 des Exp $");
#else
-__RCSID("$NetBSD: pam_unix.c,v 1.14 2009/11/18 17:06:23 drochner Exp $");
+__RCSID("$NetBSD: pam_unix.c,v 1.15 2013/06/20 20:54:52 christos Exp $");
#endif
@@ -111,12 +111,11 @@
return (PAM_SUCCESS);
realpw = "*";
}
- lc = login_getpwclass(pwd);
} else {
PAM_LOG("Doing dummy authentication");
realpw = "*";
- lc = login_getclass(NULL);
}
+ lc = login_getpwclass(pwd);
retval = pam_get_authtok(pamh, PAM_AUTHTOK, &pass, NULL);
login_close(lc);
if (retval != PAM_SUCCESS)
@@ -543,7 +542,7 @@
PAM_LOG("UPDATE round");
- if ((lc = login_getclass(pwd->pw_class)) != NULL) {
+ if ((lc = login_getpwclass(pwd)) != NULL) {
min_pw_len = (int) login_getcapnum(lc,
"minpasswordlen", (quad_t)0, (quad_t)0);
pw_expiry = (int) login_getcapnum(lc,
Home |
Main Index |
Thread Index |
Old Index