1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

users: support OpenBS using utmp

OpenBSD uses the original utmp file format so the general `users` does not
work there. By using the `utmp-classic` lib, we cna process the current users
on the system from the /var/run/utmp and show the list.

fixes #5665
This commit is contained in:
Jadi 2024-05-16 17:54:22 +03:30
parent 92665144c9
commit 576341bb93
9 changed files with 123 additions and 90 deletions

View file

@ -31,3 +31,12 @@ fn test_users_check_name() {
new_ucmd!().succeeds().stdout_is(&expected);
}
#[test]
#[cfg(target_os = "openbsd")]
fn test_users_check_name_openbsd() {
new_ucmd!()
.args(&["openbsd_utmp"])
.run()
.stdout_contains("test");
}