summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-03-29 11:08:12 +0100
committerJeremy Allison <jra@samba.org>2019-04-01 17:58:16 +0000
commitaac203907f1be6e58c1ff2dc7c55f602e755ddd3 (patch)
tree3d3bf0b8eed6c2ef3b5140f50d4762caf6cfab97 /source4
parentf1a1c300e192d43f5c9faf9450ffbf16341a2661 (diff)
downloadsamba-aac203907f1be6e58c1ff2dc7c55f602e755ddd3.tar.gz
libsmb: Rename InfoType from [MS-SMB2] according to the spec
This makes it easier to find this via internet search Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/smb2/getinfo.c10
-rw-r--r--source4/libcli/smb2/setinfo.c3
-rw-r--r--source4/smb_server/smb2/fileinfo.c16
-rw-r--r--source4/torture/smb2/compound.c4
-rw-r--r--source4/torture/smb2/getinfo.c6
5 files changed, 21 insertions, 18 deletions
diff --git a/source4/libcli/smb2/getinfo.c b/source4/libcli/smb2/getinfo.c
index 7a8fd44a855..fc97620ad24 100644
--- a/source4/libcli/smb2/getinfo.c
+++ b/source4/libcli/smb2/getinfo.c
@@ -112,9 +112,9 @@ NTSTATUS smb2_getinfo(struct smb2_tree *tree, TALLOC_CTX *mem_ctx,
*/
uint16_t smb2_getinfo_map_level(uint16_t level, uint8_t info_class)
{
- if (info_class == SMB2_GETINFO_FILE &&
+ if (info_class == SMB2_0_INFO_FILE &&
level == RAW_FILEINFO_SEC_DESC) {
- return SMB2_GETINFO_SECURITY;
+ return SMB2_0_INFO_SECURITY;
}
if ((level & 0xFF) == info_class) {
return level;
@@ -132,7 +132,8 @@ uint16_t smb2_getinfo_map_level(uint16_t level, uint8_t info_class)
struct smb2_request *smb2_getinfo_file_send(struct smb2_tree *tree, union smb_fileinfo *io)
{
struct smb2_getinfo b;
- uint16_t smb2_level = smb2_getinfo_map_level(io->generic.level, SMB2_GETINFO_FILE);
+ uint16_t smb2_level = smb2_getinfo_map_level(
+ io->generic.level, SMB2_0_INFO_FILE);
if (smb2_level == 0) {
return NULL;
@@ -190,7 +191,8 @@ NTSTATUS smb2_getinfo_file(struct smb2_tree *tree, TALLOC_CTX *mem_ctx,
struct smb2_request *smb2_getinfo_fs_send(struct smb2_tree *tree, union smb_fsinfo *io)
{
struct smb2_getinfo b;
- uint16_t smb2_level = smb2_getinfo_map_level(io->generic.level, SMB2_GETINFO_FS);
+ uint16_t smb2_level = smb2_getinfo_map_level(
+ io->generic.level, SMB2_0_INFO_FILESYSTEM);
if (smb2_level == 0) {
return NULL;
diff --git a/source4/libcli/smb2/setinfo.c b/source4/libcli/smb2/setinfo.c
index 69c0f45b63a..f8b50f6c4b6 100644
--- a/source4/libcli/smb2/setinfo.c
+++ b/source4/libcli/smb2/setinfo.c
@@ -83,7 +83,8 @@ NTSTATUS smb2_setinfo(struct smb2_tree *tree, struct smb2_setinfo *io)
struct smb2_request *smb2_setinfo_file_send(struct smb2_tree *tree, union smb_setfileinfo *io)
{
struct smb2_setinfo b;
- uint16_t smb2_level = smb2_getinfo_map_level(io->generic.level, SMB2_GETINFO_FILE);
+ uint16_t smb2_level = smb2_getinfo_map_level(
+ io->generic.level, SMB2_0_INFO_FILE);
struct smb2_request *req;
if (smb2_level == 0) {
diff --git a/source4/smb_server/smb2/fileinfo.c b/source4/smb_server/smb2/fileinfo.c
index 10ea4eb8c5b..a90c41a73ae 100644
--- a/source4/smb_server/smb2/fileinfo.c
+++ b/source4/smb_server/smb2/fileinfo.c
@@ -185,16 +185,16 @@ static NTSTATUS smb2srv_getinfo_security(struct smb2srv_getinfo_op *op, uint8_t
static NTSTATUS smb2srv_getinfo_backend(struct smb2srv_getinfo_op *op)
{
switch (op->info->in.info_type) {
- case SMB2_GETINFO_FILE:
+ case SMB2_0_INFO_FILE:
return smb2srv_getinfo_file(op, op->info->in.info_class);
- case SMB2_GETINFO_FS:
+ case SMB2_0_INFO_FILESYSTEM:
return smb2srv_getinfo_fs(op, op->info->in.info_class);
- case SMB2_GETINFO_SECURITY:
+ case SMB2_0_INFO_SECURITY:
return smb2srv_getinfo_security(op, op->info->in.info_class);
- case SMB2_GETINFO_QUOTA:
+ case SMB2_0_INFO_QUOTA:
return NT_STATUS_NOT_SUPPORTED;
}
@@ -338,16 +338,16 @@ static NTSTATUS smb2srv_setinfo_backend(struct smb2srv_setinfo_op *op)
smb2_level = 0xFF & (op->info->in.level>>8);
switch (smb2_class) {
- case SMB2_GETINFO_FILE:
+ case SMB2_0_INFO_FILE:
return smb2srv_setinfo_file(op, smb2_level);
- case SMB2_GETINFO_FS:
+ case SMB2_0_INFO_FILESYSTEM:
return smb2srv_setinfo_fs(op, smb2_level);
- case SMB2_GETINFO_SECURITY:
+ case SMB2_0_INFO_SECURITY:
return smb2srv_setinfo_security(op, smb2_level);
- case 0x04:
+ case SMB2_0_INFO_QUOTA:
return NT_STATUS_NOT_SUPPORTED;
}
diff --git a/source4/torture/smb2/compound.c b/source4/torture/smb2/compound.c
index 0257cc27b8d..a84efc20186 100644
--- a/source4/torture/smb2/compound.c
+++ b/source4/torture/smb2/compound.c
@@ -184,7 +184,7 @@ static bool test_compound_break(struct torture_context *tctx,
ZERO_STRUCT(gf);
gf.in.file.handle = h;
- gf.in.info_type = SMB2_GETINFO_FILE;
+ gf.in.info_type = SMB2_0_INFO_FILE;
gf.in.info_class = 0x16;
gf.in.output_buffer_length = 0x1000;
gf.in.input_buffer = data_blob_null;
@@ -1226,7 +1226,7 @@ static bool test_compound_interim2(struct torture_context *tctx,
ZERO_STRUCT(gf);
gf.in.file.handle = hd;
- gf.in.info_type = SMB2_GETINFO_FILE;
+ gf.in.info_type = SMB2_0_INFO_FILE;
gf.in.info_class = 0x04; /* FILE_BASIC_INFORMATION */
gf.in.output_buffer_length = 0x1000;
gf.in.input_buffer = data_blob_null;
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index d2307ab20a1..2e36082e067 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -285,7 +285,7 @@ static bool torture_smb2_qfs_buffercheck(struct torture_context *tctx)
}
ZERO_STRUCT(b);
- b.in.info_type = SMB2_GETINFO_FS;
+ b.in.info_type = SMB2_0_INFO_FILESYSTEM;
b.in.info_class = levels[i].level;
b.in.file.handle = handle;
b.in.output_buffer_length = 65535;
@@ -366,7 +366,7 @@ static bool torture_smb2_qfile_buffercheck(struct torture_context *tctx)
struct smb2_getinfo b;
ZERO_STRUCT(b);
- b.in.info_type = SMB2_GETINFO_FILE;
+ b.in.info_type = SMB2_0_INFO_FILE;
b.in.info_class = levels[i].level;
b.in.file.handle = handle;
b.in.output_buffer_length = 65535;
@@ -420,7 +420,7 @@ static bool torture_smb2_qsec_buffercheck(struct torture_context *tctx)
handle = c.out.file.handle;
ZERO_STRUCT(b);
- b.in.info_type = SMB2_GETINFO_SECURITY;
+ b.in.info_type = SMB2_0_INFO_SECURITY;
b.in.info_class = 0;
b.in.file.handle = handle;
b.in.output_buffer_length = 0;