r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h)
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Nov 2004 06:42:15 +0000 (06:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:17 +0000 (13:05 -0500)
60 files changed:
source/auth/auth.c
source/client/client.c
source/include/asn_1.h
source/include/includes.h
source/include/structs.h
source/include/system/glob.h
source/include/system/network.h
source/include/system/wait.h
source/ldap_server/ldap_backend.c
source/ldap_server/ldap_server.c
source/lib/db_wrap.c
source/lib/events.c
source/lib/iconv.c
source/lib/messaging/messaging.c
source/lib/module.c
source/lib/netif/interface.c
source/lib/registry/common/reg_interface.c
source/lib/tdb/common/tdbutil.c
source/libads/krb5_setpw.c
source/libcli/auth/gensec_krb5.c
source/libcli/auth/gensec_ntlmssp.c
source/libcli/auth/gssapi_parse.c
source/libcli/auth/kerberos_verify.c
source/libcli/auth/spnego.c
source/libcli/auth/spnego_parse.c
source/libcli/ldap/ldap.c
source/libcli/raw/clisession.c
source/libcli/raw/clitransport.c
source/libcli/raw/rawrequest.c
source/libcli/util/asn1.c
source/librpc/ndr/ndr.c
source/librpc/rpc/dcerpc.c
source/librpc/rpc/dcerpc_sock.c
source/ntvfs/common/brlock.c
source/ntvfs/ipc/vfs_ipc.c
source/ntvfs/ntvfs_base.c
source/ntvfs/ntvfs_util.c
source/ntvfs/posix/pvfs_ioctl.c
source/ntvfs/posix/pvfs_lock.c
source/ntvfs/posix/pvfs_open.c
source/ntvfs/print/vfs_print.c
source/ntvfs/simple/vfs_simple.c
source/param/loadparm.c
source/rpc_server/dcerpc_server.c
source/rpc_server/handles.c
source/smb_server/conn.c
source/smb_server/negprot.c
source/smb_server/password.c
source/smb_server/request.c
source/smb_server/sesssetup.c
source/smb_server/smb_server.c
source/smbd/process_single.c
source/smbd/process_standard.c
source/smbd/service.c
source/torture/basic/aliases.c
source/torture/ldap/common.c
source/torture/nbench/nbio.c
source/torture/raw/ioctl.c
source/torture/torture.c
source/utils/ntlm_auth.c

index 7fe446baf950a536d8a5e1b98287a278ca3a7955..ae8b29e87d2c0036f48117a32e09c89e4ba25759 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 #include "auth/auth.h"
 
 #undef DBGC_CLASS
index 14d31628c70c29c972d2b6913ea9ad0eb875fc99..e80d4ebef46d335b4ff55b5fdc20f1c48e54adbc 100644 (file)
@@ -27,6 +27,7 @@
 #include "libcli/raw/libcliraw.h"
 #include "system/time.h"
 #include "system/dir.h"
+#include "dlinklist.h"
 
 #ifndef REGISTER
 #define REGISTER 0
index c10b03164ae17a1a0e83c291956ab36ec628e28f..4243f6d31f55c32852245cab0bc9d3885868a5fc 100644 (file)
@@ -27,13 +27,13 @@ struct nesting {
        struct nesting *next;
 };
 
-typedef struct asn1_data {
+struct asn1_data {
        uint8_t *data;
        size_t length;
        off_t ofs;
        struct nesting *nesting;
        BOOL has_error;
-} ASN1_DATA;
+};
 
 #define ASN1_APPLICATION(x) ((x)+0x60)
 #define ASN1_APPLICATION_SIMPLE(x) ((x)+0x40)
index 58f8e80803fb17a82e38665ed79092700c6241b1..0721ef4879f25535f5ec0e1aee6a6dc353a46066 100644 (file)
 #define VOLATILE
 #endif
 
-/*
- * Define additional missing types
- */
-#ifndef HAVE_SIG_ATOMIC_T_TYPE
-typedef int sig_atomic_t;
-#endif
-
-#ifndef HAVE_SOCKLEN_T_TYPE
-typedef int socklen_t;
-#endif
-
-
 /*
    Samba needs type definitions for 
    int8_t,  int16_t,  int32_t, int64_t 
@@ -194,7 +182,6 @@ extern int errno;
 
 /* Lists, trees, caching, database... */
 #include "xfile.h"
-#include "dlinklist.h"
 #include "talloc.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/tdb/include/tdb.h"
@@ -203,9 +190,7 @@ extern int errno;
 #include "db_wrap.h"
 #include "nt_status.h"
 #include "trans2.h"
-#include "ioctl.h"
 #include "nterr.h"
-#include "messages.h"
 #include "charset.h"
 #include "dynconfig.h"
 
@@ -221,8 +206,6 @@ extern int errno;
 
 #include "module.h"
 
-#include "asn_1.h"
-
 #include "mutex.h"
 
 #include "structs.h"
index 609f7df8fd23fab58ff334743c78a1f69a30515b..4820551b259493b37d4fdf29fc3d6034de76ede7 100644 (file)
@@ -65,3 +65,6 @@ struct spnego_data;
 struct gensec_security;
 typedef NTSTATUS (*gensec_password_callback)(struct gensec_security *gensec_security, TALLOC_CTX *mem_ctx, 
                                             char **password);
+
+struct asn1_data;
+
index fc56a18b9a69e530ab0663712ec29664c9b8949d..676030b79941f000be0ce82c9dd243c013a2c939 100644 (file)
@@ -24,3 +24,4 @@
 #include <glob.h>
 #endif
 
+#include <fnmatch.h>
index d380245865d3801a23d855812fff564b416d871b..dfecd59090d4004528b186456a39f6d79ad0f4db 100644 (file)
@@ -78,3 +78,6 @@
 #define MAXHOSTNAMELEN 254
 #endif
 
+#ifndef HAVE_SOCKLEN_T_TYPE
+typedef int socklen_t;
+#endif
index 29e5c6fe6638b0a6f763fa4e7896d1cfa3dbeda3..6af01986f9279d2761432efe0267be1c00ca5b57 100644 (file)
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
+
+/*
+ * Define additional missing types
+ */
+#ifndef HAVE_SIG_ATOMIC_T_TYPE
+typedef int sig_atomic_t;
+#endif
+
index 03df64f922b503834bb29dfe52749c7b4b99769c..c4d44888c4f04b3623d22f0c082f8e3d5c5b28d1 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 
 struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, enum ldap_request_tag type)
