diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2003-03-18 19:01:46 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2003-03-18 19:01:46 +0000 |
commit | 4c361904eeaaaa378ec0ea37d92a11f480a3a9ac (patch) | |
tree | c331df1c433c6fcb6b662e38653fb89d7ad3b759 | |
parent | 819bcf4cddd25dc1f43b712a2fdc31bb042d334c (diff) | |
download | libapr-4c361904eeaaaa378ec0ea37d92a11f480a3a9ac.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: http://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); |