summaryrefslogtreecommitdiff
path: root/security/openssh/patches/patch-af
blob: 9bac212ffe2198268649d026924a3d9d6c6917c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-af,v 1.7 2005/03/07 23:29:50 tv Exp $

--- auth-passwd.c.orig	2004-06-21 23:37:11.000000000 -0400
+++ auth-passwd.c
@@ -69,7 +69,7 @@ auth_password(Authctxt *authctxt, const 
 #endif
 
 #ifndef HAVE_CYGWIN
-	if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
+	if (pw->pw_uid == ROOTUID && options.permit_root_login != PERMIT_YES)
 		ok = 0;
 #endif
 	if (*password == '\0' && options.permit_empty_passwd == 0)
@@ -106,8 +106,11 @@ auth_password(Authctxt *authctxt, const 
 		}
 	}
 #endif
-		
+#ifdef HAVE_INTERIX
+	return (!setuser(pw->pw_name, password, SU_CHECK) && ok);
+#else
 	return (sys_auth_passwd(authctxt, password) && ok);
+#endif
 }
 
 #ifdef BSD_AUTH