aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/adduser/adduser.perl
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>1996-09-14 23:22:23 +0000
committerWolfram Schneider <wosch@FreeBSD.org>1996-09-14 23:22:23 +0000
commit896f207c80ce031f7547efef48badf9fb14669ed (patch)
tree1a2d044fe75df0dc4a5b2ae9e1ba2080788e98ce /usr.sbin/adduser/adduser.perl
parent728999c8b2fdaf30e63d8fbb4525e625c7100a8a (diff)
downloadsrc-896f207c80ce031f7547efef48badf9fb14669ed.tar.gz
src-896f207c80ce031f7547efef48badf9fb14669ed.zip
Do not backup master.passwd if pwd_mkdb returned an error. This
was to paranoid, pwd_mkdb(8) is carefully enough to not corrupt master.passwd on failure. Submitted by: joerg
Notes
Notes: svn path=/head/; revision=18302
Diffstat (limited to 'usr.sbin/adduser/adduser.perl')
-rw-r--r--usr.sbin/adduser/adduser.perl16
1 files changed, 3 insertions, 13 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl
index c7578989b53c..8e35578dbb0c 100644
--- a/usr.sbin/adduser/adduser.perl
+++ b/usr.sbin/adduser/adduser.perl
@@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: adduser.perl,v 1.16 1996/08/28 17:54:14 adam Exp $
+# $Id: adduser.perl,v 1.17 1996/09/11 08:36:54 jkh Exp $
# read variables
@@ -538,19 +538,9 @@ sub new_users_pwdmkdb {
system("$pwd_mkdb $etc_passwd");
if ($?) {
- local($crash) = "$etc_passwd.crash$$";
warn "$last\n";
- warn "``$pwd_mkdb'' failed, try to restore ...\n";
-
- open(R, "> $crash") || die "Sorry, give up\n";
- $j = join("\n", @passwd_backup);
- $j =~ s/\n//;
- print R $j . "\n";
- close R;
-
- system("$pwd_mkdb $crash");
- die "Sorry, give up\n" if $?;
- die "Successfully restore $etc_passwd. Exit.\n";
+ warn "``$pwd_mkdb'' failed\n";
+ exit($? >> 8);
}
}