Make sure prototypes are always included, make some functions static and
authorJelmer Vernooij <jelmer@samba.org>
Mon, 20 Oct 2008 16:59:51 +0000 (18:59 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 20 Oct 2008 16:59:51 +0000 (18:59 +0200)
remove some unused functions.

78 files changed:
lib/crypto/crc32.c
lib/crypto/md4.c
lib/util/debug.h
lib/util/time.h
lib/util/unix_privs.c
lib/util/util.c
lib/util/util.h
lib/util/xfile.h
libcli/nbt/nbtsocket.c
librpc/ndr/ndr_misc.c
librpc/ndr/ndr_table.c
librpc/ndr/ndr_table.h
librpc/tools/ndrdump.c
source4/auth/auth_sam_reply.c
source4/auth/credentials/credentials.c
source4/auth/credentials/credentials_files.c
source4/auth/gensec/cyrus_sasl.c
source4/auth/gensec/gensec_gssapi.c
source4/auth/gensec/schannel_state.c
source4/auth/kerberos/gssapi_parse.c
source4/auth/kerberos/kerberos.c
source4/auth/kerberos/kerberos_heimdal.c
source4/auth/ntlm/auth_util.c
source4/auth/ntlm/pam_errors.c
source4/auth/ntlm/pam_errors.h
source4/auth/ntlmssp/ntlmssp_parse.c
source4/auth/sam.c
source4/cluster/ctdb/ctdb_cluster.c
source4/dsdb/common/flag_mapping.c
source4/dsdb/samdb/ldb_modules/anr.c
source4/dsdb/samdb/ldb_modules/partition.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/update_keytab.c
source4/heimdal/lib/hdb/keys.c
source4/heimdal_build/gssapi-glue.c
source4/lib/charset/charset.h
source4/lib/cmdline/credentials.c
source4/lib/cmdline/popt_common.h
source4/lib/events/events_util.c
source4/lib/ldb/include/ldb_private.h
source4/lib/ldb/ldb_map/ldb_map_private.h
source4/lib/ldb/ldb_tdb/ldb_search.c
source4/lib/ldb/ldb_tdb/ldb_tdb.c
source4/lib/ldb/modules/paged_results.c
source4/lib/registry/registry.h
source4/lib/smbreadline/smbreadline.c
source4/lib/tls/tls.c
source4/lib/tls/tlscert.c
source4/libcli/auth/smbdes.c
source4/libcli/ldap/ldap_controls.c
source4/libcli/ldap/ldap_msg.c
source4/libcli/ldap/ldap_ndr.c
source4/libcli/raw/clierror.c
source4/libcli/raw/clisocket.c
source4/libcli/raw/rawdate.c
source4/libcli/raw/raweas.c
source4/libcli/raw/rawlpq.c
source4/libcli/resolve/nbtlist.c
source4/libnet/groupinfo.c
source4/libnet/groupman.c
source4/libnet/py_net.c
source4/libnet/userinfo.c
source4/libnet/userman.c
source4/librpc/ndr/ndr_wmi.c
source4/nbt_server/dgram/browse.c
source4/nbt_server/dgram/netlogon.c
source4/ntvfs/cifs_posix_cli/svfs_util.c
source4/ntvfs/ipc/rap_server.c
source4/ntvfs/simple/svfs_util.c
source4/param/share_ldb.c
source4/rpc_server/common/server_info.c
source4/rpc_server/common/share_info.c
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/scripting/python/modules.c
source4/smbd/process_model.c
source4/torture/libnet/utils.c
source4/torture/smbtorture.c
source4/torture/torture.c

index 5b9d9b108d14fc34cb5ef089967520a1519a6c3d..e6cc5297676d299d0101545988acc6baf903f848 100644 (file)
@@ -41,6 +41,7 @@
  */
 
 #include "includes.h"
+#include "../lib/crypto/crc32.h"
 
 static const uint32_t crc32_tab[] = {
        0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
index 7ad93ce786f4fdab90907c392376665436a409dd..aea2c821c5e66b3b1f310c30556b73b50d0c57c2 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "../lib/crypto/md4.h"
 
 /* NOTE: This code makes no attempt to be fast! 
 
index 8f4fa2a8fcf8eaa0bd053ac6e67fa0dc678f3e57..8c634f910a90c58a13ec8c9939752c8aab83e956 100644 (file)
@@ -80,6 +80,8 @@ enum debug_logtype {DEBUG_STDOUT = 0, DEBUG_FILE = 1, DEBUG_STDERR = 2};
 */
 _PUBLIC_ void dbghdr(int level, const char *location, const char *func);
 
+_PUBLIC_ void dbghdrclass(int level, int class, const char *location, const char *func);
+
 /**
   reopen the log file (usually called because the log file name might have changed)
 */
@@ -127,3 +129,5 @@ _PUBLIC_ void register_debug_handlers(const char *name, struct debug_ops *ops);
   macro instead.
 */
 _PUBLIC_ void dbgtext(const char *format, ...) PRINTF_ATTRIBUTE(1,2);
+
+extern XFILE *dbf;
index 1a1fcc999c0fb816f696fbd696c31525aee25729..42644a3954d6a154335d455b7b885d2bd47c4837 100644 (file)
@@ -231,7 +231,12 @@ bool nt_time_equal(NTTIME *t1, NTTIME *t2);
 
 void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second);
 
-
 struct timespec nt_time_to_unix_timespec(NTTIME *nt);
 
+time_t convert_timespec_to_time_t(struct timespec ts);
+
+struct timespec convert_time_t_to_timespec(time_t t);
+
+bool null_timespec(struct timespec ts);
+
 #endif /* _SAMBA_TIME_H_ */
index 47c172dcfa5d596e0585e18e35f0fbc1b1627c06..f55e739a9bbaa18e2e5ef07dcfceff1048645e6b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "system/filesys.h"
+#include "../lib/util/unix_privs.h"
 
 /**
  * @file
index 1e7991dbf13cbbe6dd86be6497864027c52da51e..4e2a5aab0981cd990a95e4a7cc21a17163f928c6 100644 (file)
@@ -283,7 +283,6 @@ _PUBLIC_ bool fcntl_lock(int fd, int op, off_t offset, off_t count, int type)
        return true;
 }
 
-
 void print_asc(int level, const uint8_t *buf,int len)
 {
        int i;
index 110286dbc865496b18e8a7b02890074774ce975b..fc651d58af2da3e28e7944aab591c2f990120c04 100644 (file)
@@ -431,6 +431,9 @@ load a file into memory from a fd.
 **/
 _PUBLIC_ char *fd_load(int fd, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
 
+
+char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx);
+
 /**
 load a file into memory
 **/
@@ -585,6 +588,8 @@ _PUBLIC_ void *smb_xmemdup(const void *p, size_t size);
 **/
 _PUBLIC_ char *smb_xstrdup(const char *s);
 
+char *smb_xstrndup(const char *s, size_t n);
+
 /**
  Like strdup but for memory.
 **/
@@ -609,6 +614,8 @@ _PUBLIC_ bool all_zero(const uint8_t *ptr, size_t size);
 */
 _PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count, bool free_on_fail);
 
