1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

support O_SYNC at open time in files (previously we only supported it

on individual writes)
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent d361a06fa1
commit ce017a233b

View File

@ -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))))