mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
* Fix a long line that I introduced in the last commit
* Backslash escape non-alphanumeric chars in the login name so that perl doesn't choke on things like '$'.
This commit is contained in:
parent
8f38f3b2e6
commit
6fce744ee3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70130
@ -117,7 +117,8 @@ if ($#ARGV == 0) {
|
||||
$login_name = &get_login_name;
|
||||
}
|
||||
|
||||
($name, $password, $uid, $gid, $change, $class, $gecos, $home_dir, $shell) = (getpwnam("$login_name"));
|
||||
($name, $password, $uid, $gid, $change, $class, $gecos, $home_dir, $shell) =
|
||||
(getpwnam("$login_name"));
|
||||
|
||||
if ($?) {
|
||||
print STDERR "${whoami}: Error: User ${login_name} not in password database\n";
|
||||
@ -316,7 +317,7 @@ sub update_passwd_file {
|
||||
print STDERR "\n${whoami}: Warning: couldn't set mode of $new_passwd_file to 0600 ($!)\n\tcontinuing, but please check mode of /etc/master.passwd!\n";
|
||||
$skipped = 0;
|
||||
while (<MASTER_PW>) {
|
||||
if (not /^$login_name\:/io) {
|
||||
if (not /^\Q$login_name:/io) {
|
||||
print NEW_PW;
|
||||
} else {
|
||||
print STDERR "Dropped entry for $login_name\n" if $debug;
|
||||
|
Loading…
Reference in New Issue
Block a user