diff options
Diffstat (limited to 'source/smbd/open.c')
-rw-r--r-- | source/smbd/open.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c index 0fa11a56c8..69551405bf 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -1375,7 +1375,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, } #endif /* O_SYNC */ - if (posix_open & (access_mask & FILE_APPEND_DATA)) { + if (posix_open && (access_mask & FILE_APPEND_DATA)) { flags2 |= O_APPEND; } @@ -1818,9 +1818,15 @@ NTSTATUS open_file_ntcreate(connection_struct *conn, if (lp_map_archive(SNUM(conn)) || lp_store_dos_attributes(SNUM(conn))) { if (!posix_open) { - file_set_dosmode(conn, fname, - new_dos_attributes | aARCH, NULL, - parent_dir); + SMB_STRUCT_STAT tmp_sbuf; + SET_STAT_INVALID(tmp_sbuf); + if (file_set_dosmode( + conn, fname, + new_dos_attributes | aARCH, + &tmp_sbuf, + parent_dir) == 0) { + unx_mode = tmp_sbuf.st_mode; + } } } } |