summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth_sam_reply.c1
-rw-r--r--source4/auth/credentials/credentials.c1
-rw-r--r--source4/auth/credentials/credentials_files.c1
-rw-r--r--source4/auth/gensec/cyrus_sasl.c2
-rw-r--r--source4/auth/gensec/gensec_gssapi.c2
-rw-r--r--source4/auth/gensec/schannel_state.c1
-rw-r--r--source4/auth/kerberos/gssapi_parse.c2
-rw-r--r--source4/auth/kerberos/kerberos.c1
-rw-r--r--source4/auth/kerberos/kerberos_heimdal.c1
-rw-r--r--source4/auth/ntlm/auth_util.c1
-rw-r--r--source4/auth/ntlm/pam_errors.c1
-rw-r--r--source4/auth/ntlm/pam_errors.h13
-rw-r--r--source4/auth/ntlmssp/ntlmssp_parse.c2
-rw-r--r--source4/auth/sam.c1
-rw-r--r--source4/cluster/ctdb/ctdb_cluster.c1
-rw-r--r--source4/dsdb/common/flag_mapping.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/anr.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/update_keytab.c4
-rw-r--r--source4/heimdal/lib/hdb/keys.c6
-rw-r--r--source4/heimdal_build/gssapi-glue.c3
-rw-r--r--source4/lib/charset/charset.h4
-rw-r--r--source4/lib/cmdline/credentials.c1
-rw-r--r--source4/lib/cmdline/popt_common.h2
-rw-r--r--source4/lib/events/events_util.c1
-rw-r--r--source4/lib/ldb/include/ldb_private.h7
-rw-r--r--source4/lib/ldb/ldb_map/ldb_map_private.h2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c2
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c4
-rw-r--r--source4/lib/ldb/modules/paged_results.c2
-rw-r--r--source4/lib/registry/registry.h12
-rw-r--r--source4/lib/smbreadline/smbreadline.c2
-rw-r--r--source4/lib/tls/tls.c1
-rw-r--r--source4/lib/tls/tlscert.c4
-rw-r--r--source4/lib/torture/torture.c13
-rw-r--r--source4/libcli/auth/smbdes.c1
-rw-r--r--source4/libcli/ldap/ldap_controls.c1
-rw-r--r--source4/libcli/ldap/ldap_msg.c1
-rw-r--r--source4/libcli/ldap/ldap_ndr.c1
-rw-r--r--source4/libcli/raw/clierror.c1
-rw-r--r--source4/libcli/raw/clisocket.c1
-rw-r--r--source4/libcli/raw/rawdate.c1
-rw-r--r--source4/libcli/raw/raweas.c1
-rw-r--r--source4/libcli/raw/rawlpq.c1
-rw-r--r--source4/libcli/resolve/nbtlist.c1
-rw-r--r--source4/libnet/groupinfo.c1
-rw-r--r--source4/libnet/groupman.c1
-rw-r--r--source4/libnet/py_net.c2
-rw-r--r--source4/libnet/userinfo.c1
-rw-r--r--source4/libnet/userman.c1
-rw-r--r--source4/librpc/config.mk6
-rw-r--r--source4/librpc/idl/dcerpc.idl40
-rw-r--r--source4/librpc/idl/lsa.idl25
-rw-r--r--source4/librpc/idl/srvsvc.idl10
-rw-r--r--source4/librpc/ndr/ndr_orpc.c173
-rw-r--r--source4/librpc/ndr/ndr_wmi.c90
-rw-r--r--source4/librpc/ndr/ndr_wmi.h3
-rw-r--r--source4/nbt_server/dgram/browse.c1
-rw-r--r--source4/nbt_server/dgram/netlogon.c1
-rw-r--r--source4/ntvfs/cifs_posix_cli/svfs_util.c1
-rw-r--r--source4/ntvfs/ipc/rap_server.c2
-rw-r--r--source4/ntvfs/simple/svfs_util.c1
-rw-r--r--source4/param/share_ldb.c6
-rw-r--r--source4/rpc_server/common/server_info.c2
-rw-r--r--source4/rpc_server/common/share_info.c2
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c4
-rw-r--r--source4/scripting/python/modules.c1
-rw-r--r--source4/smbd/process_model.c1
-rw-r--r--source4/torture/libnet/utils.c1
-rw-r--r--source4/torture/smbtorture.c2
-rw-r--r--source4/torture/torture.c1
72 files changed, 141 insertions, 361 deletions
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 <security/pam_appl.h>
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 <fcntl.h>
/**
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/lib/torture/torture.c b/source4/lib/torture/torture.c
index 166bb7eb84..ba7168f3fe 100644
--- a/source4/lib/torture/torture.c
+++ b/source4/lib/torture/torture.c
@@ -235,19 +235,6 @@ void torture_ui_test_start(struct torture_context *context,
context->ui_ops->test_start(context, tcase, test);
}
-int str_list_match(const char *name, char **list)
-{
- int i, ret = 0;
- if (list == NULL)
- return 0;
-
- for (i = 0; list[i]; i++) {
- if (gen_fnmatch(list[i], name) == 0)
- ret++;
- }
- return ret;
-}
-
void torture_ui_test_result(struct torture_context *context,
enum torture_result result,
const char *comment)
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/config.mk b/source4/librpc/config.mk
index 6a0cd00e11..a988dcf420 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -10,8 +10,6 @@ PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBTALLOC LIBSAMBA-UTIL CHARSET \
LIBNDR_OBJ_FILES = $(addprefix $(ndrsrcdir)/, ndr_string.o) ../librpc/ndr/ndr_basic.o ../librpc/ndr/uuid.o ../librpc/ndr/ndr.o
-$(eval $(call proto_header_template,$(ndrsrcdir)/libndr_proto.h,$(LIBNDR_OBJ_FILES:.o=.c)))
-
PC_FILES += ../librpc/ndr.pc
LIBNDR_VERSION = 0.0.1
LIBNDR_SOVERSION = 0
@@ -90,7 +88,7 @@ NDR_DCOM_OBJ_FILES = $(gen_ndrsrcdir)/ndr_dcom.o
[SUBSYSTEM::NDR_WMI]
PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY NDR_DCOM
-NDR_WMI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wmi.o $(ndrsrcdir)/ndr_wmi.o
+NDR_WMI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_wmi.o ../librpc/ndr/ndr_wmi.o
[SUBSYSTEM::NDR_DSBACKUP]
PUBLIC_DEPENDENCIES = LIBNDR
@@ -261,7 +259,7 @@ NDR_PROTECTED_STORAGE_OBJ_FILES = $(gen_ndrsrcdir)/ndr_protected_storage.o
[SUBSYSTEM::NDR_ORPC]
PUBLIC_DEPENDENCIES = LIBNDR
-NDR_ORPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_orpc.o $(ndrsrcdir)/ndr_orpc.o
+NDR_ORPC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_orpc.o ../librpc/ndr/ndr_orpc.o
[SUBSYSTEM::NDR_OXIDRESOLVER]
PUBLIC_DEPENDENCIES = LIBNDR NDR_ORPC NDR_MISC
diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl
index a78329d990..7c0abe6ab8 100644
--- a/source4/librpc/idl/dcerpc.idl
+++ b/source4/librpc/idl/dcerpc.idl
@@ -205,26 +205,26 @@ interface dcerpc
} dcerpc_working;
typedef [enum8bit] enum {
- DCERPC_PKT_REQUEST = 0,
- DCERPC_PKT_PING = 1,
- DCERPC_PKT_RESPONSE = 2,
- DCERPC_PKT_FAULT = 3,
- DCERPC_PKT_WORKING = 4,
- DCERPC_PKT_NOCALL = 5,
- DCERPC_PKT_REJECT = 6,
- DCERPC_PKT_ACK = 7,
- DCERPC_PKT_CL_CANCEL = 8,
- DCERPC_PKT_FACK = 9,
- DCERPC_PKT_CANCEL_ACK = 10,
- DCERPC_PKT_BIND = 11,
- DCERPC_PKT_BIND_ACK = 12,
- DCERPC_PKT_BIND_NAK = 13,
- DCERPC_PKT_ALTER = 14,
- DCERPC_PKT_ALTER_RESP = 15,
- DCERPC_PKT_AUTH3 = 16,
- DCERPC_PKT_SHUTDOWN = 17,
- DCERPC_PKT_CO_CANCEL = 18,
- DCERPC_PKT_ORPHANED = 19
+ DCERPC_PKT_REQUEST = 0, /* Ordinary request. */
+ DCERPC_PKT_PING = 1, /* Connectionless is server alive ? */
+ DCERPC_PKT_RESPONSE = 2, /* Ordinary reply. */
+ DCERPC_PKT_FAULT = 3, /* Fault in processing of call. */
+ DCERPC_PKT_WORKING = 4, /* Connectionless reply to a ping when server busy. */
+ DCERPC_PKT_NOCALL = 5, /* Connectionless reply to a ping when server has lost part of clients call. */
+ DCERPC_PKT_REJECT = 6, /* Refuse a request with a code. */
+ DCERPC_PKT_ACK = 7, /* Connectionless client to server code. */
+ DCERPC_PKT_CL_CANCEL = 8, /* Connectionless cancel. */
+ DCERPC_PKT_FACK = 9, /* Connectionless fragment ack. Both client and server send. */
+ DCERPC_PKT_CANCEL_ACK = 10, /* Server ACK to client cancel request. */
+ DCERPC_PKT_BIND = 11, /* Bind to interface. */
+ DCERPC_PKT_BIND_ACK = 12, /* Server ack of bind. */
+ DCERPC_PKT_BIND_NAK = 13, /* Server nack of bind. */
+ DCERPC_PKT_ALTER = 14, /* Alter auth. */
+ DCERPC_PKT_ALTER_RESP = 15, /* Reply to alter auth. */
+ DCERPC_PKT_AUTH3 = 16, /* not the real name! this is undocumented! */
+ DCERPC_PKT_SHUTDOWN = 17, /* Server to client request to shutdown. */
+ DCERPC_PKT_CO_CANCEL = 18, /* Connection-oriented cancel request. */
+ DCERPC_PKT_ORPHANED = 19 /* Client telling server it's aborting a partially sent request or telling server to stop sending replies. */
} dcerpc_pkt_type;
typedef [nodiscriminant] union {
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index 8745385a10..4a7a42b4dc 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -288,7 +288,7 @@ import "misc.idl", "security.idl";
[case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN)] lsa_DomainInfo l_account_domain;
} lsa_PolicyInformation;
- NTSTATUS lsa_QueryInfoPolicy (
+ NTSTATUS lsa_QueryInfoPolicy(
[in] policy_handle *handle,
[in] lsa_PolicyInfo level,
[out,unique,switch_is(level)] lsa_PolicyInformation *info
@@ -718,14 +718,14 @@ import "misc.idl", "security.idl";
/* Function: 0x1a */
NTSTATUS lsa_QueryTrustedDomainInfo(
[in] policy_handle *trustdom_handle,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[out,switch_is(level),unique] lsa_TrustedDomainInfo *info
);
/* Function: 0x1b */
NTSTATUS lsa_SetInformationTrustedDomain(
[in] policy_handle *trustdom_handle,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[in,switch_is(level)] lsa_TrustedDomainInfo *info
);
@@ -792,8 +792,6 @@ import "misc.idl", "security.idl";
[in,out] policy_handle *handle
);
-
-
/*******************/
/* Function: 0x23 */
NTSTATUS lsa_EnumAccountsWithUserRight (
@@ -840,7 +838,7 @@ import "misc.idl", "security.idl";
NTSTATUS lsa_QueryTrustedDomainInfoBySid(
[in] policy_handle *handle,
[in] dom_sid2 *dom_sid,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[out,switch_is(level),unique] lsa_TrustedDomainInfo *info
);
@@ -848,9 +846,10 @@ import "misc.idl", "security.idl";
NTSTATUS lsa_SetTrustedDomainInfo(
[in] policy_handle *handle,
[in] dom_sid2 *dom_sid,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[in,switch_is(level)] lsa_TrustedDomainInfo *info
);
+
/* Function: 0x29 */
NTSTATUS lsa_DeleteTrustedDomain(
[in] policy_handle *handle,
@@ -888,8 +887,8 @@ import "misc.idl", "security.idl";
/* Function: 0x2e */
NTSTATUS lsa_QueryInfoPolicy2(
- [in] policy_handle *handle,
- [in] lsa_PolicyInfo level,
+ [in] policy_handle *handle,
+ [in] lsa_PolicyInfo level,
[out,unique,switch_is(level)] lsa_PolicyInformation *info
);
@@ -903,9 +902,9 @@ import "misc.idl", "security.idl";
/**********************/
/* Function 0x30 */
NTSTATUS lsa_QueryTrustedDomainInfoByName(
- [in] policy_handle *handle,
+ [in] policy_handle *handle,
[in] lsa_String trusted_domain,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[out,unique,switch_is(level)] lsa_TrustedDomainInfo *info
);
@@ -914,7 +913,7 @@ import "misc.idl", "security.idl";
NTSTATUS lsa_SetTrustedDomainInfoByName(
[in] policy_handle *handle,
[in] lsa_String trusted_domain,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
);
@@ -980,7 +979,7 @@ import "misc.idl", "security.idl";
NTSTATUS lsa_QueryDomainInformationPolicy(
[in] policy_handle *handle,
- [in] uint16 level,
+ [in] uint16 level,
[out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
);
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index 703f3281cf..10807cd6af 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -65,7 +65,7 @@ import "security.idl", "svcctl.idl";
/******************/
/* Function: 0x01 */
WERROR srvsvc_NetCharDevGetInfo(
- [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 device_name[],
[in] uint32 level,
[out,switch_is(level)] srvsvc_NetCharDevInfo info
@@ -74,7 +74,7 @@ import "security.idl", "svcctl.idl";
/******************/
/* Function: 0x02 */
WERROR srvsvc_NetCharDevControl(
- [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 device_name[],
[in] uint32 opcode
);
@@ -131,7 +131,7 @@ import "security.idl", "svcctl.idl";
/******************/
/* Function: 0x04 */
WERROR srvsvc_NetCharDevQGetInfo(
- [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 queue_name[],
[in] [string,charset(UTF16)] uint16 user[],
[in] uint32 level,
@@ -151,14 +151,14 @@ import "security.idl", "svcctl.idl";
/******************/
/* Function: 0x06 */
WERROR srvsvc_NetCharDevQPurge(
- [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 queue_name[]
);
/******************/
/* Function: 0x07 */
WERROR srvsvc_NetCharDevQPurgeSelf(
- [in,unique] [string,charset(UTF16)] uint16 *server_unc,
+ [in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 queue_name[],
[in] [string,charset(UTF16)] uint16 computer_name[]
);
diff --git a/source4/librpc/ndr/ndr_orpc.c b/source4/librpc/ndr/ndr_orpc.c
deleted file mode 100644
index 6a55048e43..0000000000
--- a/source4/librpc/ndr/ndr_orpc.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- routines for marshalling/unmarshalling DCOM string arrays
-
- Copyright (C) Jelmer Vernooij 2004
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_orpc.h"
-
-enum ndr_err_code ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DUALSTRINGARRAY *ar)
-{
- uint16_t num_entries, security_offset;
- uint16_t towerid;
- uint32_t towernum = 0, conformant_size;
-
- if (!(ndr_flags & NDR_SCALARS)) {
- return NDR_ERR_SUCCESS;
- }
-
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &conformant_size));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &num_entries));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &security_offset));
-
- ar->stringbindings = talloc_array(ndr, struct STRINGBINDING *, num_entries);
- ar->stringbindings[0] = NULL;
-
- do {
- /* 'Peek' */
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &towerid));
-
- if (towerid > 0) {
- ndr->offset -= 2;
- ar->stringbindings = talloc_realloc(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
- ar->stringbindings[towernum] = talloc(ndr, struct STRINGBINDING);
- NDR_CHECK(ndr_pull_STRINGBINDING(ndr, ndr_flags, ar->stringbindings[towernum]));
- towernum++;
- }
- } while (towerid != 0);
-
- ar->stringbindings[towernum] = NULL;
- towernum = 0;
-
- ar->securitybindings = talloc_array(ndr, struct SECURITYBINDING *, num_entries);
- ar->securitybindings[0] = NULL;
-
- do {
- /* 'Peek' */
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &towerid));
-
- if (towerid > 0) {
- ndr->offset -= 2;
- ar->securitybindings = talloc_realloc(ndr, ar->securitybindings, struct SECURITYBINDING *, towernum+2);
- ar->securitybindings[towernum] = talloc(ndr, struct SECURITYBINDING);
- NDR_CHECK(ndr_pull_SECURITYBINDING(ndr, ndr_flags, ar->securitybindings[towernum]));
- towernum++;
- }
- } while (towerid != 0);
-
- ar->securitybindings[towernum] = NULL;
-
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_DUALSTRINGARRAY(struct ndr_push *ndr, int ndr_flags, const struct DUALSTRINGARRAY *ar)
-{
- return ndr_push_error(ndr, NDR_ERR_STRING, "ndr_push_DUALSTRINGARRAY not implemented");
-}
-
-/*
- print a dom_sid
-*/
-void ndr_print_DUALSTRINGARRAY(struct ndr_print *ndr, const char *name, const struct DUALSTRINGARRAY *ar)
-{
- int i;
- ndr->print(ndr, "%-25s: DUALSTRINGARRAY", name);
- ndr->depth++;
- ndr->print(ndr, "STRING BINDINGS");
- ndr->depth++;
- for (i=0;ar->stringbindings[i];i++) {
- char *idx = NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]);
- free(idx);
- }
- }
- ndr->depth--;
- ndr->print(ndr, "SECURITY BINDINGS");
- ndr->depth++;
- for (i=0;ar->securitybindings[i];i++) {
- char *idx = NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_SECURITYBINDING(ndr, idx, ar->securitybindings[i]);
- free(idx);
- }
- }
- ndr->depth--;
-}
-
-enum ndr_err_code ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRINGARRAY *ar)
-{
- uint16_t towerid;
- uint32_t towernum = 0;
- uint16_t num_entries;
-
- if (!(ndr_flags & NDR_SCALARS)) {
- return NDR_ERR_SUCCESS;
- }
-
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &num_entries));
-
- ar->stringbindings = talloc_array(ndr, struct STRINGBINDING *, 1);
- ar->stringbindings[0] = NULL;
-
- do {
- /* 'Peek' */
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &towerid));
-
- if (towerid > 0) {
- ndr->offset -= 2;
- ar->stringbindings = talloc_realloc(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
- ar->stringbindings[towernum] = talloc(ndr, struct STRINGBINDING);
- NDR_CHECK(ndr_pull_STRINGBINDING(ndr, ndr_flags, ar->stringbindings[towernum]));
- towernum++;
- }
- } while (towerid != 0);
-
- ar->stringbindings[towernum] = NULL;
- towernum = 0;
-
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_STRINGARRAY(struct ndr_push *ndr, int ndr_flags, const struct STRINGARRAY *ar)
-{
- return ndr_push_error(ndr, NDR_ERR_STRING, "ndr_push_STRINGARRAY not implemented");
-}
-
-/*
- print a dom_sid
-*/
-void ndr_print_STRINGARRAY(struct ndr_print *ndr, const char *name, const struct STRINGARRAY *ar)
-{
- int i;
- ndr->print(ndr, "%-25s: STRINGARRAY", name);
- ndr->depth++;
- for (i=0;ar->stringbindings[i];i++) {
- char *idx = NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]);
- free(idx);
- }
- }
- ndr->depth--;
-}
diff --git a/source4/librpc/ndr/ndr_wmi.c b/source4/librpc/ndr/ndr_wmi.c
deleted file mode 100644
index 6cf42471f8..0000000000
--- a/source4/librpc/ndr/ndr_wmi.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- routines for marshalling/unmarshalling DCOM string arrays
-
- Copyright (C) Jelmer Vernooij 2004
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-//#define NDR_CHECK_DEBUG
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_dcom.h"
-#include "librpc/gen_ndr/ndr_wmi.h"
-#include "librpc/ndr/ndr_wmi.h"
-
-// Just for debugging
-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;
- uint32_t flags;
- enum ndr_err_code status;
- len = strlen(r->data);
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x72657355));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, len));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*len));
- flags = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM | LIBNDR_FLAG_STR_SIZE4);
- status = ndr_push_string(ndr, NDR_SCALARS, r->data);
- ndr->flags = flags;
- return status;
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_BSTR(struct ndr_pull *ndr, int ndr_flags, struct BSTR *r)
-{
- return NDR_ERR_BAD_SWITCH;
-}
-
-void ndr_print_BSTR(struct ndr_print *ndr, const char *name, const struct BSTR *r)
-{
- ndr->print(ndr, "%-25s: BSTR(\"%s\")", name, r->data);
-}
diff --git a/source4/librpc/ndr/ndr_wmi.h b/source4/librpc/ndr/ndr_wmi.h
deleted file mode 100644
index 539b9e882b..0000000000
--- a/source4/librpc/ndr/ndr_wmi.h
+++ /dev/null
@@ -1,3 +0,0 @@
-typedef const char *CIMSTRING;
-enum ndr_err_code ndr_pull_CIMSTRING(struct ndr_pull *ndr, int ndr_flags, CIMSTRING *r);
-enum ndr_err_code ndr_push_CIMSTRING(struct ndr_push *ndr, int ndr_flags, const CIMSTRING *r);
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=<NETBIOS name>,cn=Servers,cn=<site>,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 <Python.h>
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;