coreutils
coreutils copied to clipboard
users: support on OpenBSD
Following PR#5620
users tool is not supported on OpenBSD, due to the lack of support for utmpx (see https://github.com/uutils/coreutils/issues/5596).
=> implement users on OpenBSD with an alternate solution without using utmpx.
I would be glad to work on this. I'm an occasional OpenBSD user and tried compiling coreutils there; which worked smoothly, But obviously no users (and pingy, who, ...).
Since this is a larger contribution than what I've done before on this project, I've decided to ask first & propose my solution.
My idea is adding a utmp module alongside utmpx and use it when retrieving data from related files (say /var/run/utmp for users).
Would be glad to have your comments & suggestions.
Great news if I'm not the only dev to work on OpenBSD support for coreutils :)
I have also a partial implementation of users with a new utmp module to grep infos in /var/run/utmp. I think this is the right solution. I would be interested to review your code if you propose a PR.
(WIP for me to add CI support for OpenBSD)