Minor Thread Bug In OpenSSH 3.8p1
Antoine Verheijen
antoine.verheijen at ualberta.ca
Sat Feb 28 07:20:33 EST 2004
There is a minor problem with the PAM support in OpenSSH 3.8p1. If you use
POSIX threads (as specified by defining USE_POSIX_THREADS) in auth-pam.c,
PAM authentication will fail in routine import_environments(). The purpose
of this routine is to import variables returned by do_pam_account() in
sshpam_thread(). However, those variable are only exported if USE_POSIX_THREADS
is NOT set. Consequently, import_environments() get upset when there's nothing
in the buffer when that macro IS set.
I have chosen to comment out the guts of routine import_environments() if
USE_POSIX_PTHREADS is not defined as a solution, reasoning that this will
also work if that routine a called by other parts of the code in some later
version. I could have just commented out the single call to that routine in
sshpam_query() as an alternative. Either way will work.
diff -r -c old/auth-pam.c new/auth-pam.c
*** old/auth-pam.c Tue Feb 17 05:20:08 2004
--- new/auth-pam.c Thu Feb 26 23:18:05 2004
***************
*** 201,206 ****
--- 201,207 ----
debug3("PAM: %s entering", __func__);
+ #ifndef USE_POSIX_THREADS
/* Import variables set by do_pam_account */
sshpam_account_status = buffer_get_int(b);
pam_password_change_required(buffer_get_int(b));
***************
*** 228,233 ****
--- 229,235 ----
}
#endif
}
+ #endif
}
/*
-----------------------------------------------------------------------
Antoine Verheijen Email: antoine.verheijen at ualberta.ca
CNS Network Services Phone: (780) 492-9312
University of Alberta Fax: (780) 492-1729
More information about the openssh-unix-dev
mailing list