summaryrefslogtreecommitdiff
path: root/bsd-login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-20 12:18:40 +1100
committerDamien Miller <djm@mindrot.org>1999-11-20 12:18:40 +1100
commitc6398efcbaa2c8fea00420940fcf99b183ff24e9 (patch)
treea431c08590880a435c51c2df9dc3d7b218a81b7b /bsd-login.c
parent36fb30f6dd11515087e6298cb17e96a3f2f5b679 (diff)
- Merged more Solaris support from Marc G. Fournier
<marc.fournier@acadiau.ca> - Wrote autoconf tests for integer bit-types - Fixed enabling kerberos support
Diffstat (limited to 'bsd-login.c')
-rw-r--r--bsd-login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsd-login.c b/bsd-login.c
index 8c84272f8..98010ec3c 100644
--- a/bsd-login.c
+++ b/bsd-login.c
@@ -37,7 +37,7 @@
37 37
38#if defined(LIBC_SCCS) && !defined(lint) 38#if defined(LIBC_SCCS) && !defined(lint)
39/* from: static char sccsid[] = "@(#)login.c 8.1 (Berkeley) 6/4/93"; */ 39/* from: static char sccsid[] = "@(#)login.c 8.1 (Berkeley) 6/4/93"; */
40static char *rcsid = "$Id: bsd-login.c,v 1.1 1999/11/19 04:32:34 damien Exp $"; 40static char *rcsid = "$Id: bsd-login.c,v 1.2 1999/11/20 01:18:40 damien Exp $";
41#endif /* LIBC_SCCS and not lint */ 41#endif /* LIBC_SCCS and not lint */
42 42
43#include <sys/types.h> 43#include <sys/types.h>
@@ -58,6 +58,7 @@ login(utp)
58 58
59 tty = ttyslot(); 59 tty = ttyslot();
60 if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) { 60 if (tty > 0 && (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) >= 0) {
61#ifdef HAVE_HOST_IN_UTMP
61 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); 62 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
62 /* 63 /*
63 * Prevent luser from zero'ing out ut_host. 64 * Prevent luser from zero'ing out ut_host.
@@ -70,6 +71,7 @@ login(utp)
70 strncmp(old_ut.ut_line, utp->ut_line, UT_LINESIZE) == 0 && 71 strncmp(old_ut.ut_line, utp->ut_line, UT_LINESIZE) == 0 &&
71 strncmp(old_ut.ut_name, utp->ut_name, UT_NAMESIZE) == 0) 72 strncmp(old_ut.ut_name, utp->ut_name, UT_NAMESIZE) == 0)
72 (void)memcpy(utp->ut_host, old_ut.ut_host, UT_HOSTSIZE); 73 (void)memcpy(utp->ut_host, old_ut.ut_host, UT_HOSTSIZE);
74#endif /* HAVE_HOST_IN_UTMP */
73 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); 75 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
74 (void)write(fd, utp, sizeof(struct utmp)); 76 (void)write(fd, utp, sizeof(struct utmp));
75 (void)close(fd); 77 (void)close(fd);