use getpwnam_shadow to unbreak, from Gregor Best
This commit is contained in:
parent
c978032140
commit
46058f7cc6
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.86 2015/10/31 22:58:16 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.87 2016/05/12 11:36:48 sthen Exp $
|
||||
|
||||
COMMENT= screen saver and locker for the X Window System
|
||||
|
||||
DISTNAME= xscreensaver-5.34
|
||||
REVISION= 0
|
||||
|
||||
CATEGORIES= x11
|
||||
|
||||
|
21
x11/xscreensaver/patches/patch-driver_passwd-pwent_c
Normal file
21
x11/xscreensaver/patches/patch-driver_passwd-pwent_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-driver_passwd-pwent_c,v 1.3 2016/05/12 11:36:48 sthen Exp $
|
||||
--- driver/passwd-pwent.c.orig Sat Dec 27 11:17:26 2008
|
||||
+++ driver/passwd-pwent.c Wed May 11 23:43:04 2016
|
||||
@@ -133,7 +133,7 @@ user_name (void)
|
||||
still work. Right?) */
|
||||
if (!u || !*u)
|
||||
{
|
||||
- struct passwd *p = getpwuid (getuid ());
|
||||
+ struct passwd *p = getpwuid_shadow (getuid ());
|
||||
u = (p ? p->pw_name : 0);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ get_encrypted_passwd(const char *user)
|
||||
|
||||
if (user && *user && !result)
|
||||
{ /* Check non-shadow passwords too. */
|
||||
- struct passwd *p = getpwnam(user);
|
||||
+ struct passwd *p = getpwnam_shadow(user);
|
||||
if (p && passwd_known_p (p->pw_passwd))
|
||||
result = strdup(p->pw_passwd);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user