+void *malloc_array(size_t el_size, unsigned int count);
+
 /* The following definitions come from lib/util/fsusage.c  */
 
 
@@ -715,4 +722,8 @@ _PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name);
 #define talloc_get_type_abort(ptr, type) \
        (type *)talloc_check_name_abort(ptr, #type)
 
+bool unmap_file(void *start, size_t size);
+
+void print_asc(int level, const uint8_t *buf,int len);
+
 #endif /* _SAMBA_UTIL_H_ */
index aa14b7c30a56d78c5a1f0de0822071aab5d29de1..af90f3f55c6f7e05a774b11f95113bf81d2d1193 100644 (file)
@@ -96,4 +96,6 @@ char *x_fgets(char *s, int size, XFILE *stream) ;
  * set then an error is returned */
 off_t x_tseek(XFILE *f, off_t offset, int whence);
 
+XFILE *x_fdup(const XFILE *f);
+
 #endif /* _XFILE_H_ */
index 520e9d978a014758c319f1b5b23f6a60eb1e3b0d..dbbdc1b02a4eeac334edbd0d7366f9dfc9b27753 100644 (file)
@@ -23,6 +23,7 @@
 #include "lib/events/events.h"
 #include "../lib/util/dlinklist.h"
 #include "../libcli/nbt/libnbt.h"
+#include "../libcli/nbt/nbt_proto.h"
 #include "lib/socket/socket.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "param/param.h"
index 2e5ecbac6de8be7b3bd8e7fdf896446e2055386a..c4a1adb3eade226f5b305b57babcd34320d343da 100644 (file)
 #include "system/network.h"
 #include "librpc/ndr/libndr.h"
 
-_PUBLIC_ void ndr_print_in_addr(struct ndr_print *ndr, const char *name, const struct in_addr *_ip)
-{
-       struct in_addr ip;
-
-       ip.s_addr = htonl(_ip->s_addr);
-
-       ndr->print(ndr, "%-25s: %s", name, inet_ntoa(ip));
-}
-
 _PUBLIC_ void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid)
 {
        ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));
index f7c381f22ef901ad36c1d55d76d390aca5c7f980..7ca04173f70495df4cdaa80ce2f656516709404b 100644 (file)
@@ -120,8 +120,6 @@ const struct ndr_interface_list *ndr_table_list(void)
 }
 
 
-NTSTATUS ndr_table_register_builtin_tables(void);
-
 NTSTATUS ndr_table_init(void)
 {
        static bool initialized = false;
index 905c2e5e434fd09defc6fed0827d368ba8ff9491..9e8fea1db6a2ee99492fe95f860e9441221fd122 100644 (file)
@@ -8,6 +8,7 @@ const struct ndr_interface_table *ndr_table_by_name(const char *name);
 const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid);
 const struct ndr_interface_list *ndr_table_list(void);
 NTSTATUS ndr_table_init(void);
+NTSTATUS ndr_table_register_builtin_tables(void);
 
 #endif /* _NDR_TABLE_PROTO_H_ */
 
index 3d7c644902450fc050678913032c1a07dd0bbb52..69b304dc9c078f081d6629065f2a1e677574273e 100644 (file)
@@ -171,7 +171,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
        };
 
        ndr_table_init();
-#if (_SAMBA_BUILD_ >= 3)
+
        /* Initialise samba stuff */
        load_case_tables();
 
@@ -179,8 +179,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
 
        dbf = x_stderr;
 
