Bugzilla – Attachment 26 Details for
Bug 84
last command provides incorrect information on Solaris 8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch as attachment for easier use
PATCH (text/plain), 2.01 KB, created by
William Knox
on 2002-02-14 07:27:53 AEDT
(
hide
)
Description:
Patch as attachment for easier use
Filename:
MIME Type:
Creator:
William Knox
Created:
2002-02-14 07:27:53 AEDT
Size:
2.01 KB
patch
obsolete
>--- loginrec.c~ Mon Oct 29 21:50:40 2001 >+++ loginrec.c Tue Jan 29 10:56:59 2002 >@@ -701,6 +701,7 @@ > line_stripname(utx->ut_line, li->line, sizeof(utx->ut_line)); > set_utmpx_time(li, utx); > utx->ut_pid = li->pid; >+ strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); > > if (li->type == LTYPE_LOGOUT) > return; >@@ -711,7 +712,6 @@ > */ > > /* strncpy(): Don't necessarily want null termination */ >- strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username)); > # ifdef HAVE_HOST_IN_UTMPX > strncpy(utx->ut_host, li->hostname, MIN_SIZEOF(utx->ut_host, li->hostname)); > # endif >@@ -942,9 +942,7 @@ > { > struct utmpx utx; > >- memset(&utx, '\0', sizeof(utx)); >- set_utmpx_time(li, &utx); >- line_stripname(utx.ut_line, li->line, sizeof(utx.ut_line)); >+ construct_utmpx(li, &utx); > # ifdef HAVE_ID_IN_UTMPX > line_abbrevname(utx.ut_id, li->line, sizeof(utx.ut_id)); > # endif >--- session.c~ Sat Dec 1 18:37:08 2001 >+++ session.c Tue Jan 29 10:56:59 2002 >@@ -1866,7 +1866,7 @@ > > /* Record that the user has logged out. */ > if (s->pid != 0) >- record_logout(s->pid, s->tty); >+ record_logout(s->pid, s->tty, s->pw->pw_name); > > /* Release the pseudo-tty. */ > pty_release(s->tty); >--- sshlogin.c~ Tue May 8 16:33:06 2001 >+++ sshlogin.c Tue Jan 29 10:56:59 2002 >@@ -94,11 +94,11 @@ > /* Records that the user has logged out. */ > > void >-record_logout(pid_t pid, const char *ttyname) >+record_logout(pid_t pid, const char *ttyname, const char *user) > { > struct logininfo *li; > >- li = login_alloc_entry(pid, NULL, NULL, ttyname); >+ li = login_alloc_entry(pid, user, NULL, ttyname); > login_logout(li); > login_free_entry(li); > } >--- sshlogin.h~ Wed Jul 4 00:46:58 2001 >+++ sshlogin.h Tue Jan 29 10:56:59 2002 >@@ -17,7 +17,7 @@ > void > record_login(pid_t, const char *, const char *, uid_t, > const char *, struct sockaddr *); >-void record_logout(pid_t, const char *); >+void record_logout(pid_t, const char *, const char *); > u_long get_last_login_time(uid_t, const char *, char *, u_int); > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 84
: 26