openssh 3.7p1 bus error on sparcv9

Darren Tucker dtucker at zip.com.au
Wed Sep 17 09:39:16 EST 2003


Jason Parsons wrote:
> 
> openssh 3.7p1 sshd on Solaris 8 / sparcv9:
> 
> sshd runs fine, and starts to allow the login.  However, when reading
> from /etc/default/login, I get a bus error.  I am able to get sshd to
> work by commenting out these lines in session.c:
[snip]
> The problem seems to be that read_etc_default_login() assumes that a
> u_int (unsigned int) is the same size as a size_t.  This is true in
> sparcv7, but not in sparcv9:

Damn, I tested it on a sun4m.  Does the attached patch fix it?

-- 
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 --------------
Index: session.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/session.c,v
retrieving revision 1.253
diff -u -p -r1.253 session.c
--- session.c	16 Sep 2003 01:52:19 -0000	1.253
+++ session.c	16 Sep 2003 23:36:08 -0000
@@ -912,8 +912,7 @@ static void
 read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
 {
 	char **tmpenv = NULL, *var;
-	u_int i;
-	size_t tmpenvsize = 0;
+	u_int i, tmpenvsize = 0;
 	mode_t mask;
 
 	/*


More information about the openssh-unix-dev mailing list