getpwnam -> getpwnam_shadow

This commit is contained in:
sthen 2015-11-19 14:19:05 +00:00
parent e560200d4f
commit 9795522f15
7 changed files with 46 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.67 2015/11/18 13:48:59 sthen Exp $
# $OpenBSD: Makefile,v 1.68 2015/11/19 14:19:05 sthen Exp $
PORTROACH= limit:^2\.
@ -14,6 +14,7 @@ COMMENT-ldap= freeradius ldap rlm addon
V= 2.2.9
REVISION= 2
REVISION-main= 3
DISTNAME= freeradius-server-$V
EXTRACT_SUFX= .tar.bz2

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_modules_rlm_unix_rlm_unix_c,v 1.1 2015/11/19 14:19:05 sthen Exp $
--- src/modules/rlm_unix/rlm_unix.c.orig Thu Nov 19 14:13:04 2015
+++ src/modules/rlm_unix/rlm_unix.c Thu Nov 19 14:13:38 2015
@@ -211,7 +211,7 @@ static int unix_getpw(UNUSED void *instance, REQUEST *
return RLM_MODULE_USERLOCK;
}
#else /* OSFC2 */
- if ((pwd = getpwnam(name)) == NULL) {
+ if ((pwd = getpwnam_shadow(name)) == NULL) {
return RLM_MODULE_NOTFOUND;
}
encrypted_pass = pwd->pw_passwd;

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.3 2015/11/12 15:27:46 sthen Exp $
# $OpenBSD: Makefile,v 1.4 2015/11/19 14:19:05 sthen Exp $
PORTROACH= limit:^3\.
@ -12,7 +12,7 @@ COMMENT-ldap= freeradius ldap rlm addon
COMMENT-python= freeradius python rlm addon
V= 3.0.10
REVISION-main= 0
REVISION-main= 1
DISTNAME= freeradius-server-$V
EXTRACT_SUFX= .tar.bz2

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_modules_rlm_unix_rlm_unix_c,v 1.1 2015/11/19 14:19:05 sthen Exp $
--- src/modules/rlm_unix/rlm_unix.c.orig Thu Nov 19 14:13:59 2015
+++ src/modules/rlm_unix/rlm_unix.c Thu Nov 19 14:14:18 2015
@@ -218,7 +218,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(UNUS
return RLM_MODULE_USERLOCK;
}
#else /* OSFC2 */
- if ((pwd = getpwnam(name)) == NULL) {
+ if ((pwd = getpwnam_shadow(name)) == NULL) {
return RLM_MODULE_NOTFOUND;
}
encrypted_pass = pwd->pw_passwd;

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.12 2013/04/24 07:50:36 sthen Exp $
# $OpenBSD: Makefile,v 1.13 2015/11/19 14:19:05 sthen Exp $
COMMENT= complexity checker for passwd(1) and password generator
DISTNAME= passwdqc-1.3.0
REVISION= 0
CATEGORIES= security sysutils
SHARED_LIBS= passwdqc 0.0 # .0

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-pwqcheck_1,v 1.1 2010/07/07 21:29:58 ajacoutot Exp $
--- pwqcheck.1.orig Wed Jul 7 10:56:38 2010
+++ pwqcheck.1 Wed Jul 7 10:56:55 2010
$OpenBSD: patch-pwqcheck_1,v 1.2 2015/11/19 14:19:05 sthen Exp $
--- pwqcheck.1.orig Mon Mar 15 04:17:19 2010
+++ pwqcheck.1 Thu Nov 19 14:17:35 2015
@@ -160,7 +160,7 @@ Read just 1 line (new passphrase).
This is needed to use
.Nm
as the passwordcheck program on OpenBSD - e.g., with
-":passwordcheck=/usr/bin/pwqcheck -1:\\"
+":passwordcheck=${PREFIX}/bin/pwqcheck -1:\\"
+":passwordcheck=/usr/local/bin/pwqcheck -1:\\"
in the "default" section in
.Cm /etc/login.conf .
.It Cm -2

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-pwqcheck_c,v 1.1 2015/11/19 14:19:05 sthen Exp $
--- pwqcheck.c.orig Thu Nov 19 14:16:18 2015
+++ pwqcheck.c Thu Nov 19 14:17:33 2015
@@ -66,7 +66,7 @@ static char *extract_string(char **stringp)
static struct passwd *parse_pwline(char *line, struct passwd *pw)
{
if (!strchr(line, ':')) {
- struct passwd *p = getpwnam(line);
+ struct passwd *p = getpwnam_shadow(line);
endpwent();
if (!p) {
fprintf(stderr, "pwqcheck: User not found.\n");