summaryrefslogtreecommitdiffstats
path: root/usr.sbin/adduser/rmuser.perl
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-03-05 17:23:45 +0000
committermillert <millert@openbsd.org>2002-03-05 17:23:45 +0000
commit518d82b22a95220d700a9c38a3c3a70f78a64d1f (patch)
tree9c0c23626d84f61bdb808e36828ebedbb718d6f3 /usr.sbin/adduser/rmuser.perl
parentstyle(9) for the example; Alexander Yurchenko (diff)
downloadwireguard-openbsd-518d82b22a95220d700a9c38a3c3a70f78a64d1f.tar.xz
wireguard-openbsd-518d82b22a95220d700a9c38a3c3a70f78a64d1f.zip
Don't delete ptmp if we didn't create it ourselves; Brian Poole
Diffstat (limited to 'usr.sbin/adduser/rmuser.perl')
-rw-r--r--usr.sbin/adduser/rmuser.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/adduser/rmuser.perl b/usr.sbin/adduser/rmuser.perl
index 0e97f722364..e5feebed107 100644
--- a/usr.sbin/adduser/rmuser.perl
+++ b/usr.sbin/adduser/rmuser.perl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# -*- perl -*-
#
-# $OpenBSD: rmuser.perl,v 1.4 2001/09/04 07:47:09 deraadt Exp $
+# $OpenBSD: rmuser.perl,v 1.5 2002/03/05 17:23:45 millert Exp $
#
# Copyright 1995, 1996 Guy Helmer, Madison, South Dakota 57042.
# All rights reserved.
@@ -51,7 +51,7 @@ $atjob_dir = "/var/at/jobs";
#$debug = 1;
END {
- if (-e $passwd_tmp) {
+ if (-e $passwd_tmp && defined(fileno(TMP_PW))) {
unlink($passwd_tmp) ||
warn "\n${whoami}: warning: couldn't unlink $passwd_tmp ($!)\n\tPlease investigate, as this file should not be left in the filesystem\n";
}