Fwd: Re: Bus Error with OpenSSH 3.7.1p2 on Solaris 8, SPARC 64-bit
Darren Tucker
dtucker at zip.com.au
Wed Oct 22 02:20:40 EST 2003
aphor at speakeasy.net wrote:
> This time, when a sparcv9 binary tries to sscanf(3C) the numeric umask
> as a long octal and put it in a mode_t, SIGBUS happens.
Yep, it's a bug. Attached is the patch that went into the tree a while
back.
--
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: openssh_cvs/ChangeLog
diff -u openssh_cvs/ChangeLog:1.3052 openssh_cvs/ChangeLog:1.3053
--- openssh_cvs/ChangeLog:1.3052 Thu Oct 2 17:32:30 2003
+++ openssh_cvs/ChangeLog Thu Oct 2 20:07:09 2003
@@ -31,6 +31,8 @@
- (dtucker) [configure.ac] Don't set DISABLE_SHADOW when configuring
--with-pam. ok djm@
- (dtucker) [ssh-gss.h] Prototype change missed in sync.
+ - (dtucker) [session.c] Fix bus errors on some 64-bit Solaris configurations.
+ Based on patches by Matthias Koeppe and Thomas Baden. ok djm@
20030930
- (bal) Fix issues in openbsd-compat/realpath.c
@@ -1266,4 +1268,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple at murple.net, diagnosis from dtucker at zip.com.au
-$Id: ChangeLog,v 1.3052 2003/10/02 07:32:30 dtucker Exp $
+$Id: ChangeLog,v 1.3053 2003/10/02 10:07:09 dtucker Exp $
Index: openssh_cvs/session.c
diff -u openssh_cvs/session.c:1.256 openssh_cvs/session.c:1.257
--- openssh_cvs/session.c:1.256 Thu Oct 2 16:12:37 2003
+++ openssh_cvs/session.c Thu Oct 2 20:07:09 2003
@@ -906,7 +906,7 @@
{
char **tmpenv = NULL, *var;
u_int i, tmpenvsize = 0;
- mode_t mask;
+ u_long mask;
/*
* We don't want to copy the whole file to the child's environment,
@@ -927,7 +927,7 @@
if ((var = child_get_env(tmpenv, "UMASK")) != NULL)
if (sscanf(var, "%5lo", &mask) == 1)
- umask(mask);
+ umask((mode_t)mask);
for (i = 0; tmpenv[i] != NULL; i++)
xfree(tmpenv[i]);
More information about the openssh-unix-dev
mailing list