-       setup_logging(argv[0],True);
-#endif
+       setup_logging(argv[0], true);
 
        pc = poptGetContext("ndrdump", argc, argv, long_options, 0);
        
index ea6f0a1f60eb338e9267e5a781c53d2ea1e1609f..839553632ed4d3a3166fe365e03ddd0467cf89dd 100644 (file)
@@ -24,6 +24,7 @@
 #include "auth/auth.h"
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_netlogon.h"
+#include "auth/auth_sam_reply.h"
 
 NTSTATUS auth_convert_server_info_sambaseinfo(TALLOC_CTX *mem_ctx, 
                                              struct auth_serversupplied_info *server_info, 
index adabe49cb4f3a42a8d6bf72f601d1054fb8dd06d..5fb180d7b136d8d8d67f76411caddfb650afc099 100644 (file)
@@ -25,6 +25,7 @@
 #include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
 #include "auth/credentials/credentials.h"
 #include "auth/credentials/credentials_krb5.h"
+#include "auth/credentials/credentials_proto.h"
 #include "libcli/auth/libcli_auth.h"
 #include "lib/events/events.h"
 #include "param/param.h"
index 8f4f8c95610dffaf8029876df780d8908ad89bbd..17c555d25b8abd0cee15ad351726cdc57f92fe53 100644 (file)
@@ -30,6 +30,7 @@
 #include "../lib/util/util_ldb.h"
 #include "auth/credentials/credentials.h"
 #include "auth/credentials/credentials_krb5.h"
+#include "auth/credentials/credentials_proto.h"
 #include "param/param.h"
 #include "lib/events/events.h"
 
index e8918ef66d3bae20170f9e4c6426a7eca63f066a..54d53965ccd0c2d84f313a1b464916150b7315d2 100644 (file)
@@ -319,7 +319,7 @@ static const struct gensec_security_ops gensec_sasl_security_ops = {
        .priority         = GENSEC_SASL
 };
 
-int gensec_sasl_log(void *context, 
+static int gensec_sasl_log(void *context, 
                    int sasl_log_level,
                    const char *message) 
 {
index e791226cf6812607eaa12ec7303265b9ca7e9e1d..e307dbb5cb6913a5f7dd39bc28551c9bcfafae36 100644 (file)
@@ -1361,7 +1361,7 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
        return NT_STATUS_OK;
 }
 
-size_t gensec_gssapi_sig_size(struct gensec_security *gensec_security, size_t data_size)
+static size_t gensec_gssapi_sig_size(struct gensec_security *gensec_security, size_t data_size)
 {
        struct gensec_gssapi_state *gensec_gssapi_state
                = talloc_get_type(gensec_security->private_data, struct gensec_gssapi_state);
index 76636bf89d976a06431bb61eeb43c5041ca2d771..c73313f9c8929e4c4e335a81a9709ed62ab4a912 100644 (file)
@@ -29,6 +29,7 @@
 #include "libcli/auth/libcli_auth.h"
 #include "auth/auth.h"
 #include "param/param.h"
+#include "auth/gensec/schannel_state.h"
 
 /**
   connect to the schannel ldb
index e5b13fc70dca45f06f17162cbb668b0909959858..489ebcaa8394bf9c8ec16d50bab30f3a21d7f082 100644 (file)
@@ -24,6 +24,8 @@
 #include "includes.h"
 #include "../lib/util/asn1.h"
 #include "auth/gensec/gensec.h"
+#include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
 
 /*
   generate a krb5 GSS-API wrapper packet given a ticket
index d54664fe66dfbd5bfd6e7a160a97357e23a5d1aa..1889dcab4dac573a7d3804b158813738988dd0f7 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
 
 #ifdef HAVE_KRB5
 
index f669d0f2f4ba4ca29f395145ffca78b27cbb3faa..44cb39c51822bab61a1a38c384018934f644a7ab 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "includes.h"
 #include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
 
 /* Taken from  accept_sec_context.c,v 1.65 */
 krb5_error_code smb_rd_req_return_stuff(krb5_context context, 
index 1d86b858cfd004f72ab92018b54872d920c5c8a2..64ceb437ad6dc4b9a3ba71ab23811ef52144a3fb 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "auth/auth.h"
+#include "auth/auth_proto.h"
 #include "libcli/security/security.h"
 #include "libcli/auth/libcli_auth.h"
 #include "dsdb/samdb/samdb.h"
index 9774ad87275f45c84012b2a2dd4ebf292112e594..29fa4a813311fda20850b359ce85499bdf051875 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include "includes.h"
+#include "auth/ntlm/pam_errors.h"
 
 #ifdef WITH_HAVE_SECURITY_PAM_APPL_H
 #include <security/pam_appl.h>
index 959e1f35171446d276e942e83a2cfeb261f462a9..2dfe085b770a75dd5c776876cb52e47d65980d92 100644 (file)
 #ifndef __AUTH_NTLM_PAM_ERRORS_H__
 #define __AUTH_NTLM_PAM_ERRORS_H__
 
-/* The following definitions come from auth/pam_errors.c  */
-
-
-/*****************************************************************************
-convert a PAM error to a NT status32 code
- *****************************************************************************/
-NTSTATUS pam_to_nt_status(int pam_error);
-
-/*****************************************************************************
-convert an NT status32 code to a PAM error
- *****************************************************************************/
-int nt_status_to_pam(NTSTATUS nt_status);
-
 /*****************************************************************************
 convert a PAM error to a NT status32 code
  *****************************************************************************/
index e1c1e7cbb32a9a0bf85840b6b50cf324515000f3..9256872036de5cb29208a4d2027cc02ab61a7998 100644 (file)
@@ -20,8 +20,8 @@
 */
 
 #include "includes.h"
-#include "pstring.h"
 #include "param/param.h"
+#include "auth/ntlmssp/msrpc_parse.h"
 
 /*
   this is a tiny msrpc packet generator. I am only using this to
index d04a254d6c87512d9b62d262a4ce947feb5de107..4255a6432a1fa6a16ea1c7352cc1d5cb7e30afc6 100644 (file)
@@ -29,6 +29,7 @@
 #include "libcli/ldap/ldap.h"
 #include "librpc/gen_ndr/ndr_netlogon.h"
 #include "param/param.h"
+#include "auth/auth_sam.h"
 
 const char *user_attrs[] = {
        /* required for the krb5 kdc */
index 51f6d984e76b4fd36e3f7449747c5d78bf3d3838..d0ceef4ad1bc8a3f8ed33f0f8ad8e89dc46933bb 100644 (file)
@@ -30,6 +30,7 @@
 #include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "librpc/gen_ndr/security.h"
+#include "cluster/ctdb/ctdb_cluster.h"
 
 /* a linked list of messaging handlers, allowing incoming messages
    to be directed to the right messaging context */
index 4a2a079e45a72dbda581fc59704bf9036a957205..dceb41be672309420ea79f8d2db888ed74fcf587 100644 (file)
@@ -22,6 +22,8 @@
 #include "includes.h"
 #include "librpc/gen_ndr/samr.h"
 #include "dsdb/common/flags.h"
+#include "lib/ldb/include/ldb.h"
+#include "dsdb/common/proto.h"
 
 /* 
 translated the ACB_CTRL Flags to UserFlags (userAccountControl) 
index 028df588d6bddb44fb874e773c156189a6e533c0..da23030ed3a019352732f34ffbbda9644b499252 100644 (file)
@@ -36,7 +36,7 @@
 /**
  * Make a and 'and' or 'or' tree from the two supplied elements 
  */
-struct ldb_parse_tree *make_parse_list(struct ldb_module *module,
+static struct ldb_parse_tree *make_parse_list(struct ldb_module *module,
                                       TALLOC_CTX *mem_ctx, enum ldb_parse_op op, 
                                       struct ldb_parse_tree *first_arm, struct ldb_parse_tree *second_arm)
 {
@@ -63,7 +63,7 @@ struct ldb_parse_tree *make_parse_list(struct ldb_module *module,
 /**
  * Make an equality or prefix match tree, from the attribute, operation and matching value supplied
  */
-struct ldb_parse_tree *make_match_tree(struct ldb_module *module,
+static struct ldb_parse_tree *make_match_tree(struct ldb_module *module,
                                       TALLOC_CTX *mem_ctx, enum ldb_parse_op op, 
                                       const char *attr, const DATA_BLOB *match)
 {
index b4a7a47a232d8edf8559188b73cce066762dd326..2a321e29c50d0c713117cc6aab8e5554b839c6da 100644 (file)
@@ -87,7 +87,7 @@ static struct partition_context *partition_init_ctx(struct ldb_module *module, s
  *    helper functions to call the next module in chain
  *    */
 
-int partition_request(struct ldb_module *module, struct ldb_request *request)
+static int partition_request(struct ldb_module *module, struct ldb_request *request)
 {
        int ret;
        switch (request->operation) {
index f6e735df7959a7e7b0f9cfba1508dea377f3bf07..95a16b5527ee01eed06b1b0b877d41d1c4797633 100644 (file)
@@ -80,8 +80,8 @@ struct samldb_ctx {
        struct samldb_step *curstep;
 };
 
-struct samldb_ctx *samldb_ctx_init(struct ldb_module *module,
-                                  struct ldb_request *req)
+static struct samldb_ctx *samldb_ctx_init(struct ldb_module *module,
+                                         struct ldb_request *req)
 {
        struct samldb_ctx *ac;
 
index 2c6cb102d978b0a56872d7d4ff600ae419bdc8ac..8eb49b5792e143e41fefa5d5306928af1fc39fc7 100644 (file)
@@ -54,8 +54,8 @@ struct update_kt_ctx {
        bool found;
 };
 
-struct update_kt_ctx *update_kt_ctx_init(struct ldb_module *module,
-                                        struct ldb_request *req)
+static struct update_kt_ctx *update_kt_ctx_init(struct ldb_module *module,
+                                               struct ldb_request *req)
 {
        struct update_kt_ctx *ac;
 
index e649f445e0ad1a9ea66ddf8b8bb5eff2915c1954..a2637eb0b98eb8bccf89d312e8869010dcdea1b7 100644 (file)
@@ -39,7 +39,7 @@ RCSID("$Id$");
  * free all the memory used by (len, keys)
  */
 
-void
+static void
 hdb_free_keys (krb5_context context, int len, Key *keys)
 {
     int i;
@@ -250,7 +250,7 @@ add_enctype_to_key_set(Key **key_set, size_t *nkeyset,
  * it's random keys that is going to be created.
  */
 
-krb5_error_code
+static krb5_error_code
 hdb_generate_key_set(krb5_context context, krb5_principal principal,
                     Key **ret_key_set, size_t *nkeyset, int no_salt)
 {
@@ -362,7 +362,7 @@ hdb_generate_key_set(krb5_context context, krb5_principal principal,
 }
 
 
-krb5_error_code
+static krb5_error_code
 hdb_generate_key_set_password(krb5_context context, 
                              krb5_principal principal, 
                              const char *password, 
index c71b69463ccda892e5f5494683454ccae482e238..0c27f5100f14318c507e794ea0110faf59a74d6b 100644 (file)
@@ -20,8 +20,9 @@
 */
 
 #include "../replace/replace.h"
+#include "heimdal/lib/gssapi/gssapi_mech.h"
 
-void *__gss_ntlm_initialize(void)
+gssapi_mech_interface __gss_ntlm_initialize(void)
 {
        return NULL;
 }
index d4dae4cdad49c79fffd7785288c333fd9a7777c0..041eaeace7a7d9991b830d3af335818a00a66ad9 100644 (file)
@@ -147,4 +147,8 @@ struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx,
                                                         const char *dos_charset,
                                                         const char *unix_charset,
                                                         bool native_iconv);
+
+void load_case_tables(void);
+bool charset_register_backend(const void *_funcs);
+
 #endif /* __CHARSET_H__ */
index 2e5c6fd94ab33fe0df96761e2398689bd57c1b9b..f919842e6aa7841fb8cadd4d8f3a1a6e2ac10350 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "system/filesys.h"
 #include "auth/credentials/credentials.h"
+#include "lib/cmdline/credentials.h"
 
 static const char *cmdline_get_userpassword(struct cli_credentials *credentials)
 {
index df432bb4757e314600fffbf54f6962c627955096..733d12a443305c5caad6b4dfd3055a9a9b3770c0 100644 (file)
@@ -36,4 +36,6 @@ extern struct poptOption popt_common_credentials[];
 extern struct cli_credentials *cmdline_credentials;
 extern struct loadparm_context *cmdline_lp_ctx;
 
+void popt_common_dont_ask(void);
+
 #endif /* _POPT_COMMON_H */
index 93f6492560165b697185f4fb7a069cc2c8213a5e..9e7d7584059c4785a30116d4fbeeeeffba8f9770 100644 (file)
@@ -22,6 +22,7 @@
 #include "talloc.h"
 #include "events.h"
 #include "events_internal.h"
+#include "events_util.h"
 #include <fcntl.h>
 
 /**
index a92549d9ce7846d5d5624cb53404a6dcb2f31c1a..8f7e010bee764bdbcd2c74a002a55dd2eba7a2f3 100644 (file)
@@ -211,6 +211,10 @@ char *ldb_casefold_default(void *context, void *mem_ctx, const char *s, size_t n
 
 void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el);
 
+int ldb_msg_element_compare_name(struct ldb_message_element *el1, 
+                                struct ldb_message_element *el2);
+void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *f);
+
 /**
   Obtain current/next database sequence number
 */
@@ -273,4 +277,7 @@ int ldb_module_done(struct ldb_request *req,
 
 int ldb_mod_register_control(struct ldb_module *module, const char *oid);
 
+
+struct ldb_val ldb_binary_decode(void *mem_ctx, const char *str);
+
 #endif
index 5522125344e84394e44bc67b2d8116443ef3b172..0543ba71b9b1dff2691c936c3f093fad66d3fbfb 100644 (file)
@@ -86,3 +86,5 @@ int map_return_fatal_error(struct ldb_request *req,
 int map_return_normal_error(struct ldb_request *req,
                            struct ldb_reply *ares,
                            int error);
+
+int map_return_entry(struct map_context *ac, struct ldb_reply *ares);
index 1c76411db2945b289627212b026c2009a3e72ca1..6ab06c4e486813b20b8ea9f95d29f9217c98fa81 100644 (file)
@@ -205,7 +205,7 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_module *module,
   return LDB_ERR_NO_SUCH_OBJECT on record-not-found
   and LDB_SUCCESS on success
 */
-int ltdb_search_base(struct ldb_module *module, struct ldb_dn *dn)
+static int ltdb_search_base(struct ldb_module *module, struct ldb_dn *dn)
 {
        struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
        TDB_DATA tdb_key, tdb_data;
index 2282f61d479a36d5f3fad10a57a3f258cc31b3c5..34a4e0396573ff46448aef2d3d74776c8dcc8ea7 100644 (file)
@@ -161,7 +161,7 @@ failed:
   check special dn's have valid attributes
   currently only @ATTRIBUTES is checked
 */
-int ltdb_check_special_dn(struct ldb_module *module,
+static int ltdb_check_special_dn(struct ldb_module *module,
                          const struct ldb_message *msg)
 {
        int i, j;
@@ -968,7 +968,7 @@ done:
        return ret;
 }
 
-void ltdb_request_done(struct ldb_request *req, int error)
+static void ltdb_request_done(struct ldb_request *req, int error)
 {
        struct ldb_reply *ares;
 
index d3bb83bbcd9ec6bbe8a568784b8b226b0252b8cc..1a242f1be0497012f09befa96b7114b5584c7969 100644 (file)
@@ -70,7 +70,7 @@ struct private_data {
        
 };
 
-int store_destructor(struct results_store *del)
+static int store_destructor(struct results_store *del)
 {
        struct private_data *priv = del->priv;
        struct results_store *loop;
index fe2091dde8d50e81f6827bed4ebc766e97aa09a1..e89d6fd55c51a6d3d4fff0f309dc26a7d98feaab 100644 (file)
@@ -508,6 +508,18 @@ WERROR reg_diff_load(const char *filename,
                     const struct reg_diff_callbacks *callbacks,
                     void *callback_data);
 
+WERROR reg_dotreg_diff_load(int fd,
+                                    struct smb_iconv_convenience *iconv_convenience,
+                                    const struct reg_diff_callbacks *callbacks,
+                                    void *callback_data);
+
+WERROR reg_preg_diff_load(int fd,
+                  struct smb_iconv_convenience *iconv_convenience, 
+                                  const struct reg_diff_callbacks *callbacks,
+                                  void *callback_data);
+
+WERROR local_get_predefined_key(struct registry_context *ctx,
+                               uint32_t key_id, struct registry_key **key);
 
 
 #endif /* _REGISTRY_H */
index 314fe13471334f70b93875f4d7a18c77e8461f3c..5fb3bf4fae420aad123cdc55087a4f2d6cdcc8ff 100644 (file)
@@ -29,7 +29,7 @@
  This is what sys_select() used to do in Samba.
 ********************************************************************/
 
-int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval)
+static int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval)
 {
        int ret;
        fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, errorfds_buf;
index 046c2b90368d475c4a65e098b82bd9178a656263..f72aafe542fc271e0e67cc9a14b05ab3bed91c82 100644 (file)
@@ -363,7 +363,6 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context *
        const char *crlfile = private_path(tmp_ctx, lp_ctx, lp_tls_crlfile(lp_ctx));
        const char *dhpfile = private_path(tmp_ctx, lp_ctx, lp_tls_dhpfile(lp_ctx));
        void tls_cert_generate(TALLOC_CTX *, const char *, const char *, const char *);
-
        params = talloc(mem_ctx, struct tls_params);
        if (params == NULL) {
                talloc_free(tmp_ctx);
index 240ae056c13a70b1b908c38e101f999dbe548293..f2e79f2a8964ce8c935d59872881a9c3160f688a 100644 (file)
 #define LIFETIME          700*24*60*60
 #define DH_BITS                  1024
 
+void tls_cert_generate(TALLOC_CTX *mem_ctx, 
+                      const char *keyfile, const char *certfile,
+                      const char *cafile);
+
 /* 
    auto-generate a set of self signed certificates
 */
index 7f998e512d219f3402200b4202e2d88e90c0025d..32e65e779d8a7c8fe7fc75114a33a42814589ac6 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "libcli/auth/libcli_auth.h"
 
 /* NOTES: 
 
index b34e026b189e3e550e57cbec18d74fafd5a519b3..930d97c40d0b2b3a0765c3a3fc27d5bfe596aeee 100644 (file)
@@ -23,6 +23,7 @@
 #include "../lib/util/asn1.h"
 #include "libcli/ldap/ldap.h"
 #include "lib/ldb/include/ldb.h"
+#include "libcli/ldap/ldap_proto.h"
 
 struct control_handler {
        const char *oid;
index c712e1e65480380a560d84f1ad5a86a56d6d414e..e45213c0040c90732d3522077418c8f20d9a0dc5 100644 (file)
@@ -24,6 +24,7 @@
 #include "includes.h"
 #include "libcli/ldap/ldap.h"
 #include "libcli/ldap/ldap_client.h"
+#include "libcli/ldap/ldap_proto.h"
 
 
 _PUBLIC_ struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
index a10f80ae2c8709d95eff5200c70b866108472c03..5e938ea1488414d97005af54521cf0bee0c66a76 100644 (file)
@@ -25,6 +25,7 @@
 #include "libcli/ldap/ldap.h"
 #include "librpc/gen_ndr/ndr_security.h"
 #include "librpc/gen_ndr/ndr_misc.h"
+#include "libcli/ldap/ldap_ndr.h"
 
 /*
   encode a NDR uint32 as a ldap filter element
index 157bd847d426c93f8ac6fb12882aefb1481a33b0..a41748640b70e711ffb97318a1600ea57de3fc3a 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
 
 
 /***************************************************************************
index 49838e8a1c1f1e41743f4ee11daf3ea7ceb6bf7f..d51ffbaa746b8ee90a97077e59f9243c9cb2b602 100644 (file)
@@ -27,6 +27,7 @@
 #include "lib/socket/socket.h"
 #include "libcli/resolve/resolve.h"
 #include "param/param.h"
+#include "libcli/raw/raw_proto.h"
 
 struct sock_connect_state {
        struct composite_context *ctx;
index 9a86c8869719bd7578a66b238040b7d37a0e3712..5264653cc691982d0399559c21c5ca4c09bc979b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
 
 /*******************************************************************
 put a dos date into a buffer (time/date format)
index 6317c49fd764cb92c6109fdc53e81f1adf17e0bf..09fd4aa4128b60d905841a9d5f4bef3df1b44ea9 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "smb.h"
 #include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
 
 /*
   work out how many bytes on the wire a ea list will consume. 
index 46e0efaaf5c9c5bf5616909c35bab1e9f01f5684..eddb3e084366293cf7d5aa15dbdef950763f0c34 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "smb.h"
 #include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
 
 /****************************************************************************
  lpq - async send
index 7dafd130f89083ba9cc8a5284a7ee8b8f174c7e1..531ce6098fbcdde4d0a8d7667d7ca13a87edc844 100644 (file)
@@ -30,6 +30,7 @@
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "../libcli/nbt/libnbt.h"
 #include "param/param.h"
+#include "libcli/resolve/resolve.h"
 
 struct nbtlist_state {
        struct nbt_name name;
index 6c8580a6621e8cd99542e24207fd7afb124f740c..1da6646702836bd61fad3d58e9e93066793f381f 100644 (file)
@@ -30,6 +30,7 @@
 #include "libnet/userman.h"
 #include "libnet/groupinfo.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
 
 
 struct groupinfo_state {
index 1e12c8771370a29e088ac220c630ca6996562a73..58d574233601928923144950f6bda0683e5e7eb6 100644 (file)
@@ -26,6 +26,7 @@
 #include "libnet/composite.h"
 #include "libnet/groupman.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
 
 
 struct groupadd_state {
index 3736454fa0aa8e28d7946cad0e2d653598564b99..d5495f1e72b6e4533c87a235e7415dc9b9d41534 100644 (file)
@@ -24,7 +24,7 @@
 #include "libcli/security/security.h"
 #include "lib/events/events.h"
 
-struct libnet_context *py_net_ctx(PyObject *obj, struct event_context *ev)
+static struct libnet_context *py_net_ctx(PyObject *obj, struct event_context *ev)
 {
        /* FIXME: Use obj */
        return libnet_context_init(ev, global_loadparm);
index 847997fc12f6b6faab8eb2bc3c38b01106284723..e8b6b090c7c8ef3a50ca1633fcb8b74bf0c6cc7d 100644 (file)
@@ -29,6 +29,7 @@
 #include "libnet/userman.h"
 #include "libnet/userinfo.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
 
 
 struct userinfo_state {
index 25ed4775cb3ba60ee1a5058f7a72e67d79cca231..398d9f2cb044eca244dc8ce2d0c6dd7543d04e0d 100644 (file)
@@ -27,6 +27,7 @@
 #include "libnet/userman.h"
 #include "libnet/userinfo.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
 
 /*
  * Composite USER ADD functionality
index 6cf42471f8fec4455ad9966663c71b657005a27b..2c122decf4e96d3bd01cb3a69ad48242a29aa431 100644 (file)
 int NDR_CHECK_depth = 0;
 int NDR_CHECK_shift = 0x18;
 
-int get_CIMTYPE_size(int t)
-{
-       if (t & CIM_FLAG_ARRAY) return 4;
-       t &= 0x1FF;
-       switch (t) {
-        case CIM_SINT8:
-        case CIM_UINT8:
-               return 1;
-        case CIM_SINT16:
-        case CIM_UINT16:
-        case CIM_BOOLEAN:
-               return 2;
-        case CIM_SINT32:
-        case CIM_UINT32:
-        case CIM_REAL32:
-        case CIM_STRING:
-        case CIM_DATETIME:
-        case CIM_REFERENCE:
-        case CIM_OBJECT:
-               return 4;
-        case CIM_SINT64:
-        case CIM_UINT64:
-        case CIM_REAL64:
-               return 8;
-       default:
-               DEBUG(0, ("Unknown CIMTYPE size for %04X", t));
-               return 4;
-       }
-}
-
 enum ndr_err_code ndr_push_BSTR(struct ndr_push *ndr, int ndr_flags, const struct BSTR *r)
 {
        uint32_t len;
index 2e12fa114a6af1f7086ee23481631a5740927382..1ebc88fcd4794726ef5e1e426005247d255e9e31 100644 (file)
@@ -23,6 +23,7 @@
 #include "nbt_server/nbt_server.h"
 #include "lib/socket/socket.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
+#include "nbt_server/dgram/proto.h"
 
 static const char *nbt_browse_opcode_string(enum nbt_browse_opcode r)
 {
index c5b16fbd7576b5c72fb1dc5b752518aed2f4cb11..a3a7552f6a8d3f13af427861d95dbb8bc94efe50 100644 (file)
@@ -31,6 +31,7 @@
 #include "smbd/service_task.h"
 #include "cldap_server/cldap_server.h"
 #include "libcli/security/security.h"
+#include "nbt_server/dgram/proto.h"
 
 /*
   reply to a GETDC request
index 42d869209d9b0d4a40fac7c9f88e1a70c75d261e..e5023402291114fd2273dbd12bb9ee09aa1c7205 100644 (file)
@@ -31,6 +31,7 @@
 #include "system/time.h"
 #include "system/dir.h"
 #include "ntvfs/ntvfs.h"
+#include "ntvfs/cifs_posix_cli/proto.h"
 
 /*
   convert a windows path to a unix path - don't do any manging or case sensitive handling
index d9fb7e21b23fef2567fe97551cb7b5d188a7247c..077ecaf79f61a54ab34348005f7c0030737fc380 100644 (file)
@@ -24,6 +24,8 @@
 #include "librpc/gen_ndr/srvsvc.h"
 #include "rpc_server/common/common.h"
 #include "param/param.h"
+#include "ntvfs/ipc/ipc.h"
+#include "ntvfs/ipc/proto.h"
 
 /* At this moment these are just dummy functions, but you might get the
  * idea. */
index 286c556e30824dcb0b2b993847183eea64874deb..a0cdbe9c39b748e2570e7b58e58752e30ce4973f 100644 (file)
@@ -28,6 +28,7 @@
 #include "system/time.h"
 #include "system/dir.h"
 #include "ntvfs/ntvfs.h"
+#include "ntvfs/simple/proto.h"
 
 /*
   convert a windows path to a unix path - don't do any manging or case sensitive handling
index 4896a710480db6c4855b491a6b440af19e8f8390..29664c71773f5f803326d08f0b5c145fe07ae4af 100644 (file)
@@ -287,7 +287,7 @@ static NTSTATUS sldb_get_config(TALLOC_CTX *mem_ctx,
                goto done; \
        } } while(0)
 
-NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_info *info, int count)
+static NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_info *info, int count)
 {
        struct ldb_context *ldb;
        struct ldb_message *msg;
@@ -426,7 +426,7 @@ done:
                goto done; \
        } } while(0)
 
-NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info *info, int count)
+static NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info *info, int count)
 {
        struct ldb_context *ldb;
        struct ldb_message *msg;
@@ -535,7 +535,7 @@ done:
        return ret;
 }
 
-NTSTATUS sldb_remove(struct share_context *ctx, const char *name)
+static NTSTATUS sldb_remove(struct share_context *ctx, const char *name)
 {
        struct ldb_context *ldb;
        struct ldb_dn *dn;
index da034e85ea5c53e69ed14335db99a53dc4f5fda0..ab04b3af1f7496cc5c474bb8d5a5b0a2ef5703e2 100644 (file)
@@ -26,6 +26,8 @@
 #include "dsdb/samdb/samdb.h"
 #include "auth/auth.h"
 #include "param/param.h"
+#include "rpc_server/common/common.h"
+#include "rpc_server/common/proto.h"
 
 /* 
     Here are common server info functions used by some dcerpc server interfaces
index b27dc3794980c9885e65e84c66e12bdfe26347a5..130babd175104bcfb2ff9ed50076f81f57dbb71c 100644 (file)
@@ -23,6 +23,8 @@
 #include "param/share.h"
 #include "librpc/gen_ndr/srvsvc.h"
 #include "rpc_server/dcerpc_server.h"
+#include "rpc_server/common/common.h"
+#include "rpc_server/common/proto.h"
 
 /* 
     Here are common server info functions used by some dcerpc server interfaces
index a84f24a3e8b9074c8a4a5df16df1a23392619925..6af8ea50b59a1dd31b1ea7428a4d3ef4fc63cff1 100644 (file)
@@ -330,7 +330,7 @@ static WERROR dcesrv_drsuapi_DsGetNT4ChangeLog(struct dcesrv_call_state *dce_cal
 /* 
   drsuapi_DsCrackNames 
 */
-WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
                            struct drsuapi_DsCrackNames *r)
 {
        WERROR status;
@@ -478,7 +478,7 @@ static WERROR dcesrv_DRSUAPI_REMOVE_DS_DOMAIN(struct dcesrv_call_state *dce_call
 }
 
 /* Obtain the site name from a server DN */
-const char *result_site_name(struct ldb_dn *site_dn)
+static const char *result_site_name(struct ldb_dn *site_dn)
 {
        /* Format is cn=<NETBIOS name>,cn=Servers,cn=<site>,cn=sites.... */
        const struct ldb_val *val = ldb_dn_get_component_val(site_dn, 2);
index 0fe15b2fdab549f72a62087ae21831fc50283b62..e53f4cfaf234cb03379fe78e2829c4d55c382b78 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "scripting/python/modules.h"
 #include <Python.h>
 
 extern void init_ldb(void);
index d99d517d9f290961d2b8581956324bec0c0edc05..d6346a06f9b3e40f6740a28ec716ed7731769d76 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "smbd/process_model.h"
+#include "smbd/process_model_proto.h"
 #include "param/param.h"
 
 static const struct model_ops *process_model_byname(const char *name);
index d4124cc823a68d2e7cc627f2e6b8b17a64da1162..4a55eaa56c7266aa1c71f3ede9806bb2fb4ce487 100644 (file)
@@ -27,6 +27,7 @@
 #include "libnet/libnet.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
 #include "param/param.h"
+#include "torture/libnet/utils.h"
 
 
 bool test_opendomain(struct torture_context *tctx, 
index 302fefcc88510f83683244dfa62515958f8362b9..8d195f1253512644f521a93c9db184d3ea3a8711 100644 (file)
@@ -474,7 +474,7 @@ const static struct torture_ui_ops quiet_ui_ops = {
        .test_result = quiet_test_result
 };
 
-void run_shell(struct torture_context *tctx)
+static void run_shell(struct torture_context *tctx)
 {
        char *cline;
        int argc;
index 6c49cf01cd6064acdf64e1d68739b27a9d657aae..dc98c2cc9a7f752d4e050f09b09684e148d9d998 100644 (file)
@@ -24,6 +24,7 @@
 #include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "lib/cmdline/popt_common.h"
+#include "torture/smbtorture.h"
 
 _PUBLIC_ int torture_numops=10;
 _PUBLIC_ int torture_entries=1000;