diff options
Diffstat (limited to 'lib/Vyatta/Login')
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index c4870986..9ddbdc12 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -99,6 +99,9 @@ sub update { my $old_groups = $membership->{$user}; my $cmd; + my $og_str = (defined($old_groups)) + ? (join(' ', sort @$old_groups)) : ''; + my $ng_str = join(' ', sort @new_groups); # not found in existing passwd, must be new if ( !defined $uid ) { @@ -111,8 +114,7 @@ sub update { elsif ($opwd eq $pwd && ( !$fname || $fname eq $comment ) && ( !$home || $home eq $dir ) - && join( ' ', sort @$old_groups ) eq - join( ' ', sort @new_groups ) ) + && $og_str eq $ng_str) { # If no part of password or group file changed |