projects
/
scpubgit/System-Introspector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
b728b79
)
simplified user group sanitation
Robert 'phaylon' Sedlacek [Mon, 18 Jun 2012 23:28:48 +0000 (23:28 +0000)]
lib/System/Introspector/Probe/Users.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/System/Introspector/Probe/Users.pm
b/lib/System/Introspector/Probe/Users.pm
index
0327bb7
..
e0baa5b
100644
(file)
--- a/
lib/System/Introspector/Probe/Users.pm
+++ b/
lib/System/Introspector/Probe/Users.pm
@@
-78,7
+78,8
@@
sub _gather_ssh_keys {
sub _gather_user_groups {
my ($self, $user) = @_;
my $groups = output_from_command [groups => $user];
- $groups =~ s{^ \Q$user\E \s* : \s* }{}x;
+ chomp $groups;
+ $groups =~ s{^ .* : \s* }{}x;
return [split m{\s+}, $groups];
}