summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);