summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-05 19:17:54 +0000
committerJeremy Allison <jra@samba.org>2001-04-05 19:17:54 +0000
commit730791a6a864268c6f7033a498a151ecf31ca31c (patch)
tree9a689c9640339b30093bc422955f8f5cb2ec6ce9 /source3
parent852242a1b53069e5e6c8861f8243fe4a5016001a (diff)
downloadsamba-730791a6a864268c6f7033a498a151ecf31ca31c.tar.gz
samba-730791a6a864268c6f7033a498a151ecf31ca31c.tar.bz2
samba-730791a6a864268c6f7033a498a151ecf31ca31c.zip
Tidy up tmp file handling.
Jeremy. (This used to be commit 1751a6316af91d5d2e31c3a7e8de2841aae033c7)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbrun.c9
1 files changed, 2 insertions, 7 deletions
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);