From b706555b3a4ed3c8d459ae86b4c332fa41041f57 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Dec 2004 22:47:49 +0000 Subject: r4261: added the RAW_FILEINFO_EA_LIST trans2 qfileinfo and qpathinfo level. Interestingly, this level did now show up on our trans2 scanner previously as we didn't have the FLAGS2_EXTENDED_ATTRIBUTES bit set in the client code. Now that we set that bit, new levels appear in windows servers. (This used to be commit 0b76d405a73e924dc2706f28bbf1084a59c9b393) --- source4/smb_server/trans2.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source4/smb_server/trans2.c') diff --git a/source4/smb_server/trans2.c b/source4/smb_server/trans2.c index 3ca9bafcfa..0c827c92a1 100644 --- a/source4/smb_server/trans2.c +++ b/source4/smb_server/trans2.c @@ -614,6 +614,15 @@ static NTSTATUS trans2_fileinfo_fill(struct smbsrv_request *req, struct smb_tran st->alignment_information.out.alignment_requirement); return NT_STATUS_OK; + case RAW_FILEINFO_EA_LIST: + list_size = ea_list_size(st->ea_list.out.num_eas, + st->ea_list.out.eas); + trans2_setup_reply(req, trans, 2, list_size, 0); + SSVAL(trans->out.params.data, 0, 0); + ea_put_list(trans->out.data.data, + st->ea_list.out.num_eas, st->ea_list.out.eas); + return NT_STATUS_OK; + case RAW_FILEINFO_ALL_EAS: list_size = ea_list_size(st->all_eas.out.num_eas, st->all_eas.out.eas); @@ -753,6 +762,15 @@ static NTSTATUS trans2_qpathinfo(struct smbsrv_request *req, struct smb_trans2 * return NT_STATUS_INVALID_LEVEL; } + if (st.generic.level == RAW_FILEINFO_EA_LIST) { + status = ea_pull_name_list(&trans->in.data, req, + &st.ea_list.in.num_names, + &st.ea_list.in.ea_names); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + } + /* call the backend */ status = ntvfs_qpathinfo(req, &st); if (!NT_STATUS_IS_OK(status)) { @@ -789,6 +807,15 @@ static NTSTATUS trans2_qfileinfo(struct smbsrv_request *req, struct smb_trans2 * return NT_STATUS_INVALID_LEVEL; } + if (st.generic.level == RAW_FILEINFO_EA_LIST) { + status = ea_pull_name_list(&trans->in.data, req, + &st.ea_list.in.num_names, + &st.ea_list.in.ea_names); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + } + /* call the backend */ status = ntvfs_qfileinfo(req, &st); if (!NT_STATUS_IS_OK(status)) { -- cgit