#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
218846 |
|
19-Feb-2011 |
ed |
Properly styleify utmpx code and document error codes in man page.
Submitted by: Garrett Cooper
|
#
202876 |
|
23-Jan-2010 |
ed |
Just ignore the timestamps given to pututxline().
I've noticed many applications do a bad job at timekeeping, for several reasons:
- Applications like screen(1) don't update time records when restoring the old user login record. - Many applications only set ut_tv.tv_sec, not ut_tv.tv_usec.
This causes many problems for tools such as ac(8), which require the timestamps to be properly ordered. This is why I've decided to let the utmpx code obtain valid timestamps itself.
|
#
202778 |
|
22-Jan-2010 |
ed |
Remove comments about breaking the specification.
I've discussed this issue with the Austin Group and it will be fixed in future revisions of the specification. The issue was that ut_line fields weren't supposed to be valid for LOGIN_PROCESS entries, while getutxline() would try to match these records anyway.
They also agreed on our way of implementing pututxline() without getutxid() (which other operating systems also do), but unfortunately they disagreed with our way of replacing DEAD_PROCESS entries, which is a pity. The current specification allows the utmpx database to become infinitely big over time.
See also: http://austingroupbugs.net/view.php?id=213#c378
|
#
202530 |
|
17-Jan-2010 |
ed |
Perform several small cleanups to the utmpx code.
- Massively reduce BSS usage. Let futx_to_utx() dynamically allocate the structure. There is only a very small amount of applications out there that needs to use the utmpx database. Wasting 1 KB on unused structures makes little sense.
- Just let getutxid() search for matching ut_id's for any *PROCESS-type. This makes the code a bit more future-proof.
- Fix a POSIX-mistake: when reading POSIX and the OpenSolaris implementation, getutxline() must return USER_PROCESS and LOGIN_PROCESS records whose ut_lines match. When reading POSIX, it seems LOGIN_PROCESS should not use ut_line at the first place. I have reported this issue.
|
#
202188 |
|
13-Jan-2010 |
ed |
Implement <utmpx.h>.
The utmpx interface is the standardized interface of the user accounting database. The standard only defines a subset of the functions that were present in System V-like systems.
I'd like to highlight some of the traits my implementation has:
- The standard allows the on-disk format to be different than the in-memory representation (struct utmpx). Most operating systems don't do this, but we do. This allows us to keep our ABI more stable, while giving us the opportunity to modify the on-disk format. It also allows us to use a common file format across different architectures (i.e. byte ordering).
- Our implementation of pututxline() also updates wtmp and lastlog (now called utx.log and utx.lastlogin). This means the databases are more likely to be in sync.
- Care must be taken that our implementation discard any fields that are not applicable. For example, our DEAD_PROCESS records do not hold a TTY name. Just a time stamp, a record identifier and a process identifier. It also guarantees that strings (ut_host, ut_line and ut_user) are null terminated. ut_id is obviously not null terminated, because it's not a string.
- The API and its behaviour should be conformant to POSIX, but there may be things that slightly deviate from the standard. This implementation uses separate file descriptors when writing to the log files. It also doesn't use getutxid() to search for a field to overwrite. It uses an allocation strategy similar to getutxid(), but prevents DEAD_PROCESS records from accumulating.
Make sure libulog doesn't overwrite the manpages shipped with our C library. Also keep the symbol list in Symbol.map sorted.
I'll bump __FreeBSD_version later this evening. I first want to convert everything to <utmpx.h> and get rid of <utmp.h>.
|