+20011229
+ - (djm) Apply Cygwin pointer deref fix from Corinna Vinschen
+ <vinschen@redhat.com> Could be abused to guess valid usernames
+
20011228
- (djm) Remove recommendation to use GNU make, we should support most
make programs.
#ifdef HAVE_CYGWIN
if (authenticated &&
- !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD,pw->pw_uid)) {
+ !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD, pw)) {
packet_disconnect("Authentication rejected for uid %d.",
- (int)pw->pw_uid);
+ pw == NULL ? -1 : pw->pw_uid);
authenticated = 0;
}
#else
return(0);
#ifdef HAVE_CYGWIN
- if (check_nt_auth(1, authctxt->pw->pw_uid) == 0)
+ if (check_nt_auth(1, authctxt->pw) == 0)
return(0);
#endif
#ifdef USE_PAM
packet_done();
if (authctxt->valid &&
#ifdef HAVE_CYGWIN
- check_nt_auth(1, authctxt->pw->pw_uid) &&
+ check_nt_auth(1, authctxt->pw) &&
#endif
#ifdef USE_PAM
auth_pam_password(authctxt->pw, password) == 1)
xfree(devs);
xfree(lang);
#ifdef HAVE_CYGWIN
- if (check_nt_auth(0, authctxt->pw->pw_uid) == 0)
+ if (check_nt_auth(0, authctxt->pw) == 0)
return(0);
#endif
return authenticated;
xfree(pkalg);
xfree(pkblob);
#ifdef HAVE_CYGWIN
- if (check_nt_auth(0, authctxt->pw->pw_uid) == 0)
+ if (check_nt_auth(0, authctxt->pw) == 0)
return(0);
#endif
return authenticated;
return ret;
}
-int check_nt_auth(int pwd_authenticated, uid_t uid)
+int check_nt_auth(int pwd_authenticated, struct passwd *pw)
{
/*
* The only authentication which is able to change the user
*/
static int has_create_token = -1;
+ if (pw == NULL)
+ return 0;
if (is_winnt) {
if (has_create_token < 0) {
struct utsname uts;
}
}
if (has_create_token < 1 &&
- !pwd_authenticated && geteuid() != uid)
+ !pwd_authenticated && geteuid() != pw->pw_uid)
return 0;
}
return 1;
int binary_open(const char *filename, int flags, ...);
int binary_pipe(int fd[2]);
-int check_nt_auth(int pwd_authenticated, uid_t uid);
+int check_nt_auth(int pwd_authenticated, struct passwd *pw);
int check_ntsec(const char *filename);
void register_9x_service(void);