summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-21 18:26:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:14 -0500
commit2d88ade182404474e9df50866da8dc3da5fa9ec3 (patch)
tree78ed1d7be9dc88805adcc0eef854764aae4756f7 /source4/smb_server
parentca17b875b3b442704625f85afdd154c9b756ca5d (diff)
downloadsamba-2d88ade182404474e9df50866da8dc3da5fa9ec3.tar.gz
samba-2d88ade182404474e9df50866da8dc3da5fa9ec3.tar.bz2
samba-2d88ade182404474e9df50866da8dc3da5fa9ec3.zip
r16443: add push code for SMB2 levels
metze (This used to be commit 142680ab9b4ca04ea94ed40659358e1158f88c7a)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/trans2.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 4a39cad69a..ae2887341a 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -583,6 +583,7 @@ static NTSTATUS trans2_push_passthru_fileinfo(TALLOC_CTX *mem_ctx,
int default_str_flags)
{
uint_t i;
+ size_t list_size;
switch (level) {
case RAW_FILEINFO_BASIC_INFORMATION:
@@ -739,6 +740,41 @@ static NTSTATUS trans2_push_passthru_fileinfo(TALLOC_CTX *mem_ctx,
}
return NT_STATUS_OK;
+ case RAW_FILEINFO_SMB2_ALL_EAS:
+ list_size = ea_list_size_chained(st->all_eas.out.num_eas,
+ st->all_eas.out.eas);
+ TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, list_size));
+
+ ea_put_list_chained(blob->data,
+ st->all_eas.out.num_eas,
+ st->all_eas.out.eas);
+ return NT_STATUS_OK;
+
+ case RAW_FILEINFO_SMB2_ALL_INFORMATION:
+ TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 0x64));
+
+ push_nttime(blob->data, 0x00, st->all_info2.out.create_time);
+ push_nttime(blob->data, 0x08, st->all_info2.out.access_time);
+ push_nttime(blob->data, 0x10, st->all_info2.out.write_time);
+ push_nttime(blob->data, 0x18, st->all_info2.out.change_time);
+ SIVAL(blob->data, 0x20, st->all_info2.out.attrib);
+ SIVAL(blob->data, 0x24, st->all_info2.out.unknown1);
+ SBVAL(blob->data, 0x28, st->all_info2.out.alloc_size);
+ SBVAL(blob->data, 0x30, st->all_info2.out.size);
+ SIVAL(blob->data, 0x38, st->all_info2.out.nlink);
+ SCVAL(blob->data, 0x3C, st->all_info2.out.delete_pending);
+ SCVAL(blob->data, 0x3D, st->all_info2.out.directory);
+ SBVAL(blob->data, 0x40, st->all_info2.out.file_id);
+ SIVAL(blob->data, 0x48, st->all_info2.out.ea_size);
+ SIVAL(blob->data, 0x4C, st->all_info2.out.access_mask);
+ SBVAL(blob->data, 0x50, st->all_info2.out.position);
+ SBVAL(blob->data, 0x58, st->all_info2.out.mode);
+ TRANS2_CHECK(trans2_append_data_string(mem_ctx, blob,
+ st->all_info.out.fname.s,
+ 0x60, default_str_flags,
+ STR_UNICODE));
+ return NT_STATUS_OK;
+
default:
return NT_STATUS_INVALID_LEVEL;
}