summaryrefslogtreecommitdiffstats
path: root/adduser
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2000-12-17 23:42:45 +0000
committerDoug Barton <dougb@FreeBSD.org>2000-12-17 23:42:45 +0000
commitb20c77af5b15e40770c37257b107df440ec272af (patch)
tree4df6e7a2cc347d4f59000fea225802625ce4dfa2 /adduser
parentf2999a1d6c1ddcafb492168131b28cbff9c0b8f0 (diff)
downloadpw-darwin-b20c77af5b15e40770c37257b107df440ec272af.tar.gz
pw-darwin-b20c77af5b15e40770c37257b107df440ec272af.tar.zst
pw-darwin-b20c77af5b15e40770c37257b107df440ec272af.zip
* 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 '$'.
Diffstat (limited to 'adduser')
-rw-r--r--adduser/rmuser.perl5
1 files changed, 3 insertions, 2 deletions
diff --git a/adduser/rmuser.perl b/adduser/rmuser.perl
index b3f1406..c5c9b74 100644
--- a/adduser/rmuser.perl
+++ b/adduser/rmuser.perl
@@ -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;