From 87ec1d2532eb17dfd7f98431bdfa4071be57f683 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 20 Oct 2008 18:59:51 +0200 Subject: Make sure prototypes are always included, make some functions static and remove some unused functions. --- source4/auth/auth_sam_reply.c | 1 + source4/auth/credentials/credentials.c | 1 + source4/auth/credentials/credentials_files.c | 1 + source4/auth/gensec/cyrus_sasl.c | 2 +- source4/auth/gensec/gensec_gssapi.c | 2 +- source4/auth/gensec/schannel_state.c | 1 + source4/auth/kerberos/gssapi_parse.c | 2 ++ source4/auth/kerberos/kerberos.c | 1 + source4/auth/kerberos/kerberos_heimdal.c | 1 + source4/auth/ntlm/auth_util.c | 1 + source4/auth/ntlm/pam_errors.c | 1 + source4/auth/ntlm/pam_errors.h | 13 ----------- source4/auth/ntlmssp/ntlmssp_parse.c | 2 +- source4/auth/sam.c | 1 + source4/cluster/ctdb/ctdb_cluster.c | 1 + source4/dsdb/common/flag_mapping.c | 2 ++ source4/dsdb/samdb/ldb_modules/anr.c | 4 ++-- source4/dsdb/samdb/ldb_modules/partition.c | 2 +- source4/dsdb/samdb/ldb_modules/samldb.c | 4 ++-- source4/dsdb/samdb/ldb_modules/update_keytab.c | 4 ++-- source4/heimdal/lib/hdb/keys.c | 6 +++--- source4/heimdal_build/gssapi-glue.c | 3 ++- source4/lib/charset/charset.h | 4 ++++ source4/lib/cmdline/credentials.c | 1 + source4/lib/cmdline/popt_common.h | 2 ++ source4/lib/events/events_util.c | 1 + source4/lib/ldb/include/ldb_private.h | 7 ++++++ source4/lib/ldb/ldb_map/ldb_map_private.h | 2 ++ source4/lib/ldb/ldb_tdb/ldb_search.c | 2 +- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 4 ++-- source4/lib/ldb/modules/paged_results.c | 2 +- source4/lib/registry/registry.h | 12 +++++++++++ source4/lib/smbreadline/smbreadline.c | 2 +- source4/lib/tls/tls.c | 1 - source4/lib/tls/tlscert.c | 4 ++++ source4/libcli/auth/smbdes.c | 1 + source4/libcli/ldap/ldap_controls.c | 1 + source4/libcli/ldap/ldap_msg.c | 1 + source4/libcli/ldap/ldap_ndr.c | 1 + source4/libcli/raw/clierror.c | 1 + source4/libcli/raw/clisocket.c | 1 + source4/libcli/raw/rawdate.c | 1 + source4/libcli/raw/raweas.c | 1 + source4/libcli/raw/rawlpq.c | 1 + source4/libcli/resolve/nbtlist.c | 1 + source4/libnet/groupinfo.c | 1 + source4/libnet/groupman.c | 1 + source4/libnet/py_net.c | 2 +- source4/libnet/userinfo.c | 1 + source4/libnet/userman.c | 1 + source4/librpc/ndr/ndr_wmi.c | 30 -------------------------- source4/nbt_server/dgram/browse.c | 1 + source4/nbt_server/dgram/netlogon.c | 1 + source4/ntvfs/cifs_posix_cli/svfs_util.c | 1 + source4/ntvfs/ipc/rap_server.c | 2 ++ source4/ntvfs/simple/svfs_util.c | 1 + source4/param/share_ldb.c | 6 +++--- source4/rpc_server/common/server_info.c | 2 ++ source4/rpc_server/common/share_info.c | 2 ++ source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 4 ++-- source4/scripting/python/modules.c | 1 + source4/smbd/process_model.c | 1 + source4/torture/libnet/utils.c | 1 + source4/torture/smbtorture.c | 2 +- source4/torture/torture.c | 1 + 65 files changed, 102 insertions(+), 70 deletions(-) (limited to 'source4') diff --git a/source4/auth/auth_sam_reply.c b/source4/auth/auth_sam_reply.c index ea6f0a1f60..839553632e 100644 --- a/source4/auth/auth_sam_reply.c +++ b/source4/auth/auth_sam_reply.c @@ -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, diff --git a/source4/auth/credentials/credentials.c b/source4/auth/credentials/credentials.c index adabe49cb4..5fb180d7b1 100644 --- a/source4/auth/credentials/credentials.c +++ b/source4/auth/credentials/credentials.c @@ -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" diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c index 8f4f8c9561..17c555d25b 100644 --- a/source4/auth/credentials/credentials_files.c +++ b/source4/auth/credentials/credentials_files.c @@ -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" diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c index e8918ef66d..54d53965cc 100644 --- a/source4/auth/gensec/cyrus_sasl.c +++ b/source4/auth/gensec/cyrus_sasl.c @@ -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) { diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c index e791226cf6..e307dbb5cb 100644 --- a/source4/auth/gensec/gensec_gssapi.c +++ b/source4/auth/gensec/gensec_gssapi.c @@ -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); diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c index 76636bf89d..c73313f9c8 100644 --- a/source4/auth/gensec/schannel_state.c +++ b/source4/auth/gensec/schannel_state.c @@ -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 diff --git a/source4/auth/kerberos/gssapi_parse.c b/source4/auth/kerberos/gssapi_parse.c index e5b13fc70d..489ebcaa83 100644 --- a/source4/auth/kerberos/gssapi_parse.c +++ b/source4/auth/kerberos/gssapi_parse.c @@ -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 diff --git a/source4/auth/kerberos/kerberos.c b/source4/auth/kerberos/kerberos.c index d54664fe66..1889dcab4d 100644 --- a/source4/auth/kerberos/kerberos.c +++ b/source4/auth/kerberos/kerberos.c @@ -23,6 +23,7 @@ #include "includes.h" #include "system/kerberos.h" +#include "auth/kerberos/kerberos.h" #ifdef HAVE_KRB5 diff --git a/source4/auth/kerberos/kerberos_heimdal.c b/source4/auth/kerberos/kerberos_heimdal.c index f669d0f2f4..44cb39c518 100644 --- a/source4/auth/kerberos/kerberos_heimdal.c +++ b/source4/auth/kerberos/kerberos_heimdal.c @@ -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, diff --git a/source4/auth/ntlm/auth_util.c b/source4/auth/ntlm/auth_util.c index 1d86b858cf..64ceb437ad 100644 --- a/source4/auth/ntlm/auth_util.c +++ b/source4/auth/ntlm/auth_util.c @@ -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" diff --git a/source4/auth/ntlm/pam_errors.c b/source4/auth/ntlm/pam_errors.c index 9774ad8727..29fa4a8133 100644 --- a/source4/auth/ntlm/pam_errors.c +++ b/source4/auth/ntlm/pam_errors.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "auth/ntlm/pam_errors.h" #ifdef WITH_HAVE_SECURITY_PAM_APPL_H #include diff --git a/source4/auth/ntlm/pam_errors.h b/source4/auth/ntlm/pam_errors.h index 959e1f3517..2dfe085b77 100644 --- a/source4/auth/ntlm/pam_errors.h +++ b/source4/auth/ntlm/pam_errors.h @@ -20,19 +20,6 @@ #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 *****************************************************************************/ diff --git a/source4/auth/ntlmssp/ntlmssp_parse.c b/source4/auth/ntlmssp/ntlmssp_parse.c index e1c1e7cbb3..9256872036 100644 --- a/source4/auth/ntlmssp/ntlmssp_parse.c +++ b/source4/auth/ntlmssp/ntlmssp_parse.c @@ -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 diff --git a/source4/auth/sam.c b/source4/auth/sam.c index d04a254d6c..4255a6432a 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -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 */ diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c index 51f6d984e7..d0ceef4ad1 100644 --- a/source4/cluster/ctdb/ctdb_cluster.c +++ b/source4/cluster/ctdb/ctdb_cluster.c @@ -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 */ diff --git a/source4/dsdb/common/flag_mapping.c b/source4/dsdb/common/flag_mapping.c index 4a2a079e45..dceb41be67 100644 --- a/source4/dsdb/common/flag_mapping.c +++ b/source4/dsdb/common/flag_mapping.c @@ -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) diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c index 028df588d6..da23030ed3 100644 --- a/source4/dsdb/samdb/ldb_modules/anr.c +++ b/source4/dsdb/samdb/ldb_modules/anr.c @@ -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) { diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index b4a7a47a23..2a321e29c5 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -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) { diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index f6e735df79..95a16b5527 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -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; diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c b/source4/dsdb/samdb/ldb_modules/update_keytab.c index 2c6cb102d9..8eb49b5792 100644 --- a/source4/dsdb/samdb/ldb_modules/update_keytab.c +++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c @@ -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; diff --git a/source4/heimdal/lib/hdb/keys.c b/source4/heimdal/lib/hdb/keys.c index e649f445e0..a2637eb0b9 100644 --- a/source4/heimdal/lib/hdb/keys.c +++ b/source4/heimdal/lib/hdb/keys.c @@ -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, diff --git a/source4/heimdal_build/gssapi-glue.c b/source4/heimdal_build/gssapi-glue.c index c71b69463c..0c27f5100f 100644 --- a/source4/heimdal_build/gssapi-glue.c +++ b/source4/heimdal_build/gssapi-glue.c @@ -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; } diff --git a/source4/lib/charset/charset.h b/source4/lib/charset/charset.h index d4dae4cdad..041eaeace7 100644 --- a/source4/lib/charset/charset.h +++ b/source4/lib/charset/charset.h @@ -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__ */ diff --git a/source4/lib/cmdline/credentials.c b/source4/lib/cmdline/credentials.c index 2e5c6fd94a..f919842e6a 100644 --- a/source4/lib/cmdline/credentials.c +++ b/source4/lib/cmdline/credentials.c @@ -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) { diff --git a/source4/lib/cmdline/popt_common.h b/source4/lib/cmdline/popt_common.h index df432bb475..733d12a443 100644 --- a/source4/lib/cmdline/popt_common.h +++ b/source4/lib/cmdline/popt_common.h @@ -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 */ diff --git a/source4/lib/events/events_util.c b/source4/lib/events/events_util.c index 93f6492560..9e7d758405 100644 --- a/source4/lib/events/events_util.c +++ b/source4/lib/events/events_util.c @@ -22,6 +22,7 @@ #include "talloc.h" #include "events.h" #include "events_internal.h" +#include "events_util.h" #include /** diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index a92549d9ce..8f7e010bee 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -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 diff --git a/source4/lib/ldb/ldb_map/ldb_map_private.h b/source4/lib/ldb/ldb_map/ldb_map_private.h index 5522125344..0543ba71b9 100644 --- a/source4/lib/ldb/ldb_map/ldb_map_private.h +++ b/source4/lib/ldb/ldb_map/ldb_map_private.h @@ -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); diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index 1c76411db2..6ab06c4e48 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -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; diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 2282f61d47..34a4e03965 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -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; diff --git a/source4/lib/ldb/modules/paged_results.c b/source4/lib/ldb/modules/paged_results.c index d3bb83bbcd..1a242f1be0 100644 --- a/source4/lib/ldb/modules/paged_results.c +++ b/source4/lib/ldb/modules/paged_results.c @@ -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; diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index fe2091dde8..e89d6fd55c 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -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 */ diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index 314fe13471..5fb3bf4fae 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -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; diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c index 046c2b9036..f72aafe542 100644 --- a/source4/lib/tls/tls.c +++ b/source4/lib/tls/tls.c @@ -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); diff --git a/source4/lib/tls/tlscert.c b/source4/lib/tls/tlscert.c index 240ae056c1..f2e79f2a89 100644 --- a/source4/lib/tls/tlscert.c +++ b/source4/lib/tls/tlscert.c @@ -31,6 +31,10 @@ #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 */ diff --git a/source4/libcli/auth/smbdes.c b/source4/libcli/auth/smbdes.c index 7f998e512d..32e65e779d 100644 --- a/source4/libcli/auth/smbdes.c +++ b/source4/libcli/auth/smbdes.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "libcli/auth/libcli_auth.h" /* NOTES: diff --git a/source4/libcli/ldap/ldap_controls.c b/source4/libcli/ldap/ldap_controls.c index b34e026b18..930d97c40d 100644 --- a/source4/libcli/ldap/ldap_controls.c +++ b/source4/libcli/ldap/ldap_controls.c @@ -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; diff --git a/source4/libcli/ldap/ldap_msg.c b/source4/libcli/ldap/ldap_msg.c index c712e1e654..e45213c004 100644 --- a/source4/libcli/ldap/ldap_msg.c +++ b/source4/libcli/ldap/ldap_msg.c @@ -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) diff --git a/source4/libcli/ldap/ldap_ndr.c b/source4/libcli/ldap/ldap_ndr.c index a10f80ae2c..5e938ea148 100644 --- a/source4/libcli/ldap/ldap_ndr.c +++ b/source4/libcli/ldap/ldap_ndr.c @@ -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 diff --git a/source4/libcli/raw/clierror.c b/source4/libcli/raw/clierror.c index 157bd847d4..a41748640b 100644 --- a/source4/libcli/raw/clierror.c +++ b/source4/libcli/raw/clierror.c @@ -20,6 +20,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "libcli/raw/raw_proto.h" /*************************************************************************** diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c index 49838e8a1c..d51ffbaa74 100644 --- a/source4/libcli/raw/clisocket.c +++ b/source4/libcli/raw/clisocket.c @@ -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; diff --git a/source4/libcli/raw/rawdate.c b/source4/libcli/raw/rawdate.c index 9a86c88697..5264653cc6 100644 --- a/source4/libcli/raw/rawdate.c +++ b/source4/libcli/raw/rawdate.c @@ -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) diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c index 6317c49fd7..09fd4aa412 100644 --- a/source4/libcli/raw/raweas.c +++ b/source4/libcli/raw/raweas.c @@ -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. diff --git a/source4/libcli/raw/rawlpq.c b/source4/libcli/raw/rawlpq.c index 46e0efaaf5..eddb3e0843 100644 --- a/source4/libcli/raw/rawlpq.c +++ b/source4/libcli/raw/rawlpq.c @@ -20,6 +20,7 @@ #include "includes.h" #include "smb.h" #include "libcli/raw/libcliraw.h" +#include "libcli/raw/raw_proto.h" /**************************************************************************** lpq - async send diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c index 7dafd130f8..531ce6098f 100644 --- a/source4/libcli/resolve/nbtlist.c +++ b/source4/libcli/resolve/nbtlist.c @@ -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; diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c index 6c8580a662..1da6646702 100644 --- a/source4/libnet/groupinfo.c +++ b/source4/libnet/groupinfo.c @@ -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 { diff --git a/source4/libnet/groupman.c b/source4/libnet/groupman.c index 1e12c87713..58d5742336 100644 --- a/source4/libnet/groupman.c +++ b/source4/libnet/groupman.c @@ -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 { diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 3736454fa0..d5495f1e72 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -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); diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c index 847997fc12..e8b6b090c7 100644 --- a/source4/libnet/userinfo.c +++ b/source4/libnet/userinfo.c @@ -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 { diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index 25ed4775cb..398d9f2cb0 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -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 diff --git a/source4/librpc/ndr/ndr_wmi.c b/source4/librpc/ndr/ndr_wmi.c index 6cf42471f8..2c122decf4 100644 --- a/source4/librpc/ndr/ndr_wmi.c +++ b/source4/librpc/ndr/ndr_wmi.c @@ -29,36 +29,6 @@ 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; diff --git a/source4/nbt_server/dgram/browse.c b/source4/nbt_server/dgram/browse.c index 2e12fa114a..1ebc88fcd4 100644 --- a/source4/nbt_server/dgram/browse.c +++ b/source4/nbt_server/dgram/browse.c @@ -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) { diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c index c5b16fbd75..a3a7552f6a 100644 --- a/source4/nbt_server/dgram/netlogon.c +++ b/source4/nbt_server/dgram/netlogon.c @@ -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 diff --git a/source4/ntvfs/cifs_posix_cli/svfs_util.c b/source4/ntvfs/cifs_posix_cli/svfs_util.c index 42d869209d..e502340229 100644 --- a/source4/ntvfs/cifs_posix_cli/svfs_util.c +++ b/source4/ntvfs/cifs_posix_cli/svfs_util.c @@ -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 diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c index d9fb7e21b2..077ecaf79f 100644 --- a/source4/ntvfs/ipc/rap_server.c +++ b/source4/ntvfs/ipc/rap_server.c @@ -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. */ diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c index 286c556e30..a0cdbe9c39 100644 --- a/source4/ntvfs/simple/svfs_util.c +++ b/source4/ntvfs/simple/svfs_util.c @@ -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 diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c index 4896a71048..29664c7177 100644 --- a/source4/param/share_ldb.c +++ b/source4/param/share_ldb.c @@ -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; diff --git a/source4/rpc_server/common/server_info.c b/source4/rpc_server/common/server_info.c index da034e85ea..ab04b3af1f 100644 --- a/source4/rpc_server/common/server_info.c +++ b/source4/rpc_server/common/server_info.c @@ -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 diff --git a/source4/rpc_server/common/share_info.c b/source4/rpc_server/common/share_info.c index b27dc37949..130babd175 100644 --- a/source4/rpc_server/common/share_info.c +++ b/source4/rpc_server/common/share_info.c @@ -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 diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index a84f24a3e8..6af8ea50b5 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -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=,cn=Servers,cn=,cn=sites.... */ const struct ldb_val *val = ldb_dn_get_component_val(site_dn, 2); diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index 0fe15b2fda..e53f4cfaf2 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "scripting/python/modules.h" #include extern void init_ldb(void); diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c index d99d517d9f..d6346a06f9 100644 --- a/source4/smbd/process_model.c +++ b/source4/smbd/process_model.c @@ -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); diff --git a/source4/torture/libnet/utils.c b/source4/torture/libnet/utils.c index d4124cc823..4a55eaa56c 100644 --- a/source4/torture/libnet/utils.c +++ b/source4/torture/libnet/utils.c @@ -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, diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 302fefcc88..8d195f1253 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -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; diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 6c49cf01cd..dc98c2cc9a 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -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; -- cgit