diff options
-rw-r--r-- | source3/smbd/nttrans.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 93621dde61..b79bb0b8f2 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1220,7 +1220,25 @@ static void call_nt_transact_create(connection_struct *conn, SOFF_T(p,0,file_len); p += 8; if (flags & EXTENDED_RESPONSE_REQUIRED) { - SSVAL(p,2,0x7); + uint16_t file_status = (NO_EAS|NO_SUBSTREAMS|NO_REPARSETAG); + size_t num_names = 0; + unsigned int num_streams; + struct stream_struct *streams = NULL; + + /* Do we have any EA's ? */ + status = get_ea_names_from_file(ctx, conn, fsp, + smb_fname->base_name, NULL, &num_names); + if (NT_STATUS_IS_OK(status) && num_names) { + file_status &= ~NO_EAS; + } + status = SMB_VFS_STREAMINFO(conn, NULL, smb_fname->base_name, ctx, + &num_streams, &streams); + /* There is always one stream, ::$DATA. */ + if (NT_STATUS_IS_OK(status) && num_streams > 1) { + file_status &= ~NO_SUBSTREAMS; + } + TALLOC_FREE(streams); + SSVAL(p,2,file_status); } p += 4; SCVAL(p,0,fsp->is_directory ? 1 : 0); |