openssh-3.6.1p2-passexpire20.patch prevents /etc/nologin display on AIX

Darren Tucker dtucker at zip.com.au
Wed Jun 25 23:18:23 EST 2003


"Elwell, AD (Andrew)" wrote:
> However, with the patch applied /etc/nologin isn't displayed to users (on
> AIX 5.1 / PSSP)
> 
> The patched vesion seems to fail with "illegal user" - some parts of a debug
> 3 log...

It's a bug, and it's mine.  I did not correctly relocate the saving of
errno when I reshuffled the loginrestictions call.

Try applying the following patch on top of -passexpire20 and recompiling.

		-Daz.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
--- auth.c.orig	2003-06-25 23:14:16.000000000 +1000
+++ auth.c	2003-06-25 23:13:36.000000000 +1000
@@ -240,11 +240,12 @@
 	 * non-root user (since loginrestrictions will always fail).
 	 */
 	if ( (pw->pw_uid != 0) && (geteuid() == 0) ) {
-		int loginrestrict_errno = errno;
 		char *msg;
 
 		/* check for AIX account restrictions */
 		if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg) != 0) {
+			int loginrestrict_errno = errno;
+
 			if (msg && *msg) {
 				aix_remove_embedded_newlines(msg);
 				log("Login restricted for %s: %.100s",


More information about the openssh-unix-dev mailing list