diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2003-03-18 19:01:46 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2003-03-18 19:01:46 +0000 |
commit | 5a2ee08d249b885397793f3988039a0c4d0d31b5 (patch) | |
tree | c331df1c433c6fcb6b662e38653fb89d7ad3b759 | |
parent | ea6771e22b7dd824378e6e565c4b49b542b11e70 (diff) | |
download | apr-5a2ee08d249b885397793f3988039a0c4d0d31b5.tar.gz |
Document an obvious problem lacking a simple solution - if we simply
propogate flags as passed without enforcing their values - the rest
of APR code will make invalid assumptions.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64421 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | file_io/unix/mktemp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/file_io/unix/mktemp.c b/file_io/unix/mktemp.c index 0c2676c19..1311a5221 100644 --- a/file_io/unix/mktemp.c +++ b/file_io/unix/mktemp.c @@ -225,6 +225,13 @@ APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_i if (fd == -1) { return errno; } + /* XXX: We must reset several flags values as passed-in, since + * mkstemp didn't subscribe to our preference flags. + * + * We either have to unset the flags, or fix up the fd and other + * xthread and inherit bits appropriately. Since gettemp() above + * calls apr_file_open, our flags are respected in that code path. + */ apr_os_file_put(fp, &fd, flags, p); (*fp)->fname = apr_pstrdup(p, template); |