r16406: use the generic smb_handle in smb2_getinfo/smb2_setinfo
authorStefan Metzmacher <metze@samba.org>
Tue, 20 Jun 2006 07:03:53 +0000 (07:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:09:13 +0000 (14:09 -0500)
metze
(This used to be commit dcc02df8297162a7fd913560194d9e821798dbe0)

source4/libcli/smb2/getinfo.c
source4/libcli/smb2/setinfo.c
source4/libcli/smb2/smb2_calls.h
source4/torture/smb2/scan.c

index 57a363b63f1e12a681a234b8742854f6a758d340..2af8032938e7216cdcb3080c9f2f464e8be8908d 100644 (file)
@@ -44,7 +44,7 @@ struct smb2_request *smb2_getinfo_send(struct smb2_tree *tree, struct smb2_getin
        SIVAL(req->out.body, 0x0C, io->in.unknown2);
        SIVAL(req->out.body, 0x10, io->in.flags);
        SIVAL(req->out.body, 0x14, io->in.flags2);
-       smb2_push_handle(req->out.body+0x18, &io->in.handle);
+       smb2_push_handle(req->out.body+0x18, &io->in.file.handle);
 
        smb2_transport_send(req);
 
@@ -118,7 +118,7 @@ struct smb2_request *smb2_getinfo_file_send(struct smb2_tree *tree, union smb_fi
 
        ZERO_STRUCT(b);
        b.in.max_response_size = 0x10000;
-       b.in.handle            = io->generic.in.file.handle;
+       b.in.file.handle       = io->generic.in.file.handle;
        b.in.level             = smb2_level;
 
        if (io->generic.level == RAW_FILEINFO_SEC_DESC) {
@@ -174,7 +174,7 @@ struct smb2_request *smb2_getinfo_fs_send(struct smb2_tree *tree, union smb_fsin
        
        ZERO_STRUCT(b);
        b.in.max_response_size = 0x10000;
-       b.in.handle            = io->generic.handle;
+       b.in.file.handle       = io->generic.handle;
        b.in.level             = smb2_level;
 
        return smb2_getinfo_send(tree, &b);
index 432034b13bd1d7078b2444b63f1f5c41da8a1c34..c5fc0577d609fdcd2144190c39ca438b4378224d 100644 (file)
@@ -45,7 +45,7 @@ struct smb2_request *smb2_setinfo_send(struct smb2_tree *tree, struct smb2_setin
        }
 
        SIVAL(req->out.body, 0x0C, io->in.flags);
-       smb2_push_handle(req->out.body+0x10, &io->in.handle);
+       smb2_push_handle(req->out.body+0x10, &io->in.file.handle);
 
        smb2_transport_send(req);
 
@@ -92,7 +92,7 @@ struct smb2_request *smb2_setinfo_file_send(struct smb2_tree *tree, union smb_se
 
        ZERO_STRUCT(b);
        b.in.level             = smb2_level;
-       b.in.handle            = io->generic.in.file.handle;
+       b.in.file.handle       = io->generic.in.file.handle;
        if (!smb_raw_setfileinfo_passthru(tree, io->generic.level, io, &b.in.blob)) {
                return NULL;
        }
index 6bee0dec91bb18c3e08cce84a6b1aeb1107181fe..f870ddb38a1346f0cf8523f8e7ff2a0d56cc1933 100644 (file)
@@ -75,7 +75,7 @@ struct smb2_getinfo {
                uint32_t unknown2;
                uint32_t flags; /* level specific */
                uint32_t flags2; /* used by all_eas level */
-               struct smb2_handle handle;
+               union smb_handle file;
        } in;
 
        struct {
@@ -93,7 +93,7 @@ struct smb2_setinfo {
        struct {
                uint16_t level;
                uint32_t flags;
-               struct smb2_handle handle;
+               union smb_handle file;
                DATA_BLOB blob;
        } in;
 };
index a1eb2e80e03ac450a27a9211c9302241ec8e016e..6191499cacbb2ddf9902fd68614bbc46372c9cf7 100644 (file)
@@ -74,7 +74,7 @@ BOOL torture_smb2_getinfo_scan(struct torture_context *torture)
                for (i=0;i<0x100;i++) {
                        io.in.level = (i<<8) | c;
 
-                       io.in.handle = fhandle;
+                       io.in.file.handle = fhandle;
                        status = smb2_getinfo(tree, mem_ctx, &io);
                        if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
                            !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
@@ -84,7 +84,7 @@ BOOL torture_smb2_getinfo_scan(struct torture_context *torture)
                                dump_data(1, io.out.blob.data, io.out.blob.length);
                        }
 
-                       io.in.handle = dhandle;
+                       io.in.file.handle = dhandle;
                        status = smb2_getinfo(tree, mem_ctx, &io);
                        if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
                            !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
@@ -132,7 +132,7 @@ BOOL torture_smb2_setinfo_scan(struct torture_context *torture)
        for (c=1;c<5;c++) {
                for (i=0;i<0x100;i++) {
                        io.in.level = (i<<8) | c;
-                       io.in.handle = handle;
+                       io.in.file.handle = handle;
                        status = smb2_setinfo(tree, &io);
                        if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) &&
                            !NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {