diff options
| author | 2002-03-05 17:23:45 +0000 | |
|---|---|---|
| committer | 2002-03-05 17:23:45 +0000 | |
| commit | 518d82b22a95220d700a9c38a3c3a70f78a64d1f (patch) | |
| tree | 9c0c23626d84f61bdb808e36828ebedbb718d6f3 /usr.sbin/adduser/adduser.perl | |
| parent | style(9) for the example; Alexander Yurchenko (diff) | |
| download | wireguard-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/adduser.perl')
| -rw-r--r-- | usr.sbin/adduser/adduser.perl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index f9f94c175ae..ba66d903644 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.36 2002/02/23 18:54:55 espie Exp $ +# $OpenBSD: adduser.perl,v 1.37 2002/03/05 17:23:45 millert Exp $ # # Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. # All rights reserved. @@ -89,7 +89,7 @@ sub variables { $group = "/etc/group"; $pwd_mkdb = "pwd_mkdb -p"; # program for building passwd database $encryptionmethod = "blowfish"; - $rcsid = '$OpenBSD: adduser.perl,v 1.36 2002/02/23 18:54:55 espie Exp $'; + $rcsid = '$OpenBSD: adduser.perl,v 1.37 2002/03/05 17:23:45 millert Exp $'; # List of directories where shells located @path = ('/bin', '/usr/bin', '/usr/local/bin'); @@ -1535,7 +1535,7 @@ sub cleanup { } END { - if (-e $etc_ptmp && defined PTMP) { + if (-e $etc_ptmp && defined(fileno(PTMP))) { close PTMP; unlink($etc_ptmp) || warn "Error: unable to remove $etc_ptmp: $!\nPlease verify that $etc_ptmp no longer exists!\n"; } |
