summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-04-12 02:52:13 +0000
committerAndrew Tridgell <tridge@samba.org>1998-04-12 02:52:13 +0000
commit77da897307806830ecf36f0e4de41cf51d826e79 (patch)
tree996e599b14bb214f50113dae19f61aae5d988c23 /source3/smbd
parentb5f599daf77a366d6dabbd41567d49ffdbb5959d (diff)
downloadsamba-77da897307806830ecf36f0e4de41cf51d826e79.tar.gz
samba-77da897307806830ecf36f0e4de41cf51d826e79.tar.bz2
samba-77da897307806830ecf36f0e4de41cf51d826e79.zip
support O_SYNC at open time in files (previously we only supported it
on individual writes) (This used to be commit ce017a233ba5c68e340e0d31634f9bd93118b20a)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 1d3c2e144c..b86098f493 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1829,6 +1829,10 @@ void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
flags = O_RDONLY;
break;
}
+
+ if (share_mode&(1<<14)) {
+ flags2 |= O_SYNC;
+ }
if (flags != O_RDONLY && file_existed &&
(!CAN_WRITE(cnum) || IS_DOS_READONLY(dos_mode(cnum,fname,&sbuf))))