Menu

#640 macusers chokes on users with '-' in their names

None
closed
None
1
2023-04-10
2017-03-08
waoki
No

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.

1 Attachments

Discussion

  • waoki

    waoki - 2017-03-08

    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.

     
  • Daniel Markstedt

    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
  • Daniel Markstedt

    • status: open --> closed
    • assigned_to: Daniel Markstedt
    • Group: -->
     

Log in to post a comment.