summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2001-12-08 01:57:17 +0000
committerTom Yu <tlyu@mit.edu>2001-12-08 01:57:17 +0000
commit63018bad00f532a24631f35f24e98727a539efae (patch)
tree5ec585ea2d7e4efb1c7aa210e824b4dc456398ee /src
parent912de828aeb6d6359eb9be92489f89b6d12b8d79 (diff)
* update_utmp.c (PTY_GETUTXENT): Fix typo. Thanks to Shawn
Stepper. [fixes krb5-build/1020] [pullup from 1.2.3] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14057 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/util/pty/ChangeLog11
-rw-r--r--src/util/pty/update_utmp.c7
2 files changed, 16 insertions, 2 deletions
diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog
index c1741b2c0..ec6398cee 100644
--- a/src/util/pty/ChangeLog
+++ b/src/util/pty/ChangeLog
@@ -2,6 +2,17 @@
* README: s-pty_init_ets/pty_init/
+2001-11-28 Tom Yu <tlyu@mit.edu>
+
+ * update_utmp.c (PTY_GETUTXENT): Fix typo. Thanks to Shawn
+ Stepper. [fixes krb5-build/1020]
+
+2001-11-19 Tom Yu <tlyu@mit.edu>
+
+ * update_utmp.c (pty_update_utmp): Patch from Garry Zacheiss to
+ kludge around cases where we need to use more than 2 characters of
+ LINE in order to avoid conflicts in UT_ID.
+
2001-10-18 Ezra Peisach <epeisach@mit.edu>
* sane_hostname.c (pty_make_sane_hostname): Do not declare addrbuf
diff --git a/src/util/pty/update_utmp.c b/src/util/pty/update_utmp.c
index af4e9874d..72c41be4e 100644
--- a/src/util/pty/update_utmp.c
+++ b/src/util/pty/update_utmp.c
@@ -338,7 +338,7 @@
#else
#define PTY_STRUCT_UTMPX struct utmp
#define PTY_SETUTXENT setutent
-#define PTY_GETUTXENT gettutent
+#define PTY_GETUTXENT getutent
#define PTY_GETUTXLINE getutline
#define PTY_PUTUTXLINE pututline
#define PTY_ENDUTXENT endutent
@@ -532,7 +532,10 @@ pty_update_utmp(int process_type, int pid, const char *username,
#ifdef __hpux
strcpy(utmp_id, cp);
#else
- sprintf(utmp_id, "kl%s", cp);
+ if (len > 2 && *(cp - 1) != '/')
+ sprintf(utmp_id, "k%s", cp - 1);
+ else
+ sprintf(utmp_id, "k0%s", cp);
#endif
strncpy(utx.ut_id, utmp_id, sizeof(utx.ut_id));
/*