r14205: move smb specific stuff out of includes.h (finally!!!:-)
authorStefan Metzmacher <metze@samba.org>
Sat, 11 Mar 2006 10:25:59 +0000 (10:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:03 +0000 (13:57 -0500)
all this changes really help ccache to speed up the samba4 build:-)

metze
(This used to be commit 180a79d1036e54fc0c50572b820818e9aafa28e9)

15 files changed:
source4/include/core.h
source4/include/includes.h
source4/include/smb.h
source4/include/structs.h
source4/libcli/raw/interfaces.h
source4/libcli/raw/raweas.c
source4/libcli/raw/rawlpq.c
source4/libcli/raw/rawrequest.c
source4/libcli/smb_composite/fetchfile.c
source4/librpc/rpc/dcerpc_connect.c
source4/ntvfs/ipc/ipc_rap.c
source4/smb_server/smb/trans2.c
source4/smbd/server.c
source4/torture/torture_util.c
source4/winbind/wb_init_domain.c

index ab5c1a55a362b7bd290015181f628d36800abbf9..28a14562eff4682c2d7d6f5db03c2843e80e3b7e 100644 (file)
@@ -58,4 +58,20 @@ struct ipv4_addr {
 
 typedef NTSTATUS (*init_module_fn) (void);
 
+/* 
+   use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really
+   just a dom sid, but with the sub_auths represented as a conformant
+   array. As with all in-structure conformant arrays, the array length
+   is placed before the start of the structure. That's what gives rise
+   to the extra num_auths elemenent. We don't want the Samba code to
+   have to bother with such esoteric NDR details, so its easier to just
+   define it as a dom_sid and use pidl magic to make it all work. It
+   just means you need to mark a sid as a "dom_sid2" in the IDL when you
+   know it is of the conformant array variety
+*/
+#define dom_sid2 dom_sid
+
+/* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
+#define dom_sid28 dom_sid
+
 #endif /* _SAMBA_CORE_H */
index 89d586b75cd3e27bce58efc5c3c3f62ad8661e4b..71fa67c251c3ac38ba7126ccf3f00ddfec9e1d7a 100644 (file)
@@ -119,8 +119,6 @@ enum brl_type {
 #include "librpc/ndr/ndr_orpc.h"
 #include "librpc/gen_ndr/orpc.h"
 #include "librpc/rpc/dcerpc.h"
-#include "libcli/raw/trans2.h"
-#include "libcli/raw/interfaces.h"
 #include "auth/credentials/credentials.h"
 #include "libcli/nbt/libnbt.h"
 #include "libcli/util/proto.h"
index 78a66dd20a5b5d6e135d0a741095dee8223e6f22..7b2f1e903c59f1272ecde27ae92ba0c3b9075d06 100644 (file)
 #define _smb2_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0xFF0000)>>16; \
         (buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
 
+#include "libcli/raw/trans2.h"
+#include "libcli/raw/interfaces.h"
+
 #endif /* _SMB_H */
index 5148f08a9b685f87c318893340bc48f5ec892bd5..124d97f493111c0cc7d100d53e59ba6ef8a650d5 100644 (file)
@@ -159,3 +159,7 @@ struct smbcli_session;
 struct smbcli_state;
 
 struct model_ops;
+
+struct smb_wire_string;
+
+union smb_fileinfo;
index 0505078fd4859ee4cf0e45764589420a87a38c9f..e476a00b68698fbf45015e9f1adf53442a27fd42 100644 (file)
    is always determined by NULL or packet termination a normal char*
    is used in the structure definition.
  */
-typedef struct {
+struct smb_wire_string {
        uint32_t private_length;
        const char *s;
-} WIRE_STRING;
-
-
-/* 
-   use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really
-   just a dom sid, but with the sub_auths represented as a conformant
-   array. As with all in-structure conformant arrays, the array length
-   is placed before the start of the structure. That's what gives rise
-   to the extra num_auths elemenent. We don't want the Samba code to
-   have to bother with such esoteric NDR details, so its easier to just
-   define it as a dom_sid and use pidl magic to make it all work. It
-   just means you need to mark a sid as a "dom_sid2" in the IDL when you
-   know it is of the conformant array variety
-*/
-#define dom_sid2 dom_sid
-
-/* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
-#define dom_sid28 dom_sid
+};
 
 /*
  a generic container for file handles
@@ -368,7 +351,7 @@ union smb_fileinfo {
                        uint_t num_eas;
                        struct ea_struct {
                                uint8_t flags;
-                               WIRE_STRING name;
+                               struct smb_wire_string name;
                                DATA_BLOB value;
                        } *eas;         
                        NTTIME create_time;
@@ -378,8 +361,8 @@ union smb_fileinfo {
                        uint64_t alloc_size;
                        uint64_t size;
                        uint32_t nlink;
-                       WIRE_STRING fname;      
-                       WIRE_STRING alt_fname;  
+                       struct smb_wire_string fname;   
+                       struct smb_wire_string alt_fname;       
                        uint8_t delete_pending;
                        uint8_t directory;
                        uint64_t compressed_size;
@@ -397,7 +380,7 @@ union smb_fileinfo {
                        struct stream_struct {
                                uint64_t size;
                                uint64_t alloc_size;
-                               WIRE_STRING stream_name;
+                               struct smb_wire_string stream_name;
                        } *streams;
                } out;
        } generic;
@@ -455,7 +438,7 @@ union smb_fileinfo {
                struct {
                        uint_t num_names;
                        struct ea_name {
-                               WIRE_STRING name;
+                               struct smb_wire_string name;
                        } *ea_names;    
                } in;   
 
@@ -528,7 +511,7 @@ union smb_fileinfo {
                union smb_file file;
 
                struct {
-                       WIRE_STRING fname;
+                       struct smb_wire_string fname;
                } out;
        } name_info;
 
@@ -549,7 +532,7 @@ union smb_fileinfo {
                        uint8_t delete_pending;
                        uint8_t directory;
                        uint32_t ea_size;
-                       WIRE_STRING fname;
+                       struct smb_wire_string fname;
                } out;
        } all_info;     
 
@@ -576,7 +559,7 @@ union smb_fileinfo {
                        uint32_t access_mask;
                        uint64_t position;
                        uint64_t mode;
-                       WIRE_STRING fname;
+                       struct smb_wire_string fname;
                } out;
        } all_info2;    
 
@@ -586,7 +569,7 @@ union smb_fileinfo {
                union smb_file file;
 
                struct {
-                       WIRE_STRING fname;
+                       struct smb_wire_string fname;
                } out;
        } alt_name_info;
 
@@ -643,7 +626,7 @@ union smb_fileinfo {
                union smb_file file;
 
                struct {
-                       WIRE_STRING link_dest;
+                       struct smb_wire_string link_dest;
                } out;
        } unix_link_info;
 
@@ -1009,7 +992,7 @@ union smb_fsinfo {
 
                struct {
                        uint32_t serial_number;
-                       WIRE_STRING volume_name;
+                       struct smb_wire_string volume_name;
                } out;
        } volume;
 
@@ -1021,7 +1004,7 @@ union smb_fsinfo {
                struct {
                        NTTIME create_time;
                        uint32_t serial_number;
-                       WIRE_STRING volume_name;
+                       struct smb_wire_string volume_name;
                } out;
        } volume_info;
 
@@ -1058,7 +1041,7 @@ union smb_fsinfo {
                struct {
                        uint32_t fs_attr;
                        uint32_t max_file_component_length;
-                       WIRE_STRING fs_type;
+                       struct smb_wire_string fs_type;
                } out;
        } attribute_info;
 
@@ -1741,7 +1724,7 @@ union smb_notify {
                        uint32_t num_changes;
                        struct notify_changes {
                                uint32_t action;
-                               WIRE_STRING name;
+                               struct smb_wire_string name;
                        } *changes;
                } out;
        } notify;
@@ -1876,7 +1859,7 @@ union smb_search_data {
                uint32_t size;
                uint32_t alloc_size;
                uint16_t attrib;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } standard;
 
        /* trans2 findfirst RAW_SEARCH_EA_SIZE level */
@@ -1889,7 +1872,7 @@ union smb_search_data {
                uint32_t alloc_size;
                uint16_t attrib;
                uint32_t ea_size;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } ea_size;
 
        /* trans2 findfirst RAW_SEARCH_EA_LIST level */
@@ -1902,7 +1885,7 @@ union smb_search_data {
                uint32_t alloc_size;
                uint16_t attrib;
                struct smb_ea_list eas;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } ea_list;
 
        /* RAW_SEARCH_DIRECTORY_INFO interface */
@@ -1915,7 +1898,7 @@ union smb_search_data {
                uint64_t  size;
                uint64_t  alloc_size;
                uint32_t   attrib;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } directory_info;
 
        /* RAW_SEARCH_FULL_DIRECTORY_INFO interface */
@@ -1929,13 +1912,13 @@ union smb_search_data {
                uint64_t  alloc_size;
                uint32_t   attrib;
                uint32_t   ea_size;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } full_directory_info;
 
        /* RAW_SEARCH_NAME_INFO interface */
        struct {
                uint32_t file_index;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } name_info;
 
        /* RAW_SEARCH_BOTH_DIRECTORY_INFO interface */
@@ -1949,8 +1932,8 @@ union smb_search_data {
                uint64_t  alloc_size;
                uint32_t   attrib;
                uint32_t   ea_size;
-               WIRE_STRING short_name;
-               WIRE_STRING name;
+               struct smb_wire_string short_name;
+               struct smb_wire_string name;
        } both_directory_info;
 
        /* RAW_SEARCH_ID_FULL_DIRECTORY_INFO interface */
@@ -1965,7 +1948,7 @@ union smb_search_data {
                uint32_t attrib;
                uint32_t ea_size;
                uint64_t file_id;
-               WIRE_STRING name;
+               struct smb_wire_string name;
        } id_full_directory_info;
 
        /* RAW_SEARCH_ID_BOTH_DIRECTORY_INFO interface */
@@ -1980,8 +1963,8 @@ union smb_search_data {
                uint32_t  attrib;
                uint32_t  ea_size;
                uint64_t file_id;
-               WIRE_STRING short_name;
-               WIRE_STRING name;
+               struct smb_wire_string short_name;
+               struct smb_wire_string name;
        } id_both_directory_info;
 
        /* RAW_SEARCH_UNIX_INFO interface */
index 4ab334413596edd281cf2034796041ed2b5db9a8..4c609aa59378fa61f734af8bd30e55f86c28117b 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "smb.h"
 
 /*
   work out how many bytes on the wire a ea list will consume. 
index 40669e51de938b0d7cd882e9c2c853d681beda8d..882ed3c302aaed25c550cca23b643ff9541cf158 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "smb.h"
 
 /****************************************************************************
  lpq - async send
index cd76e0e438f86dd39cea1a0b9cbf7b0b0a1b4546..b07a92e3fa4893e892f889177aa950f8099bf074 100644 (file)
@@ -827,7 +827,7 @@ static size_t smbcli_blob_pull_ascii(TALLOC_CTX *mem_ctx,
 }
 
 /*
-  pull a string from a blob, returning a talloced WIRE_STRING
+  pull a string from a blob, returning a talloced struct smb_wire_string
 
   the string length is limited by the 3 things:
    - the data size in the blob
@@ -843,7 +843,7 @@ static size_t smbcli_blob_pull_ascii(TALLOC_CTX *mem_ctx,
 size_t smbcli_blob_pull_string(struct smbcli_session *session,
                               TALLOC_CTX *mem_ctx,
                               const DATA_BLOB *blob, 
-                              WIRE_STRING *dest, 
+                              struct smb_wire_string *dest, 
                               uint16_t len_offset, uint16_t str_offset, 
                               uint_t flags)
 {
index 5783a3258f733086c4c79d5bea3b467c5e614f65..6ad70a3af71827548a659b35de9ac58f0ca3dded 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "smb.h"
 #include "libcli/composite/composite.h"
 #include "libcli/smb_composite/smb_composite.h"
 
index 973ddb9787c839515ac18baeeca50f10d8f8edd7..bea119d645d0a03b6a56c9f122da1edce135d08a 100644 (file)
@@ -25,6 +25,7 @@
 
 
 #include "includes.h"
+#include "smb.h"
 #include "libcli/composite/composite.h"
 #include "libcli/smb_composite/smb_composite.h"
 #include "libcli/smb2/smb2.h"
index bc9bc6f31e56dd203403388e87562e5aab829f2e..f683082d589d9df83ab33cf3949b4c4779f5836d 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "smb.h"
 #include "libcli/rap/rap.h"
 #include "ntvfs/ipc/proto.h"
 
index a02a7416741d217831222180d8bd2f7eb173a888..113828fbfa6417c64090351b46028b753b081cd9 100644 (file)
@@ -123,7 +123,7 @@ static size_t trans2_push_data_string(struct smbsrv_request *req,
                                      struct smb_trans2 *trans,
                                      uint32_t len_offset,
                                      uint32_t offset,
-                                     const WIRE_STRING *str,
+                                     const struct smb_wire_string *str,
                                      int dest_len,
                                      int flags)
 {
@@ -190,7 +190,7 @@ static size_t trans2_push_data_string(struct smbsrv_request *req,
 */
 static void trans2_append_data_string(struct smbsrv_request *req, 
                                        struct smb_trans2 *trans,
-                                       const WIRE_STRING *str,
+                                       const struct smb_wire_string *str,
                                        uint_t len_offset,
                                        int flags)
 {
index db2a13f29f57a307f61e4c5b5f17bc8612f4344a..c68c436d52a07844f275966d631c86b735557bf6 100644 (file)
@@ -32,6 +32,7 @@
 #include "build.h"
 #include "ldb/include/ldb.h"
 #include "registry/registry.h"
+#include "smb.h"
 #include "ntvfs/ntvfs.h"
 #include "ntptr/ntptr.h"
 #include "auth/gensec/gensec.h"
index bf227f4e9fe185796f148fb991c98ef48a9226d0..801c4b1e59b80a90abcf34622c55f3f32b1df17d 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "smb.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/libcli.h"
 #include "system/shmem.h"
@@ -274,7 +275,7 @@ void *shm_setup(int size)
   check that a wire string matches the flags specified 
   not 100% accurate, but close enough for testing
 */
-BOOL wire_bad_flags(WIRE_STRING *str, int flags, struct smbcli_state *cli)
+BOOL wire_bad_flags(struct smb_wire_string *str, int flags, struct smbcli_state *cli)
 {
        BOOL server_unicode;
        int len;
index 4045ddc2442b27c965c8866e566a7c136e953581..90371eb45725e2bf1da78eed81c7caf3d3da5056 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "smb.h"
 #include "libcli/composite/composite.h"
 #include "libcli/smb_composite/smb_composite.h"
 #include "winbind/wb_server.h"