diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-16 16:25:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-16 16:25:12 +1100 |
commit | b70b61f5fecf37d95e031414849745030fa8a420 (patch) | |
tree | 33a92aca5fde66bde1c3bb3cdabfc5a4c27e24ab /auth1.c | |
parent | 52cbcbf0bb5ee685f77449f68c59926320bfe85f (diff) |
- (djm) Update CygWin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'auth1.c')
-rw-r--r-- | auth1.c | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -29,11 +29,6 @@ RCSID("$OpenBSD: auth1.c,v 1.4 2000/09/07 20:27:49 deraadt Exp $"); | |||
29 | # include <siad.h> | 29 | # include <siad.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef HAVE_CYGWIN | ||
33 | #include <windows.h> | ||
34 | #define is_winnt (GetVersion() < 0x80000000) | ||
35 | #endif | ||
36 | |||
37 | /* import */ | 32 | /* import */ |
38 | extern ServerOptions options; | 33 | extern ServerOptions options; |
39 | extern char *forced_command; | 34 | extern char *forced_command; |
@@ -383,16 +378,8 @@ do_authloop(struct passwd * pw) | |||
383 | } | 378 | } |
384 | 379 | ||
385 | #ifdef HAVE_CYGWIN | 380 | #ifdef HAVE_CYGWIN |
386 | /* | 381 | if (authenticated && |
387 | * The only authentication which is able to change the user | 382 | !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD,pw->pw_uid)) { |
388 | * context on NT systems is the password authentication. So | ||
389 | * we deny all requsts for changing the user context if another | ||
390 | * authentication method is used. | ||
391 | * This may change in future when a special openssh | ||
392 | * subauthentication package is available. | ||
393 | */ | ||
394 | if (is_winnt && type != SSH_CMSG_AUTH_PASSWORD && | ||
395 | authenticated && geteuid() != pw->pw_uid) { | ||
396 | packet_disconnect("Authentication rejected for uid %d.", | 383 | packet_disconnect("Authentication rejected for uid %d.", |
397 | (int) pw->pw_uid); | 384 | (int) pw->pw_uid); |
398 | authenticated = 0; | 385 | authenticated = 0; |