1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +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 -
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))))