#file-format #openbsd #unix #utmp #unix-file #login

utmp-classic-raw

Provides raw types for parsing login records in classic utmp (UNIXv1 & OpenBSD) file

3 releases

0.1.3 May 18, 2024
0.1.2 May 16, 2024
0.1.1 May 3, 2024

#484 in Unix APIs

Download history 2226/week @ 2024-07-29 1885/week @ 2024-08-05 2244/week @ 2024-08-12 2319/week @ 2024-08-19 1053/week @ 2024-08-26 2320/week @ 2024-09-02 2778/week @ 2024-09-09 5009/week @ 2024-09-16 2466/week @ 2024-09-23 1768/week @ 2024-09-30 2269/week @ 2024-10-07 3110/week @ 2024-10-14 2876/week @ 2024-10-21 2358/week @ 2024-10-28 326/week @ 2024-11-04 3357/week @ 2024-11-11

9,778 downloads per month
Used in 4 crates (via utmp-classic)

MIT license

8KB
149 lines

utmp-classic

Rust library for reading utmp files. Please note that all Unix like systems (Including all GNU/Linuxes, MacOS and all BSDs except OpenBSD) use the newer utmpx file format, even if they still call it utmp. This library works only for original Unix utmp files which is only used in OpenBSD as far as I know.

If you are looking for a lib to be used on anything other than OpenBSD; you might be looking for a utmpx library, although most of them calls themselves utmp; not sure why :D

sample run

A sample utmp file is included in the root directory, you can run a sample by issuing:

cargo run --package utmp-classic --example dump-utmp tests/samples/basic.utmp 

history

This library is a modification ofn [utmp-rs](https://github.com/upsuper/utmp-rs) by upsuper. It is updated to work on the classic AT&T Unix v1 style utmp files still used by OpenBSD.

Dependencies

~0.9–1.5MB
~25K SLoC