summaryrefslogtreecommitdiff
path: root/source4/smb_server/trans2.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-17 22:47:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:29 -0500
commitb706555b3a4ed3c8d459ae86b4c332fa41041f57 (patch)
tree4c02c9c93a3033fa1a7f7d3ea6a2cd9a80093536 /source4/smb_server/trans2.c
parentdaae3bbb290ce0f4467c806acaefe3b1d6f4ae4d (diff)
downloadsamba-b706555b3a4ed3c8d459ae86b4c332fa41041f57.tar.gz
samba-b706555b3a4ed3c8d459ae86b4c332fa41041f57.tar.bz2
samba-b706555b3a4ed3c8d459ae86b4c332fa41041f57.zip
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)
Diffstat (limited to 'source4/smb_server/trans2.c')
-rw-r--r--source4/smb_server/trans2.c27
1 files changed, 27 insertions, 0 deletions
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)) {