From 730791a6a864268c6f7033a498a151ecf31ca31c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 Apr 2001 19:17:54 +0000 Subject: Tidy up tmp file handling. Jeremy. (This used to be commit 1751a6316af91d5d2e31c3a7e8de2841aae033c7) --- source3/lib/smbrun.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source3') diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c index 5b05c64bf0..983c61f862 100644 --- a/source3/lib/smbrun.c +++ b/source3/lib/smbrun.c @@ -45,13 +45,8 @@ static BOOL setup_stdout_file(char *outfile,BOOL shared) gain_root_group_privilege(); } - if(sys_stat(outfile, &st) == 0) { - /* Check we're not deleting a device file. */ - if(st.st_mode & S_IFREG) - unlink(outfile); - else - flags = O_RDWR; - } + unlink(outfile); + /* now create the file */ fd = sys_open(outfile,flags,mode); -- cgit