diff options
author | bitblt <bitblt@cvs.openbsd.org> | 1998-02-16 16:44:25 +0000 |
---|---|---|
committer | bitblt <bitblt@cvs.openbsd.org> | 1998-02-16 16:44:25 +0000 |
commit | 8cab8504d8238c63830747d7fb3de40acf835294 (patch) | |
tree | fb8e7b71b9d4834151f0f7d2ad0d6b91f065c338 /usr.sbin/adduser/adduser.perl | |
parent | 6665f6b98c6c6963f728a0d11c8d346c331762ec (diff) |
Fix for the remainder of PR 402
Diffstat (limited to 'usr.sbin/adduser/adduser.perl')
-rw-r--r-- | usr.sbin/adduser/adduser.perl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 5d360e28a0d..732d546f6f9 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $OpenBSD: adduser.perl,v 1.6 1998/02/16 16:04:41 bitblt Exp $ +# $OpenBSD: adduser.perl,v 1.7 1998/02/16 16:44:24 bitblt Exp $ # # Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. # All rights reserved. @@ -645,10 +645,14 @@ sub new_users_sendmessage { local($cc) = &confirm_list("Send message to ``$name'' and:", - 1, "no", ("root", "second_mail_address", "no")); + 1, "no", ("root", "second_mail_address", + "no carbon copy")); local($e); $cc = "" if $cc eq "no"; + @message_buffer = (); + message_read ($send_message); + foreach $e (@message_buffer) { print eval "\"$e\""; } @@ -762,9 +766,9 @@ sub new_users { &new_users_pwdmkdb("$new_entry"); &new_users_group_update; &new_users_passwd_update; print "Added user ``$name''\n"; - &new_users_sendmessage; &adduser_log("$name:*:$u_id:$g_id($group_login):$fullname"); &home_create($name, $group_login); + &new_users_sendmessage; } else { $new_users_ok = 0; } @@ -1319,7 +1323,7 @@ EOF # read message file into buffer sub message_read { local($file) = @_; - @message_buffer = ''; + @message_buffer = (); if (!open(R, "$file")) { warn "File ``$file'':$!\n"; return 0; @@ -1443,7 +1447,7 @@ sub config_write { print C <<EOF; # -# $OpenBSD: adduser.perl,v 1.6 1998/02/16 16:04:41 bitblt Exp $ +# $OpenBSD: adduser.perl,v 1.7 1998/02/16 16:44:24 bitblt Exp $ # $config - automatic generated by adduser(8) # # Note: adduser read *and* write this file. |