index 0cc83eca6503daadbb9dc92b98fdcef76732a694..0ef3a523e8d8afc8a128440d21ca030f32cab8bf 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "dlinklist.h"
+#include "asn_1.h"
 
 /*
   close the socket and shutdown a server_context
@@ -443,7 +445,7 @@ static void ldapsrv_recv(struct server_connection *conn, time_t t,
        uint8_t *buf;
        int buf_length, msg_length;
        DATA_BLOB blob;
-       ASN1_DATA data;
+       struct asn1_data data;
        struct ldapsrv_call *call;
        NTSTATUS status;
 
index 251741c5b0465606952aae2226d40178d68b38b0..c7861854991b4bc32611173be41c8bbc727533ba 100644 (file)
@@ -28,6 +28,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 static struct ldb_wrap *ldb_list;
 static struct tdb_wrap *tdb_list;
index 276b3d08e98f4bd00039e4900ab157b4b1e8d4c6..4fb1e42ba3f878b17a3d8f3b626be2b1f94ec453 100644 (file)
@@ -67,6 +67,7 @@
 #include "includes.h"
 #include "system/time.h"
 #include "system/select.h"
+#include "dlinklist.h"
 
 /*
   create a event_context structure. This must be the first events
index 98905c4b84446610d0bc1c5dd8d48b64668f6301..c4fea25db59893f66a76a60f1bf9b5093abf92bb 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 #include "system/iconv.h"
 
 
index a2316919cbca565c29481af3f79ff996991dd490..48d608ee94250f8f0fc92603f25935b91bf2e575 100644 (file)
@@ -22,6 +22,8 @@
 
 #include "includes.h"
 #include "system/time.h"
+#include "messages.h"
+#include "dlinklist.h"
 
 /* change the message version with any incompatible changes in the protocol */
 #define MESSAGING_VERSION 1
index 9e568f601adde6d7ae02a2c2caa17e89a20b3ac1..80360e4e728f68140e50063d3f1ce735527c4098 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "system/dir.h"
 #include "system/filesys.h"
+#include "dlinklist.h"
 
 #ifdef HAVE_DLOPEN
 
index 1db0f5caee5f0d7792f0e2bc49835626e7975e90..3555170123fec820186adbd73578e00814723dee 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "lib/netif/netif.h"
+#include "dlinklist.h"
 
 static struct iface_struct *probed_ifaces;
 static int total_probed;
index 70b600ba338667710ed1c19e284ed25eaf5ddd08..76a1d04b086893e7aeed05bfd3459d92abcff289 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 0e0a6eca28229919e4672e466aa9f8f0d7bc7caf..c9b5dc05e6c825e292b52a6747fced266f8fb5b1 100644 (file)
@@ -19,7 +19,8 @@
 */
 
 #include "includes.h"
-#include <fnmatch.h>
+#include "system/glob.h"
+#include "dlinklist.h"
 
 /* these are little tdb utility functions that are meant to make
    dealing with a tdb database a little less cumbersome in Samba */
index f6a5b9375c848768602f220e56791f101d2bdfdb..257c28e755afc4cb6ea2f9ca9b2833f04b193c88 100644 (file)
@@ -49,8 +49,7 @@ static DATA_BLOB encode_krb5_setpw(const char *principal, const char *password)
        char* realm = NULL;
        char* c;
        char* princ;
-
-       ASN1_DATA req;
+       struct asn1_data req;
        DATA_BLOB ret;
 
 
index 0e374e8219dbdb1175356afe7fcb78957dbc9820..c3dd84135a8d72ff6f4d40d5595a044ab714fb4e 100644 (file)
@@ -28,6 +28,7 @@
 #include "libcli/auth/kerberos.h"
 #include "librpc/gen_ndr/ndr_krb5pac.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index 4b1d5f3b0267063f372aee004e3ec97ca32a0927..8ab90ebcfb252f3216904dc18801818be35d3aee 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 struct gensec_ntlmssp_state {
        struct auth_context *auth_context;
index 4a80e1d79920d37839bb9a0838fecc52c8acc168..529799955dd70cb658e0151307efe67d1a5f97af 100644 (file)
 */
 
 #include "includes.h"
