diff options
author | Milan Bouchet-Valat <nalimilan@club.fr> | 2010-08-21 14:57:26 +0200 |
---|---|---|
committer | Milan Bouchet-Valat <nalimilan@club.fr> | 2010-08-21 15:17:51 +0200 |
commit | dab5f3d1ba2cd266f327639a52b5d099ed059f1f (patch) | |
tree | 0a65958fbc6fac15c29d99376c25979001a34607 | |
parent | 3146c7c50027fc1424748a6c36525598543b4b42 (diff) |
Fix typos in change_user()
-rw-r--r-- | Users/Users.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Users/Users.pm b/Users/Users.pm index b610591..a52ea56 100644 --- a/Users/Users.pm +++ b/Users/Users.pm @@ -708,7 +708,7 @@ sub change_user if ($$new_user[$HOME] ne $$old_user[$HOME]) { # remove old home dir - $remove_home = $$new_user[$HOME_FLAGS] (& 1 << 0); + $remove_home = $$new_user[$HOME_FLAGS] & (1 << 0); # ensure user owns home dir $chown_home = $$new_user[$HOME_FLAGS] & (1 << 1); # copy old home files to new dir @@ -718,8 +718,8 @@ sub change_user # Remove trailing slash(es) to avoid issues with rm on symlinks # '/' becomes empty, which is easier to check for security below - $$new_user[$HOME] =~ s|/+$||; - $$new_user[$HOME] =~ s|/+$||; + $$new_user[$HOME] =~ s|/*$||; + $$old_user[$HOME] =~ s|/*$||; if ($erase_home && $$new_user[$HOME] && -e $$new_user[$HOME]) { |