From 4c32978d973093903a5372a6f358275184bbcab2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 20 Apr 2009 23:58:26 +0200 Subject: Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if the system one is broken. --- source3/lib/smbrun.c | 2 +- source3/lib/util.c | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c index fdccd9ec97..14e6a7690c 100644 --- a/source3/lib/smbrun.c +++ b/source3/lib/smbrun.c @@ -42,7 +42,7 @@ static int setup_out_fd(void) } /* now create the file */ - fd = smb_mkstemp(path); + fd = mkstemp(path); if (fd == -1) { DEBUG(0,("setup_out_fd: Failed to create file %s. (%s)\n", diff --git a/source3/lib/util.c b/source3/lib/util.c index 75fd82709a..c86f259ce3 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2113,24 +2113,6 @@ int set_maxfiles(int requested_max) #endif } -/***************************************************************** - Possibly replace mkstemp if it is broken. -*****************************************************************/ - -int smb_mkstemp(char *name_template) -{ -#if HAVE_SECURE_MKSTEMP - return mkstemp(name_template); -#else - /* have a reasonable go at emulating it. Hope that - the system mktemp() isn't completly hopeless */ - char *p = mktemp(name_template); - if (!p) - return -1; - return open(p, O_CREAT|O_EXCL|O_RDWR, 0600); -#endif -} - /***************************************************************** malloc that aborts with smb_panic on fail or zero size. *****************************************************************/ -- cgit