summaryrefslogtreecommitdiffstats
path: root/auth1.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-16 16:25:12 +1100
committerDamien Miller <djm@mindrot.org>2000-09-16 16:25:12 +1100
commitb70b61f5fecf37d95e031414849745030fa8a420 (patch)
tree33a92aca5fde66bde1c3bb3cdabfc5a4c27e24ab /auth1.c
parent52cbcbf0bb5ee685f77449f68c59926320bfe85f (diff)
- (djm) Update CygWin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'auth1.c')
-rw-r--r--auth1.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/auth1.c b/auth1.c
index 43faa67f..99639b59 100644
--- a/auth1.c
+++ b/auth1.c
@@ -29,11 +29,6 @@ RCSID("$OpenBSD: auth1.c,v 1.4 2000/09/07 20:27:49 deraadt Exp $");
# include <siad.h>
#endif
-#ifdef HAVE_CYGWIN
-#include <windows.h>
-#define is_winnt (GetVersion() < 0x80000000)
-#endif
-
/* import */
extern ServerOptions options;
extern char *forced_command;
@@ -383,16 +378,8 @@ do_authloop(struct passwd * pw)
}
#ifdef HAVE_CYGWIN
- /*
- * The only authentication which is able to change the user
- * context on NT systems is the password authentication. So
- * we deny all requsts for changing the user context if another
- * authentication method is used.
- * This may change in future when a special openssh
- * subauthentication package is available.
- */
- if (is_winnt && type != SSH_CMSG_AUTH_PASSWORD &&
- authenticated && geteuid() != pw->pw_uid) {
+ if (authenticated &&
+ !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD,pw->pw_uid)) {
packet_disconnect("Authentication rejected for uid %d.",
(int) pw->pw_uid);
authenticated = 0;