Bugzilla – Attachment 1418 Details for
Bug 1421
Fix lastlog on Mac OS X.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes lastlog on Mac OS X.
lastlog.patch (text/plain), 1022 bytes, created by
Disco Vince Giffin
on 2007-12-21 15:49:37 AEDT
(
hide
)
Description:
Fixes lastlog on Mac OS X.
Filename:
MIME Type:
Creator:
Disco Vince Giffin
Created:
2007-12-21 15:49:37 AEDT
Size:
1022 bytes
patch
obsolete
>--- loginrec.c.orig 2004-04-07 23:16:06.000000000 -0700 >+++ loginrec.c 2005-12-21 18:10:44.000000000 -0800 >@@ -1395,6 +1395,38 @@ > **/ > > #ifdef USE_LASTLOG >+#ifdef __APPLE_UTMPX__ >+int >+lastlog_write_entry(struct logininfo *li) >+{ >+ switch(li->type) { >+ case LTYPE_LOGIN: >+ return 1; /* lastlog written by pututxline */ >+ default: >+ logit("lastlog_write_entry: Invalid type field"); >+ return 0; >+ } >+} >+ >+int >+lastlog_get_entry(struct logininfo *li) >+{ >+ struct lastlogx l, *ll; >+ >+ if ((ll = getlastlogxbyname(li->username, &l)) == NULL) { >+ memset(&l, '\0', sizeof(l)); >+ ll = &l; >+ } >+ line_fullname(li->line, ll->ll_line, sizeof(li->line)); >+ strlcpy(li->hostname, ll->ll_host, >+ MIN_SIZEOF(li->hostname, ll->ll_host)); >+ li->tv_sec = ll->ll_tv.tv_sec; >+ li->tv_usec = ll->ll_tv.tv_usec; >+ return (1); >+} >+ >+#else /* !__APPLE_UTMPX__ */ >+ > #define LL_FILE 1 > #define LL_DIR 2 > #define LL_OTHER 3 >@@ -1551,4 +1583,5 @@ > /* NOTREACHED */ > return (0); > } >+#endif /* __APPLE_UTMPX__ */ > #endif /* USE_LASTLOG */
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 1421
: 1418