I know of no systems that write out usernames in DEAD_PROCESS records
in wtmp, but can special case them in update_wtmp if they are found.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7323
dc483132-0cff-0310-8789-
dd5450dbe970
strncpy(ut.ut_name, user, sizeof(ut.ut_name));
#endif
- return ptyint_update_wtmp(&ut, host);
+ return ptyint_update_wtmp(&ut, host, user);
#endif /*HAVE_LOGWTMP*/
}
void initialize_pty_error_table(void);
long ptyint_void_association(void);
long ptyint_open_ctty (char *slave, int *fd);
-long ptyint_update_wtmp (struct utmp *ut, char *host);
+long ptyint_update_wtmp (struct utmp *ut, char *host, char *user);
void ptyint_vhangup(void);
#else /*__STDC__*/
#endif
-long ptyint_update_wtmp (ent , host)
+long ptyint_update_wtmp (ent , host, user)
struct utmp *ent;
char *host;
+char *user;
{
struct utmp ut;
struct stat statb;
getutmpx(ent, &utx);
if (host)
strncpy(utx.ut_host, host, sizeof(utx.ut_host) );
- else utx.ut_host[0] = 0;
+else utx.ut_host[0] = 0;
+if (user)
+ strncpy(utx.ut_user, user, sizeof(utx.ut_user));
updwtmpx(WTMPX_FILE, &utx);
#endif