Austin.David at wink.com
2001-Sep-26 22:07 UTC
openssh-2.9.9p2 session.c fails on Solaris 7,8 w/ SunPro C
FYI-- session.c fails from openSSH 2.9.9p2 with SunPro C compiler on Solaris 7, 8. The function do_pre_login had to be moved to before its use in do_exec_pty (a predeclaration would work). It does appear to work correctly, given the above fix. Still having the largefile problem (argh), so if anyone can help with /that/ ... -- Austin David -- Sr. Systems Architect Wink Communications Austin.David at Wink.com (510) 337-6334
Wayne Davison
2001-Sep-27 00:44 UTC
openssh-2.9.9p2 session.c fails on Solaris 7,8 w/ SunPro C
On Wed, 26 Sep 2001 Austin.David at wink.com wrote:> session.c fails from openSSH 2.9.9p2 with SunPro C compiler on Solaris 7, > 8. The function do_pre_login had to be moved to before its use in > do_exec_pty (a predeclaration would work).Yeah, I mentioned this problem on the list before 2.9.9 was released (along with some changes that have been languishing since June), but sadly, none of my patches were applied to the source. This is very frustrating. It often feels like I'm talking in an empty room. [Tapping on the mike] Hello? Is this thing on? ..wayne..
Kevin Steves
2001-Sep-27 18:58 UTC
openssh-2.9.9p2 session.c fails on Solaris 7,8 w/ SunPro C
On Wed, 26 Sep 2001 Austin.David at wink.com wrote: :session.c fails from openSSH 2.9.9p2 with SunPro C compiler on Solaris 7, :8. The function do_pre_login had to be moved to before its use in :do_exec_pty (a predeclaration would work). yes, unfortunately that was missed. i will commit wayne's patch. :It does appear to work correctly, given the above fix. Still having the :largefile problem (argh), so if anyone can help with /that/ ... this should fix type conversion problems exposed when using 64-bit off_t. can folks test? Index: loginrec.c ==================================================================RCS file: /var/cvs/openssh/loginrec.c,v retrieving revision 1.34 diff -u -r1.34 loginrec.c --- loginrec.c 2001/08/06 23:29:17 1.34 +++ loginrec.c 2001/09/27 18:53:33 @@ -1095,7 +1095,7 @@ } /* Seek to the start of the last struct utmp */ - if (lseek(fd, (off_t)(0 - sizeof(struct utmp)), SEEK_END) == -1) { + if (lseek(fd, -(off_t)sizeof(struct utmp), SEEK_END) == -1) { /* Looks like we've got a fresh wtmp file */ close(fd); return 0; @@ -1128,7 +1128,7 @@ continue; } /* Seek back 2 x struct utmp */ - if (lseek(fd, (off_t)(0-2*sizeof(struct utmp)), SEEK_CUR) == -1) { + if (lseek(fd, -(off_t)(2 * sizeof(struct utmp)), SEEK_CUR) == -1) { /* We've found the start of the file, so quit */ close (fd); return 0; @@ -1251,7 +1251,7 @@ } /* Seek to the start of the last struct utmpx */ - if (lseek(fd, (off_t)(0-sizeof(struct utmpx)), SEEK_END) == -1 ) { + if (lseek(fd, -(off_t)sizeof(struct utmpx), SEEK_END) == -1 ) { /* probably a newly rotated wtmpx file */ close(fd); return 0; @@ -1281,7 +1281,7 @@ # endif continue; } - if (lseek(fd, (off_t)(0-2*sizeof(struct utmpx)), SEEK_CUR) == -1) { + if (lseek(fd, -(off_t)(2 * sizeof(struct utmpx)), SEEK_CUR) == -1) { close (fd); return 0; } @@ -1424,7 +1424,7 @@ if (type == LL_FILE) { /* find this uid's offset in the lastlog file */ - offset = (off_t) ( (long)li->uid * sizeof(struct lastlog)); + offset = (off_t) ((long)li->uid * sizeof(struct lastlog)); if ( lseek(*fd, offset, SEEK_SET) != offset ) { log("lastlog_openseek: %s->lseek(): %s",