Skip to content

Commit

Permalink
macusers script fails to account for usernames with non-word characters
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Feb 20, 2023
1 parent af6032a commit 79a2cde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/macusers/macusers.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ $NETATALK_PROCESS = "netatalk";
$AFPD_PROCESS = "afpd";
if ($^O eq "freebsd" || $^O eq "openbsd") {
$PS_STR = "-awwxouser,pid,ppid,start,command";
$MATCH_STR = '(\w+)\s+(\d+)\s+(\d+)\s+([\d\w:]+)';
$MATCH_STR = '(\S+)\s+(\d+)\s+(\d+)\s+([\d\w:]+)';
} elsif ($^O eq "solaris") {
$PS_STR = "-eo user,pid,ppid,c,stime,tty,time,comm";
$MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
$MATCH_STR = '\s*(\S+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
} else {
$PS_STR = "-eo user:32,pid,ppid,c,stime,tty,time,cmd";
$MATCH_STR = '\s*(\w+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
$MATCH_STR = '\s*(\S+)\s+(\d+)\s+(\d+)\s+\d+\s+([\d\w:]+)';
}
$ASIP_PORT = "afpovertcp";
$ASIP_PORT_NO = 548;
Expand Down

0 comments on commit 79a2cde

Please sign in to comment.