+#include "asn_1.h"
 
 /*
   generate a krb5 GSS-API wrapper packet given a ticket
 */
 DATA_BLOB gensec_gssapi_gen_krb5_wrap(TALLOC_CTX *mem_ctx, const DATA_BLOB *ticket, const uint8 tok_id[2])
 {
-       ASN1_DATA data;
+       struct asn1_data data;
        DATA_BLOB ret;
 
        ZERO_STRUCT(data);
@@ -58,7 +59,7 @@ DATA_BLOB gensec_gssapi_gen_krb5_wrap(TALLOC_CTX *mem_ctx, const DATA_BLOB *tick
 BOOL gensec_gssapi_parse_krb5_wrap(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, DATA_BLOB *ticket, uint8 tok_id[2])
 {
        BOOL ret;
-       ASN1_DATA data;
+       struct asn1_data data;
        int data_remaining;
 
        asn1_load(&data, *blob);
index 8e598e2a66448253f9d075fa3ae187257304c1ee..6d87cf8d8b6d527e75206c73ea9d627a5efae500 100644 (file)
@@ -25,6 +25,7 @@
 #include "includes.h"
 #include "system/kerberos.h"
 #include "libcli/auth/kerberos.h"
+#include "asn_1.h"
 
 #ifdef HAVE_KRB5
 
@@ -32,7 +33,7 @@ static DATA_BLOB unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data)
 {
        DATA_BLOB out;
        DATA_BLOB pac_contents = data_blob(NULL, 0);
-       ASN1_DATA data;
+       struct asn1_data data;
        int data_type;
        if (!auth_data->length) {
                return data_blob(NULL, 0);
index ef9763cad7bd82e398feb10c8b5320714a987ed2..ab3aff32bba8da01267b5ef07e01ea2c08180c05 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index d6eacc4a6ab6e1f4dcc59a7732756d33c1a87473..f9385ed96e3c4aafa00caaf6722b7c2660e788ea 100644 (file)
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
 
-static BOOL read_negTokenInit(ASN1_DATA *asn1, struct spnego_negTokenInit *token)
+static BOOL read_negTokenInit(struct asn1_data *asn1, struct spnego_negTokenInit *token)
 {
        ZERO_STRUCTP(token);
 
@@ -117,7 +118,7 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, struct spnego_negTokenInit *token
        return !asn1->has_error;
 }
 
-static BOOL write_negTokenInit(ASN1_DATA *asn1, struct spnego_negTokenInit *token)
+static BOOL write_negTokenInit(struct asn1_data *asn1, struct spnego_negTokenInit *token)
 {
        asn1_push_tag(asn1, ASN1_CONTEXT(0));
        asn1_push_tag(asn1, ASN1_SEQUENCE(0));
@@ -180,7 +181,7 @@ static BOOL write_negTokenInit(ASN1_DATA *asn1, struct spnego_negTokenInit *toke
        return !asn1->has_error;
 }
 
-static BOOL read_negTokenTarg(ASN1_DATA *asn1, struct spnego_negTokenTarg *token)
+static BOOL read_negTokenTarg(struct asn1_data *asn1, struct spnego_negTokenTarg *token)
 {
        ZERO_STRUCTP(token);
 
@@ -229,7 +230,7 @@ static BOOL read_negTokenTarg(ASN1_DATA *asn1, struct spnego_negTokenTarg *token
        return !asn1->has_error;
 }
 
-static BOOL write_negTokenTarg(ASN1_DATA *asn1, struct spnego_negTokenTarg *token)
+static BOOL write_negTokenTarg(struct asn1_data *asn1, struct spnego_negTokenTarg *token)
 {
        asn1_push_tag(asn1, ASN1_CONTEXT(1));
        asn1_push_tag(asn1, ASN1_SEQUENCE(0));
@@ -268,7 +269,7 @@ static BOOL write_negTokenTarg(ASN1_DATA *asn1, struct spnego_negTokenTarg *toke
 
 ssize_t spnego_read_data(DATA_BLOB data, struct spnego_data *token)
 {
-       ASN1_DATA asn1;
+       struct asn1_data asn1;
        ssize_t ret = -1;
        uint8_t context;
 
@@ -312,7 +313,7 @@ ssize_t spnego_read_data(DATA_BLOB data, struct spnego_data *token)
 
 ssize_t spnego_write_data(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct spnego_data *spnego)
 {
-       ASN1_DATA asn1;
+       struct asn1_data asn1;
        ssize_t ret = -1;
 
        ZERO_STRUCT(asn1);
index 9b481313e3fd07d3188a74a5e381f2c61b1dcea7..5224373afc43f08d36008ab1d6064b88f7449c88 100644 (file)
@@ -27,6 +27,8 @@
 #include "system/network.h"
 #include "system/iconv.h"
 #include "auth/auth.h"
+#include "asn_1.h"
+#include "dlinklist.h"
 
 /****************************************************************************
  *
@@ -303,7 +305,7 @@ static struct ldap_parse_tree *ldap_parse_tree(TALLOC_CTX *mem_ctx, const char *
        return ldap_parse_simple(mem_ctx, s);
 }
 
-static BOOL ldap_push_filter(ASN1_DATA *data, struct ldap_parse_tree *tree)
+static BOOL ldap_push_filter(struct asn1_data *data, struct ldap_parse_tree *tree)
 {
        switch (tree->operation) {
        case LDAP_OP_SIMPLE: {
@@ -354,7 +356,7 @@ static BOOL ldap_push_filter(ASN1_DATA *data, struct ldap_parse_tree *tree)
        return !data->has_error;
 }
 
-static void ldap_encode_response(ASN1_DATA *data, struct ldap_Result *result)
+static void ldap_encode_response(struct asn1_data *data, struct ldap_Result *result)
 {
        asn1_write_enumerated(data, result->resultcode);
        asn1_write_OctetString(data, result->dn,
@@ -369,7 +371,7 @@ static void ldap_encode_response(ASN1_DATA *data, struct ldap_Result *result)
 
 BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result)
 {
-       ASN1_DATA data;
+       struct asn1_data data;
        int i, j;
 
        ZERO_STRUCT(data);
@@ -663,7 +665,7 @@ static const char *blob2string_talloc(TALLOC_CTX *mem_ctx,
 }
 
 static BOOL asn1_read_OctetString_talloc(TALLOC_CTX *mem_ctx,
-                                        ASN1_DATA *data,
+                                        struct asn1_data *data,
                                         const char **result)
 {
        DATA_BLOB string;
@@ -675,7 +677,7 @@ static BOOL asn1_read_OctetString_talloc(TALLOC_CTX *mem_ctx,
 }
 
 static void ldap_decode_response(TALLOC_CTX *mem_ctx,
-                                ASN1_DATA *data,
+                                struct asn1_data *data,
                                 struct ldap_Result *result)
 {
        asn1_read_enumerated(data, &result->resultcode);
@@ -690,7 +692,7 @@ static void ldap_decode_response(TALLOC_CTX *mem_ctx,
        }
 }
 
-static BOOL ldap_decode_filter(TALLOC_CTX *mem_ctx, ASN1_DATA *data,
+static BOOL ldap_decode_filter(TALLOC_CTX *mem_ctx, struct asn1_data *data,
                               char **filter)
 {
        uint8 filter_tag, tag_desc;
@@ -795,7 +797,7 @@ static BOOL ldap_decode_filter(TALLOC_CTX *mem_ctx, ASN1_DATA *data,
        return True;
 }
 
-static void ldap_decode_attrib(TALLOC_CTX *mem_ctx, ASN1_DATA *data,
+static void ldap_decode_attrib(TALLOC_CTX *mem_ctx, struct asn1_data *data,
                               struct ldap_attribute *attrib)
 {
        asn1_start_tag(data, ASN1_SEQUENCE(0));
@@ -815,7 +817,7 @@ static void ldap_decode_attrib(TALLOC_CTX *mem_ctx, ASN1_DATA *data,
        
 }
 
-static void ldap_decode_attribs(TALLOC_CTX *mem_ctx, ASN1_DATA *data,
+static void ldap_decode_attribs(TALLOC_CTX *mem_ctx, struct asn1_data *data,
                                struct ldap_attribute **attributes,
                                int *num_attributes)
 {
@@ -830,7 +832,7 @@ static void ldap_decode_attribs(TALLOC_CTX *mem_ctx, ASN1_DATA *data,
        asn1_end_tag(data);
 }
 
-BOOL ldap_decode(ASN1_DATA *data, struct ldap_message *msg)
+BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg)
 {
        uint8 tag;
 
index 23e1d8507ee4751c642893eddf5c4fad546cc28d..b7802d8065cb212fbc3aca6b8e6e4e8efd287ad2 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 #define SETUP_REQUEST_SESSION(cmd, wct, buflen) do { \
        req = smbcli_request_setup_session(session, cmd, wct, buflen); \
index e70ee915c6ff60937583d0f0a2dfbf309303f3e9..c5e3d3954523f25ee81c9565af64a7090054f306 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
 #include "system/time.h"
+#include "dlinklist.h"
 
 
 static void smbcli_transport_process_recv(struct smbcli_transport *transport);
index 5cf1621d2d668e67ee1392d5c53088b1cfc98f5a..0526fec74b4fb4b97ef5f5e3ed40c49f6e3582bd 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
+#include "dlinklist.h"
 
 /* we over allocate the data buffer to prevent too many realloc calls */
 #define REQ_OVER_ALLOCATION 256
index e03b1d5f3917784a6a51bfcd4af892ba2fd9c81f..15858f4f75c315c5bee991336edf465dfccda7a3 100644 (file)
 */
 
 #include "includes.h"
+#include "asn_1.h"
 
 /* free an asn1 structure */
-void asn1_free(ASN1_DATA *data)
+void asn1_free(struct asn1_data *data)
 {
        talloc_free(data->data);
 }
 
 /* write to the ASN1 buffer, advancing the buffer pointer */
-BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
+BOOL asn1_write(struct asn1_data *data, const void *p, int len)
 {
        if (data->has_error) return False;
        if (data->length < data->ofs+len) {
@@ -47,13 +48,13 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
 }
 
 /* useful fn for writing a uint8_t */
-BOOL asn1_write_uint8(ASN1_DATA *data, uint8_t v)
+BOOL asn1_write_uint8(struct asn1_data *data, uint8_t v)
 {
        return asn1_write(data, &v, 1);
 }
 
 /* push a tag onto the asn1 data buffer. Used for nested structures */
-BOOL asn1_push_tag(ASN1_DATA *data, uint8_t tag)
+BOOL asn1_push_tag(struct asn1_data *data, uint8_t tag)
 {
        struct nesting *nesting;
 
@@ -71,7 +72,7 @@ BOOL asn1_push_tag(ASN1_DATA *data, uint8_t tag)
 }
 
 /* pop a tag */
-BOOL asn1_pop_tag(ASN1_DATA *data)
+BOOL asn1_pop_tag(struct asn1_data *data)
 {
        struct nesting *nesting;
        size_t len;
@@ -110,7 +111,7 @@ BOOL asn1_pop_tag(ASN1_DATA *data)
 /* "i" is the one's complement representation, as is the normal result of an
  * implicit signed->unsigned conversion */
 
-static BOOL push_int_bigendian(ASN1_DATA *data, unsigned int i, BOOL negative)
+static BOOL push_int_bigendian(struct asn1_data *data, unsigned int i, BOOL negative)
 {
        uint8_t lowest = i & 0xFF;
 
@@ -153,7 +154,7 @@ static BOOL push_int_bigendian(ASN1_DATA *data, unsigned int i, BOOL negative)
 /* write an Integer without the tag framing. Needed for example for the LDAP
  * Abandon Operation */
 
-BOOL asn1_write_implicit_Integer(ASN1_DATA *data, int i)
+BOOL asn1_write_implicit_Integer(struct asn1_data *data, int i)
 {
        if (i == -1) {
                /* -1 is special as it consists of all-0xff bytes. In
@@ -168,7 +169,7 @@ BOOL asn1_write_implicit_Integer(ASN1_DATA *data, int i)
 
 
 /* write an integer */
-BOOL asn1_write_Integer(ASN1_DATA *data, int i)
+BOOL asn1_write_Integer(struct asn1_data *data, int i)
 {
        if (!asn1_push_tag(data, ASN1_INTEGER)) return False;
        if (!asn1_write_implicit_Integer(data, i)) return False;
@@ -176,7 +177,7 @@ BOOL asn1_write_Integer(ASN1_DATA *data, int i)
 }
 
 /* write an object ID to a ASN1 buffer */
-BOOL asn1_write_OID(ASN1_DATA *data, const char *OID)
+BOOL asn1_write_OID(struct asn1_data *data, const char *OID)
 {
        uint_t v, v2;
        const char *p = (const char *)OID;
@@ -205,7 +206,7 @@ BOOL asn1_write_OID(ASN1_DATA *data, const char *OID)
 }
 
 /* write an octet string */
-BOOL asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
+BOOL asn1_write_OctetString(struct asn1_data *data, const void *p, size_t length)
 {
        asn1_push_tag(data, ASN1_OCTET_STRING);
        asn1_write(data, p, length);
@@ -214,7 +215,7 @@ BOOL asn1_write_OctetString(ASN1_DATA *data, const void *p, size_t length)
 }
 
 /* write a general string */
-BOOL asn1_write_GeneralString(ASN1_DATA *data, const char *s)
+BOOL asn1_write_GeneralString(struct asn1_data *data, const char *s)
 {
        asn1_push_tag(data, ASN1_GENERAL_STRING);
        asn1_write(data, s, strlen(s));
@@ -222,7 +223,7 @@ BOOL asn1_write_GeneralString(ASN1_DATA *data, const char *s)
        return !data->has_error;
 }
 
-BOOL asn1_write_ContextSimple(ASN1_DATA *data, uint8_t num, DATA_BLOB *blob)
+BOOL asn1_write_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *blob)
 {
        asn1_push_tag(data, ASN1_CONTEXT_SIMPLE(num));
        asn1_write(data, blob->data, blob->length);
@@ -231,7 +232,7 @@ BOOL asn1_write_ContextSimple(ASN1_DATA *data, uint8_t num, DATA_BLOB *blob)
 }
 
 /* write a BOOLEAN */
-BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
+BOOL asn1_write_BOOLEAN(struct asn1_data *data, BOOL v)
 {
        asn1_push_tag(data, ASN1_BOOLEAN);
        asn1_write_uint8(data, v ? 0xFF : 0);
@@ -239,7 +240,7 @@ BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
        return !data->has_error;
 }
 
-BOOL asn1_read_BOOLEAN(ASN1_DATA *data, BOOL *v)
+BOOL asn1_read_BOOLEAN(struct asn1_data *data, BOOL *v)
 {
        uint8_t tmp = 0;
        asn1_start_tag(data, ASN1_BOOLEAN);
@@ -254,7 +255,7 @@ BOOL asn1_read_BOOLEAN(ASN1_DATA *data, BOOL *v)
 }
 
 /* check a BOOLEAN */
-BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
+BOOL asn1_check_BOOLEAN(struct asn1_data *data, BOOL v)
 {
        uint8_t b = 0;
 
@@ -272,8 +273,8 @@ BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
 }
 
 
-/* load a ASN1_DATA structure with a lump of data, ready to be parsed */
-BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob)
+/* load a struct asn1_data structure with a lump of data, ready to be parsed */
+BOOL asn1_load(struct asn1_data *data, DATA_BLOB blob)
 {
        ZERO_STRUCTP(data);
        data->data = talloc_memdup(NULL, blob.data, blob.length);
@@ -286,7 +287,7 @@ BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob)
 }
 
 /* Peek into an ASN1 buffer, not advancing the pointer */
-BOOL asn1_peek(ASN1_DATA *data, void *p, int len)
+BOOL asn1_peek(struct asn1_data *data, void *p, int len)
 {
        if (len < 0 || data->ofs + len < data->ofs || data->ofs + len < len)
                return False;
@@ -299,7 +300,7 @@ BOOL asn1_peek(ASN1_DATA *data, void *p, int len)
 }
 
 /* read from a ASN1 buffer, advancing the buffer pointer */
-BOOL asn1_read(ASN1_DATA *data, void *p, int len)
+BOOL asn1_read(struct asn1_data *data, void *p, int len)
 {
        if (!asn1_peek(data, p, len)) {
                data->has_error = True;
@@ -311,17 +312,17 @@ BOOL asn1_read(ASN1_DATA *data, void *p, int len)
 }
 
 /* read a uint8_t from a ASN1 buffer */
-BOOL asn1_read_uint8(ASN1_DATA *data, uint8_t *v)
+BOOL asn1_read_uint8(struct asn1_data *data, uint8_t *v)
 {
        return asn1_read(data, v, 1);
 }
 
-BOOL asn1_peek_uint8(ASN1_DATA *data, uint8_t *v)
+BOOL asn1_peek_uint8(struct asn1_data *data, uint8_t *v)
 {
        return asn1_peek(data, v, 1);
 }
 
-BOOL asn1_peek_tag(ASN1_DATA *data, uint8_t tag)
+BOOL asn1_peek_tag(struct asn1_data *data, uint8_t tag)
 {
        uint8_t b;
 
@@ -336,7 +337,7 @@ BOOL asn1_peek_tag(ASN1_DATA *data, uint8_t tag)
 }
 
 /* start reading a nested asn1 structure */
-BOOL asn1_start_tag(ASN1_DATA *data, uint8_t tag)
+BOOL asn1_start_tag(struct asn1_data *data, uint8_t tag)
 {
        uint8_t b;
        struct nesting *nesting;
@@ -378,7 +379,7 @@ BOOL asn1_start_tag(ASN1_DATA *data, uint8_t tag)
        return !data->has_error;
 }
 
-static BOOL read_one_uint8(int sock, uint8_t *result, ASN1_DATA *data,
+static BOOL read_one_uint8(int sock, uint8_t *result, struct asn1_data *data,
                           const struct timeval *endtime)
 {
        if (read_data_until(sock, result, 1, endtime) != 1)
@@ -388,7 +389,7 @@ static BOOL read_one_uint8(int sock, uint8_t *result, ASN1_DATA *data,
 }
 
 /* Read a complete ASN sequence (ie LDAP result) from a socket */
-BOOL asn1_read_sequence_until(int sock, ASN1_DATA *data,
+BOOL asn1_read_sequence_until(int sock, struct asn1_data *data,
                              const struct timeval *endtime)
 {
        uint8_t b;
@@ -444,7 +445,7 @@ BOOL asn1_read_sequence_until(int sock, ASN1_DATA *data,
 BOOL asn1_object_length(uint8_t *buf, size_t buf_length,
                        uint8_t tag, size_t *result)
 {
-       ASN1_DATA data;
+       struct asn1_data data;
 
        /* Fake the asn1_load to avoid the memdup, this is just to be able to
         * re-use the length-reading in asn1_start_tag */
@@ -461,7 +462,7 @@ BOOL asn1_object_length(uint8_t *buf, size_t buf_length,
 }
 
 /* stop reading a tag */
-BOOL asn1_end_tag(ASN1_DATA *data)
+BOOL asn1_end_tag(struct asn1_data *data)
 {
        struct nesting *nesting;
 
@@ -484,7 +485,7 @@ BOOL asn1_end_tag(ASN1_DATA *data)
 }
 
 /* work out how many bytes are left in this nested tag */
-int asn1_tag_remaining(ASN1_DATA *data)
+int asn1_tag_remaining(struct asn1_data *data)
 {
        if (!data->nesting) {
                data->has_error = True;
@@ -494,7 +495,7 @@ int asn1_tag_remaining(ASN1_DATA *data)
 }
 
 /* read an object ID from a ASN1 buffer */
-BOOL asn1_read_OID(ASN1_DATA *data, const char **OID)
+BOOL asn1_read_OID(struct asn1_data *data, const char **OID)
 {
        uint8_t b;
        char *tmp_oid = NULL;
@@ -523,7 +524,7 @@ BOOL asn1_read_OID(ASN1_DATA *data, const char **OID)
 }
 
 /* check that the next object ID is correct */
-BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
+BOOL asn1_check_OID(struct asn1_data *data, const char *OID)
 {
        const char *id;
 
@@ -538,7 +539,7 @@ BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
 }
 
 /* read a GeneralString from a ASN1 buffer */
-BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s)
+BOOL asn1_read_GeneralString(struct asn1_data *data, char **s)
 {
        int len;
        if (!asn1_start_tag(data, ASN1_GENERAL_STRING)) return False;
@@ -559,7 +560,7 @@ BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s)
 }
 
 /* read a octet string blob */
-BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
+BOOL asn1_read_OctetString(struct asn1_data *data, DATA_BLOB *blob)
 {
        int len;
        ZERO_STRUCTP(blob);
@@ -581,7 +582,7 @@ BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
        return True;
 }
 
-BOOL asn1_read_ContextSimple(ASN1_DATA *data, uint8_t num, DATA_BLOB *blob)
+BOOL asn1_read_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *blob)
 {
        int len;
        ZERO_STRUCTP(blob);
@@ -598,7 +599,7 @@ BOOL asn1_read_ContextSimple(ASN1_DATA *data, uint8_t num, DATA_BLOB *blob)
 }
 
 /* read an interger without tag*/
-BOOL asn1_read_implicit_Integer(ASN1_DATA *data, int *i)
+BOOL asn1_read_implicit_Integer(struct asn1_data *data, int *i)
 {
        uint8_t b;
        *i = 0;
@@ -612,7 +613,7 @@ BOOL asn1_read_implicit_Integer(ASN1_DATA *data, int *i)
 }
 
 /* read an interger */
-BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
+BOOL asn1_read_Integer(struct asn1_data *data, int *i)
 {
        *i = 0;
 
@@ -623,7 +624,7 @@ BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
 }
 
 /* read an interger */
-BOOL asn1_read_enumerated(ASN1_DATA *data, int *v)
+BOOL asn1_read_enumerated(struct asn1_data *data, int *v)
 {
        *v = 0;
        
@@ -637,7 +638,7 @@ BOOL asn1_read_enumerated(ASN1_DATA *data, int *v)
 }
 
 /* check a enumarted value is correct */
-BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
+BOOL asn1_check_enumerated(struct asn1_data *data, int v)
 {
        uint8_t b;
        if (!asn1_start_tag(data, ASN1_ENUMERATED)) return False;
@@ -651,7 +652,7 @@ BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
 }
 
 /* write an enumarted value to the stream */
-BOOL asn1_write_enumerated(ASN1_DATA *data, uint8_t v)
+BOOL asn1_write_enumerated(struct asn1_data *data, uint8_t v)
 {
        if (!asn1_push_tag(data, ASN1_ENUMERATED)) return False;
        asn1_write_uint8(data, v);
index 3462fb20c9c6c2d8d4f5b8a6e1bd8f3a1f07baa1..8e8e49e2202b97a415948b1b79862ab2b063352e 100644 (file)
@@ -28,6 +28,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 #define NDR_BASE_MARSHALL_SIZE 1024
 
index 2ba7c4fff3e464413f8d9c5cc9fc89c6802ef115..78b31c9d31c9dc3e0e3261883ed10ab785621b63 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
 
 /* initialise a dcerpc pipe. */
index 11d016d8819a86501757fa2b61c3fc658e538ade..c0050da383cc4d527148a3ab404dfd753d36651d 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
 
 #define MIN_HDR_SIZE 16
index a952cb1dc7e51c1d04740f1fc83c2980a7fff801..d1df0413ce8e6baed0c405a1dfbd7ccfc8818a39 100644 (file)
@@ -26,6 +26,7 @@
    used. This allows us to provide the same semantics as NT */
 
 #include "includes.h"
+#include "messages.h"
 
 /*
   in this module a "DATA_BLOB *file_key" is a blob that uniquely identifies
index a0604a9d083872d25f8bce86419b13c79484c320..8bcf0382f9f58757ac8abee9fb67686c35f26619 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "includes.h"
 #include "system/filesys.h"
+#include "dlinklist.h"
 
 /* this is the private structure used to keep the state of an open
    ipc$ connection. It needs to keep information about all open
index 17900b3dfcf09ce775d3c6f7bdf401985e3a72c6..24470ebd65d7c1b7fcccd8bf81cb05bf7bd5c832 100644 (file)
@@ -24,6 +24,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 
 /* the list of currently registered NTVFS backends, note that there
index 929ec037de182cb26d17ba435bc923bf07d4364a..bd5a305e20cd256c6fb2be7afa480dda51f881af 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req,
                                void *private_data,
index 3eb016c5b4287ed79783c0b8300bea8655cbd02c..9e2a8341443be34bb36165a5cf11bcbfd6ebd2db 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "include/includes.h"
 #include "vfs_posix.h"
+#include "ioctl.h"
 
 /*
   old ioctl interface 
index 3625fc7891cb547ece42779435209b5f8b17d7be..2668eec00484c435462e980bbf24707606fd3582 100644 (file)
@@ -23,6 +23,8 @@
 #include "include/includes.h"
 #include "vfs_posix.h"
 #include "system/time.h"
+#include "dlinklist.h"
+#include "messages.h"
 
 
 /*
index 89da0f4b34af882710bb120f406b9d535fc576da..f3ef72f4ed546536db7b9af386fe9a83294b59b0 100644 (file)
@@ -24,6 +24,7 @@
 #include "vfs_posix.h"
 #include "system/time.h"
 #include "system/filesys.h"
+#include "dlinklist.h"
 
 /*
   create file handles with convenient numbers for sniffers
index d487392e6f8ea797c7a245f7eb1a59fc8e540196..b1155a07611bbd70290052cc9c7b6304ed44ade2 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "includes.h"
+#include "ioctl.h"
 
 /*
   connect to a share - used when a tree_connect operation comes
index 4df0bc9782396017196227c6ca4cd4bcded3de34..4e9fd4895ec6e81dedf9d44885b1a3d5567538db 100644 (file)
@@ -29,6 +29,7 @@
 #include "includes.h"
 #include "svfs.h"
 #include "system/time.h"
+#include "dlinklist.h"
 
 #ifndef O_DIRECTORY
 #define O_DIRECTORY 0
index 5b461182006cd240f832d135790e891d905316a4..48c33a1cca0112f86d65c192d7d94cbaccde28bc 100644 (file)
@@ -57,6 +57,7 @@
 #include "system/iconv.h"
 #include "system/network.h"
 #include "librpc/gen_ndr/ndr_svcctl.h"
+#include "include/dlinklist.h"
 
 BOOL in_client = False;                /* Not in the client by default */
 static BOOL bLoaded = False;
index 32addde703e88d143117c8b24644db0de64706bf..4bcbdc5b94e71daa7aafddaeb8e6b38b7b8619ae 100644 (file)
@@ -25,6 +25,7 @@
 #include "librpc/gen_ndr/ndr_epmapper.h"
 #include "librpc/gen_ndr/ndr_oxidresolver.h"
 #include "auth/auth.h"
+#include "dlinklist.h"
 
 /*
   see if two endpoints match
index 87749b27a161fe7b00a80012a5b1482d35cafab8..2b070f6bdbf69ccf8609907cbd892974eaa63802 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 /*
   allocate a new rpc handle
index b3970b252c221f65761dd19b25d1fc1528042660..dce77f7978477ac254e2c0e359b5b75c34b5863b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "system/filesys.h"
+#include "dlinklist.h"
 
 /****************************************************************************
 init the tcon structures
index aa809664a124065ee540dc790f9ee4331bf4a750..b50025126548e3439e50b1782cd4e7f94b2d18a2 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 /* initialise the auth_context for this server and return the cryptkey */
 static void get_challenge(struct smbsrv_connection *smb_conn, char buff[8]) 
index 399526737783d43420d816713ad53aa5c486742f..fc3ee1058473f4bbe16b9cb93ffe56334e9a5fc1 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 
 /****************************************************************************
index 5d5b397dd31f31495cc63a7a81f4823c3e4fc1c7..14e1d558cb5428ed9fc1a20bbe7a4d635e816442 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 /* we over allocate the data buffer to prevent too many realloc calls */
 #define REQ_OVER_ALLOCATION 256
index c3d378f0e39c0956a26ec28320ff4810b76877e4..8f55df58d268f69ba6bb20d3f4e9a96d52df5816 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 /*
   setup the OS, Lanman and domain portions of a session setup reply
index 521cfd7de9956501d7e14c21bf0adb1b8effd656..a42ec3c82b939d3b434cc5c110c2eb742ff649ed 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "system/time.h"
+#include "dlinklist.h"
 
 
 /*
index 603726e22d9d6a9e4892571e0da257e0ceddee7c..2e49d033214ab61ee2ed9367629f0ab0f28bd5ce 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 
 /*
index 9b5547ce5403733db515000b39092aff71379929..64297032005be217e913f8d116c8fc594a28f92a 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 /*
   called when the process model is selected
index b7be3a1e6a8b268efab70606dea9db296dac21cb..7fc09b5500783f9b885cf9c4bf9bf15f33960a76 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "system/dir.h"
+#include "dlinklist.h"
 
 struct server_context *server_service_startup(const char *model)
 {
index b63a1555f35d05a32c35dd7eadb47a302704f137..ba4bf69f134d9460dda425549d3d204352bfa796 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "dlinklist.h"
 
 int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char *fname);
 
index 7051403abbf77b684210d2e14c544fac2899861f..a0fe31d0e97b45f31af26b2b6d18cf55732d8af2 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "asn_1.h"
 
 NTSTATUS torture_ldap_bind(struct ldap_connection *conn, const char *userdn, const char *password)
 {
@@ -111,7 +112,7 @@ BOOL ldap_sasl_send_msg(struct ldap_connection *conn, struct ldap_message *msg,
        DATA_BLOB creds;
        DATA_BLOB pdu;
        int len;
-       ASN1_DATA asn1;
+       struct asn1_data asn1;
        TALLOC_CTX *mem_ctx;
 
        msg->messageid = conn->next_msgid++;
index 5ef791037a779ee4a46c555a3be1d6662c369c5f..98b1c08c976d6c58d7f0b5532537d35360d6f00b 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "system/time.h"
+#include "dlinklist.h"
 
 #define MAX_FILES 100
 
index fedb6c71f0946e6efe686a5837aed3bfe3f336ef..50d3566fe8b1134b99caf944420e21877b58a33b 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "ioctl.h"
 
 #define BASEDIR "\\rawioctl"
 
index 4ff2fd9287168e090c35a9f9a8917988cdb1c030..fa6d513a5363ebfbf3c3ead5757a87d3fbcd0796 100644 (file)
@@ -23,6 +23,7 @@
 #include "libcli/raw/libcliraw.h"
 #include "system/time.h"
 #include "system/wait.h"
+#include "ioctl.h"
 
 int torture_nprocs=4;
 int torture_numops=100;
index 787977abcea212dca7f055587ac099123d2a130c..14f8e46b2125ccd57a2e67b248f5df0f9e0cb96e 100644 (file)
@@ -26,6 +26,7 @@
 #include "system/passwd.h"
 #include "lib/cmdline/popt_common.h"
 #include "auth/auth.h"
+#include "asn_1.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND