summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-29 11:17:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:37 -0500
commit826597bfa8313bcaf017cfb43e6f7535eb75e20f (patch)
treedbf51e6ce59e24828eb4bb8d25372199f6507366
parentbd1efc1235b647f6845fb7d6218cf2b4068e9f0a (diff)
downloadsamba-826597bfa8313bcaf017cfb43e6f7535eb75e20f.tar.gz
samba-826597bfa8313bcaf017cfb43e6f7535eb75e20f.tar.bz2
samba-826597bfa8313bcaf017cfb43e6f7535eb75e20f.zip
r16670: try to match the vista error codes a bit more
metze (This used to be commit 1a4978118d27e978c04997869a307b793582917b)
-rw-r--r--source4/smb_server/smb2/fileinfo.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/source4/smb_server/smb2/fileinfo.c b/source4/smb_server/smb2/fileinfo.c
index 74b316f6a4..32b7d1094e 100644
--- a/source4/smb_server/smb2/fileinfo.c
+++ b/source4/smb_server/smb2/fileinfo.c
@@ -173,7 +173,7 @@ static NTSTATUS smb2srv_getinfo_security(struct smb2srv_getinfo_op *op, uint8_t
return ntvfs_qfileinfo(op->req->ntvfs, io);
}
- return NT_STATUS_INVALID_INFO_CLASS;
+ return NT_STATUS_INVALID_PARAMETER;
}
static NTSTATUS smb2srv_getinfo_backend(struct smb2srv_getinfo_op *op)
@@ -193,9 +193,12 @@ static NTSTATUS smb2srv_getinfo_backend(struct smb2srv_getinfo_op *op)
case SMB2_GETINFO_SECURITY:
return smb2srv_getinfo_security(op, smb2_level);
+
+ case 0x04:
+ return NT_STATUS_NOT_SUPPORTED;
}
- return NT_STATUS_FOOBAR;
+ return NT_STATUS_INVALID_PARAMETER;
}
void smb2srv_getinfo_recv(struct smb2srv_request *req)
@@ -257,7 +260,21 @@ static NTSTATUS smb2srv_setinfo_file(struct smb2srv_setinfo_op *op, uint8_t smb2
static NTSTATUS smb2srv_setinfo_fs(struct smb2srv_setinfo_op *op, uint8_t smb2_level)
{
- return NT_STATUS_FOOBAR;
+ switch (smb2_level) {
+ case 0x02:
+ return NT_STATUS_NOT_IMPLEMENTED;
+
+ case 0x06:
+ return NT_STATUS_ACCESS_DENIED;
+
+ case 0x08:
+ return NT_STATUS_ACCESS_DENIED;
+
+ case 0x0A:
+ return NT_STATUS_ACCESS_DENIED;
+ }
+
+ return NT_STATUS_INVALID_INFO_CLASS;
}
static NTSTATUS smb2srv_setinfo_security(struct smb2srv_setinfo_op *op, uint8_t smb2_level)
@@ -305,9 +322,12 @@ static NTSTATUS smb2srv_setinfo_backend(struct smb2srv_setinfo_op *op)
case SMB2_GETINFO_SECURITY:
return smb2srv_setinfo_security(op, smb2_level);
+
+ case 0x04:
+ return NT_STATUS_NOT_SUPPORTED;
}
- return NT_STATUS_FOOBAR;
+ return NT_STATUS_INVALID_PARAMETER;
}
void smb2srv_setinfo_recv(struct smb2srv_request *req)