[patch2, 1.2pre13] solaris 7 patch for bsd-login.c
Marc G. Fournier
marc.fournier at acadiau.ca
Sat Nov 20 05:26:12 EST 1999
Solaris 7 doesn't have a ut_host element in utmp...patch let's bsd-login.c
compile with this knowledge:
*** openssh-1.2pre13.orig/bsd-login.c Fri Nov 19 00:32:34 1999
--- openssh-1.2pre13/bsd-login.c Fri Nov 19 14:23:49 1999
***************
*** 40,45 ****
--- 40,46 ----
static char *rcsid = "$Id: bsd-login.c,v 1.1 1999/11/19 04:32:34 damien Exp $";
#endif /* LIBC_SCCS and not lint */
+
#include <sys/types.h>
#include <fcntl.h>
***************
*** 48,53 ****
--- 49,56 ----
#include <utmp.h>
#include <stdio.h>
+ #include "config.h"
+
void
login(utp)
struct utmp *utp;
***************
*** 58,63 ****
--- 61,67 ----
tty = ttyslot();
if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
+ #ifdef HAVE_HOST_IN_UTMP
(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
/*
* Prevent luser from zero'ing out ut_host.
***************
*** 70,75 ****
--- 74,80 ----
strncmp(old_ut.ut_line, utp->ut_line, UT_LINESIZE) == 0 &&
strncmp(old_ut.ut_name, utp->ut_name, UT_NAMESIZE) == 0)
(void)memcpy(utp->ut_host, old_ut.ut_host, UT_HOSTSIZE);
+ #endif
(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
(void)write(fd, utp, sizeof(struct utmp));
(void)close(fd);
Marc G. Fournier marc.fournier at acadiau.ca
Senior Systems Administrator Acadia University
"These are my opinions, which are not necessarily shared by my employer"
More information about the openssh-unix-dev
mailing list