Exit the file_init "recursion" only if we are actually already trying for

a second time. Checking for the plain temp filename was not enough,
as it may be set even though we are calling the function for the
first time.

fixes bin/15474 by Chuck Cranor
This commit is contained in:
pooka 2002-02-09 19:33:53 +00:00
parent fad7e32235
commit bbd559bc7a
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: exf.c,v 1.6 2002/01/13 11:57:38 aymeric Exp $ */ /* $NetBSD: exf.c,v 1.7 2002/02/09 19:33:53 pooka Exp $ */
/*- /*-
* Copyright (c) 1992, 1993, 1994 * Copyright (c) 1992, 1993, 1994
@ -187,7 +187,7 @@ file_init(sp, frp, rcv_name, flags)
/* /*
* Don't try to create a temporary support file twice. * Don't try to create a temporary support file twice.
*/ */
if (frp->tname != NULL) if (frp->tname != NULL && LF_ISSET(FS_OPENERR))
goto err; goto err;
if (opts_empty(sp, O_DIRECTORY, 0)) if (opts_empty(sp, O_DIRECTORY, 0))
goto err; goto err;