PrivSep and AIX 4.3.2

Darren Tucker dtucker at zip.com.au
Wed Jun 26 01:36:56 EST 2002


Albert Chin wrote:
> With 3.3p1 built on AIX 4.3.2:
>   $ ssh [blah]
>   Couldn't set usrinfo: Not owner
>   debug1: Calling cleanup 0x20019080(0x200219a0)
>   debug3: mm_request_send entering: type 27
>   debug1: Calling cleanup 0x20018dd4(0x0)
>   Connection to songohan closed by remote host.
>   Connection to songohan closed.

Disable PrivSep ("UsePrivilegeSeparation no" in sshd_config) or if
you're adventurous try the attached patch.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG Fingerprint 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 --------------
Index: session.c
===================================================================
RCS file: /cvs/openssh/session.c,v
retrieving revision 1.204
diff -u -r1.204 session.c
--- session.c	23 Jun 2002 21:48:29 -0000	1.204
+++ session.c	25 Jun 2002 13:08:09 -0000
@@ -1152,6 +1152,8 @@
 void
 do_setusercontext(struct passwd *pw)
 {
+	char tty='\0';
+
 #ifdef HAVE_CYGWIN
 	if (is_winnt) {
 #else /* HAVE_CYGWIN */
@@ -1196,6 +1198,9 @@
 # if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
 		irix_setusercontext(pw);
 #  endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */
+# ifdef _AIX
+		aix_usrinfo(pw, &tty, -1);
+# endif /* _AIX */
 		/* Permanently switch to the desired uid. */
 		permanently_set_uid(pw);
 #endif
@@ -1258,9 +1263,6 @@
 			do_motd();
 #else /* HAVE_OSF_SIA */
 		do_nologin(pw);
-# ifdef _AIX
-		aix_usrinfo(pw, s->tty, s->ttyfd);
-# endif /* _AIX */
 		do_setusercontext(pw);
 #endif /* HAVE_OSF_SIA */
 	}


More information about the openssh-unix-dev mailing list