The MATCH_STR regex does not handle users who have a '-' in their names.
Expected behavior:
$ macusers PID UID Username Name Logintime Mac 3292 117 aa-foo-553 Mar07 5904 0 root root Jan27 8914 118 aa-foo-761 Mar07 8920 120 aa-foo-620 08:39
Actual behavior:
$ macusers PID UID Username Name Logintime Mac 3292 553 Mar07 5904 0 root root Jan27 8914 761 Mar07 8920 620 08:39
The attached patch fixes it for Linux. The equivalent change should work for other platforms, but as I have not tested them I did not include it in the patch.
It's come to my attention that Marco Wessel reported the same bug to Debian as #740352. His regex is more permissive than mine and may be better.
This was fixed in the main development branch with https://github.com/Netatalk/netatalk/pull/219 and will be included in the next stable release.
Last edit: Daniel Markstedt 2023-04-10