diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-08-14 15:55:37 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-08-14 15:55:37 +0200 |
commit | 066969339dcd0352965de0ab1b5f693cf2a7fee8 (patch) | |
tree | df36cda53b0cb0050084516295cd1529e48f01ef /openbsd-compat/xmmap.c | |
parent | remove antique crypto restrictions text (diff) | |
download | openssh-066969339dcd0352965de0ab1b5f693cf2a7fee8.tar.xz openssh-066969339dcd0352965de0ab1b5f693cf2a7fee8.zip |
- (dtucker) [auth-krb5.c gss-serv-krb5.c openbsd-compat/xmmap.c]
Explicitly set umask for mkstemp; ok djm@
Diffstat (limited to 'openbsd-compat/xmmap.c')
-rw-r--r-- | openbsd-compat/xmmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c index f1a637a34..c8d59dee0 100644 --- a/openbsd-compat/xmmap.c +++ b/openbsd-compat/xmmap.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: xmmap.c,v 1.4 2004/05/13 06:39:34 dtucker Exp $ */ +/* $Id: xmmap.c,v 1.5 2004/08/14 13:55:38 dtucker Exp $ */ #include "includes.h" @@ -50,8 +50,11 @@ void *xmmap(size_t size) if (address == MAP_FAILED) { char tmpname[sizeof(MM_SWAP_TEMPLATE)] = MM_SWAP_TEMPLATE; int tmpfd; + mode_t old_umask; + old_umask = umask(0177); tmpfd = mkstemp(tmpname); + umask(old_umask); if (tmpfd == -1) fatal("mkstemp(\"%s\"): %s", MM_SWAP_TEMPLATE, strerror(errno)); |