From: Günther Deschner Date: Thu, 5 Aug 2010 00:25:37 +0000 (+0200) Subject: s3-secrets: only include secrets.h when needed. X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=c136b84f0d28d1a88c5918b06f81766a271a3780 s3-secrets: only include secrets.h when needed. Guenther --- diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index f25fb4a2c75..0fc6410fec3 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -22,6 +22,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/ndr_netlogon.h" #include "rpc_client/cli_netlogon.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c index 7eea5af6052..8be2c6a00c0 100644 --- a/source3/auth/auth_netlogond.c +++ b/source3/auth/auth_netlogond.c @@ -21,6 +21,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/ndr_netlogon.h" #include "rpc_client/cli_netlogon.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index 3a288ddcf2f..7634e76f1c9 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -25,6 +25,7 @@ /* functions moved from auth/auth_util.c to minimize linker deps */ #include "includes.h" +#include "secrets.h" /**************************************************************************** Check for a SID in an NT_USER_TOKEN diff --git a/source3/include/includes.h b/source3/include/includes.h index 35686e9f313..318c747d53f 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -642,7 +642,6 @@ extern void *cmdline_lp_ctx; #include "smb_signing.h" #include "smb.h" #include "nameserv.h" -#include "secrets.h" #include "../lib/util/byteorder.h" #include "privileges.h" #include "rpc_misc.h" diff --git a/source3/include/passdb.h b/source3/include/passdb.h index 08377010d4f..b07c1178536 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -218,6 +218,15 @@ struct pdb_domain_info { struct GUID guid; }; +/* + * trusted domain entry/entries returned by secrets_get_trusted_domains + * (used in _lsa_enum_trust_dom call) + */ +struct trustdom_info { + char *name; + struct dom_sid sid; +}; + /* * Types of account policy. */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 9fd91b4724c..fe977262b6b 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4365,53 +4365,6 @@ NTSTATUS pdb_wbc_sam_init(void); bool init_sam_from_buffer_v2(struct samu *sampass, uint8_t *buf, uint32_t buflen); NTSTATUS pdb_tdbsam_init(void); -/* The following definitions come from passdb/secrets.c */ - -bool secrets_init(void); -struct db_context *secrets_db_ctx(void); -void secrets_shutdown(void); -void *secrets_fetch(const char *key, size_t *size); -bool secrets_store(const char *key, const void *data, size_t size); -bool secrets_delete(const char *key); -bool secrets_store_domain_sid(const char *domain, const struct dom_sid *sid); -bool secrets_fetch_domain_sid(const char *domain, struct dom_sid *sid); -bool secrets_store_domain_guid(const char *domain, struct GUID *guid); -bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid); -void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain); -enum netr_SchannelType get_default_sec_channel(void); -bool secrets_fetch_trust_account_password_legacy(const char *domain, - uint8 ret_pwd[16], - time_t *pass_last_set_time, - enum netr_SchannelType *channel); -bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16], - time_t *pass_last_set_time, - enum netr_SchannelType *channel); -bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd, - struct dom_sid *sid, time_t *pass_last_set_time); -bool secrets_store_trusted_domain_password(const char* domain, const char* pwd, - const struct dom_sid *sid); -bool secrets_delete_machine_password(const char *domain); -bool secrets_delete_machine_password_ex(const char *domain); -bool secrets_delete_domain_sid(const char *domain); -bool secrets_store_machine_password(const char *pass, const char *domain, enum netr_SchannelType sec_channel); -char *secrets_fetch_prev_machine_password(const char *domain); -char *secrets_fetch_machine_password(const char *domain, - time_t *pass_last_set_time, - enum netr_SchannelType *channel); -bool trusted_domain_password_delete(const char *domain); -bool secrets_store_ldap_pw(const char* dn, char* pw); -bool fetch_ldap_pw(char **dn, char** pw); -NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains, - struct trustdom_info ***domains); -bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile); -bool secrets_fetch_afs_key(const char *cell, struct afs_key *result); -void secrets_fetch_ipc_userpass(char **username, char **domain, char **password); -bool secrets_store_generic(const char *owner, const char *key, const char *secret); -char *secrets_fetch_generic(const char *owner, const char *key); -bool secrets_delete_generic(const char *owner, const char *key); -bool secrets_store_local_schannel_key(uint8_t schannel_key[16]); -bool secrets_fetch_local_schannel_key(uint8_t schannel_key[16]); - /* The following definitions come from passdb/util_builtin.c */ bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name); diff --git a/source3/include/secrets.h b/source3/include/secrets.h index 624b1465bb8..095ab6ee78b 100644 --- a/source3/include/secrets.h +++ b/source3/include/secrets.h @@ -61,15 +61,6 @@ struct machine_acct_pass { time_t mod_time; }; -/* - * trusted domain entry/entries returned by secrets_get_trusted_domains - * (used in _lsa_enum_trust_dom call) - */ -struct trustdom_info { - char *name; - struct dom_sid sid; -}; - /* * Format of an OpenAFS keyfile */ @@ -88,4 +79,51 @@ struct afs_keyfile { #define SECRETS_AFS_KEYFILE "SECRETS/AFS_KEYFILE" +/* The following definitions come from passdb/secrets.c */ + +bool secrets_init(void); +struct db_context *secrets_db_ctx(void); +void secrets_shutdown(void); +void *secrets_fetch(const char *key, size_t *size); +bool secrets_store(const char *key, const void *data, size_t size); +bool secrets_delete(const char *key); +bool secrets_store_domain_sid(const char *domain, const struct dom_sid *sid); +bool secrets_fetch_domain_sid(const char *domain, struct dom_sid *sid); +bool secrets_store_domain_guid(const char *domain, struct GUID *guid); +bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid); +void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain); +enum netr_SchannelType get_default_sec_channel(void); +bool secrets_fetch_trust_account_password_legacy(const char *domain, + uint8 ret_pwd[16], + time_t *pass_last_set_time, + enum netr_SchannelType *channel); +bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16], + time_t *pass_last_set_time, + enum netr_SchannelType *channel); +bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd, + struct dom_sid *sid, time_t *pass_last_set_time); +bool secrets_store_trusted_domain_password(const char* domain, const char* pwd, + const struct dom_sid *sid); +bool secrets_delete_machine_password(const char *domain); +bool secrets_delete_machine_password_ex(const char *domain); +bool secrets_delete_domain_sid(const char *domain); +bool secrets_store_machine_password(const char *pass, const char *domain, enum netr_SchannelType sec_channel); +char *secrets_fetch_prev_machine_password(const char *domain); +char *secrets_fetch_machine_password(const char *domain, + time_t *pass_last_set_time, + enum netr_SchannelType *channel); +bool trusted_domain_password_delete(const char *domain); +bool secrets_store_ldap_pw(const char* dn, char* pw); +bool fetch_ldap_pw(char **dn, char** pw); +NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains, + struct trustdom_info ***domains); +bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile); +bool secrets_fetch_afs_key(const char *cell, struct afs_key *result); +void secrets_fetch_ipc_userpass(char **username, char **domain, char **password); +bool secrets_store_generic(const char *owner, const char *key, const char *secret); +char *secrets_fetch_generic(const char *owner, const char *key); +bool secrets_delete_generic(const char *owner, const char *key); +bool secrets_store_local_schannel_key(uint8_t schannel_key[16]); +bool secrets_fetch_local_schannel_key(uint8_t schannel_key[16]); + #endif /* _SECRETS_H */ diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index 94de573395c..13a06c7136c 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/lib/netapi/joindomain.c @@ -27,6 +27,7 @@ #include "libnet/libnet_join.h" #include "libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/cli_wkssvc.h" +#include "secrets.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index bde6fd823fd..975e306b5d2 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -20,6 +20,7 @@ #include "includes.h" #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" +#include "secrets.h" extern bool AllowDebugChange; diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index b1571536eb0..996c1c4c853 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -24,6 +24,7 @@ #include "includes.h" #include "smbldap.h" +#include "secrets.h" /* Try not to hit the up or down server forever */ diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index b81f0a1ec80..dbb5f7d08ad 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -20,6 +20,7 @@ #include "includes.h" +#include "secrets.h" static char *alloc_sub_basic(const char *smb_name, const char *domain_name, const char *str); diff --git a/source3/lib/util.c b/source3/lib/util.c index dc243ecf1d0..6770a715d88 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "secrets.h" extern char *global_clobber_region_function; extern unsigned int global_clobber_region_line; diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index c48944ae6f8..31af49685a8 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -25,6 +25,7 @@ #include "smb_krb5.h" #include "../librpc/gen_ndr/ndr_misc.h" #include "libads/kerberos_proto.h" +#include "secrets.h" #ifdef HAVE_KRB5 diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c index 33b065f6543..a874901caf3 100644 --- a/source3/libads/kerberos_keytab.c +++ b/source3/libads/kerberos_keytab.c @@ -28,6 +28,7 @@ #include "includes.h" #include "smb_krb5.h" #include "ads.h" +#include "secrets.h" #ifdef HAVE_KRB5 diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c index f8a66021948..aaeff59182b 100644 --- a/source3/libads/kerberos_verify.c +++ b/source3/libads/kerberos_verify.c @@ -26,6 +26,7 @@ #include "includes.h" #include "smb_krb5.h" #include "libads/kerberos_proto.h" +#include "secrets.h" #ifdef HAVE_KRB5 diff --git a/source3/libads/util.c b/source3/libads/util.c index f028c75cfe2..44b4c78038e 100644 --- a/source3/libads/util.c +++ b/source3/libads/util.c @@ -19,6 +19,7 @@ #include "includes.h" #include "ads.h" +#include "secrets.h" #ifdef HAVE_KRB5 diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 2d18261bfb8..bff4e1ebc5f 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -32,7 +32,7 @@ #include "lib/smbconf/smbconf.h" #include "lib/smbconf/smbconf_reg.h" #include "../libds/common/flags.h" - +#include "secrets.h" /**************************************************************** ****************************************************************/ diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index c44d92c99a4..7f4ede49efa 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -25,6 +25,7 @@ #include "includes.h" #include "libsmbclient.h" #include "libsmb_internal.h" +#include "secrets.h" /* diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c index 2daacec9127..e122937d6e7 100644 --- a/source3/libsmb/trusts_util.c +++ b/source3/libsmb/trusts_util.c @@ -24,6 +24,7 @@ #include "rpc_client/cli_lsarpc.h" #include "rpc_client/cli_netlogon.h" #include "../librpc/gen_ndr/ndr_netlogon.h" +#include "secrets.h" /********************************************************* Change the domain password on the PDC. diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c index bf7b4138d06..57d483fa46b 100644 --- a/source3/modules/vfs_smb_traffic_analyzer.c +++ b/source3/modules/vfs_smb_traffic_analyzer.c @@ -23,6 +23,7 @@ #include "../lib/crypto/crypto.h" #include "vfs_smb_traffic_analyzer.h" #include "../libcli/security/dom_sid.h" +#include "secrets.h" /* abstraction for the send_over_network function */ enum sock_type {INTERNET_SOCKET = 0, UNIX_DOMAIN_SOCKET}; diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index f07628f3ef2..607260b230a 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -28,6 +28,7 @@ #include "../libcli/cldap/cldap.h" #include "../lib/tsocket/tsocket.h" #include "../libcli/security/dom_sid.h" +#include "secrets.h" struct sam_database_info { uint32 index; diff --git a/source3/pam_smbpass/support.c b/source3/pam_smbpass/support.c index 43b92777021..715a0f43bb6 100644 --- a/source3/pam_smbpass/support.c +++ b/source3/pam_smbpass/support.c @@ -19,6 +19,7 @@ #include "general.h" #include "support.h" +#include "secrets.h" #include "../libcli/auth/libcli_auth.h" #if defined(HAVE_SECURITY_PAM_EXT_H) diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 9a5edcfa3ac..0ec1f420f92 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -21,6 +21,7 @@ #include "includes.h" #include "../librpc/gen_ndr/ndr_security.h" +#include "secrets.h" /***************************************************************** Dissect a user-provided name into domain, name, sid and type. diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c index db99d010ec4..c5a8faf694d 100644 --- a/source3/passdb/machine_account_secrets.c +++ b/source3/passdb/machine_account_secrets.c @@ -24,6 +24,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c index 703e6ef2681..0f735c40efb 100644 --- a/source3/passdb/machine_sid.c +++ b/source3/passdb/machine_sid.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "secrets.h" /* NOTE! the global_sam_sid is the SID of our local SAM. This is only equal to the domain SID when we are a DC, otherwise its our diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index abcd4d1dc36..1989f6d1919 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -24,6 +24,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 1c420f85847..3ca24c49911 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -21,6 +21,7 @@ #include "tldap.h" #include "tldap_util.h" #include "../libds/common/flags.h" +#include "secrets.h" struct pdb_ads_state { struct sockaddr_un socket_address; diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index b5da2658e26..ba6725e7a5e 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 2e48023d8bd..451012d5b04 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -45,6 +45,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index b673ad12a49..52c8e8060fe 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -25,6 +25,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" #include "librpc/gen_ndr/ndr_secrets.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index a831ef220ee..9ead42df5b6 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -30,6 +30,7 @@ #include "../librpc/gen_ndr/ndr_spoolss.h" #include "rpc_server/srv_spoolss_util.h" #include "nt_printing.h" +#include "secrets.h" /* Map generic permissions to printer object specific permissions */ diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c index e59f137ed5c..fff50513087 100644 --- a/source3/printing/nt_printing_ads.c +++ b/source3/printing/nt_printing_ads.c @@ -24,6 +24,7 @@ #include "rpc_server/srv_spoolss_util.h" #include "nt_printing.h" #include "ads.h" +#include "secrets.h" #ifdef HAVE_ADS /***************************************************************** diff --git a/source3/rpc_server/srv_dssetup_nt.c b/source3/rpc_server/srv_dssetup_nt.c index e690969679d..cbc08c0880e 100644 --- a/source3/rpc_server/srv_dssetup_nt.c +++ b/source3/rpc_server/srv_dssetup_nt.c @@ -24,6 +24,7 @@ #include "includes.h" #include "../librpc/gen_ndr/srv_dssetup.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 10ea1e3b971..68fc2b18f38 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -30,6 +30,7 @@ #include "includes.h" #include "../librpc/gen_ndr/srv_lsa.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 95f69a3bba3..e101240dbee 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -37,6 +37,7 @@ #include "../librpc/gen_ndr/srv_samr.h" #include "rpc_server/srv_samr_util.h" #include "../lib/crypto/arcfour.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index d0473ed62a9..7ada5fdb9a3 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -38,6 +38,7 @@ #include "registry.h" #include "registry/reg_objects.h" #include "include/printing.h" +#include "secrets.h" /* macros stolen from s4 spoolss server */ #define SPOOLSS_BUFFER_UNION(fn,info,level) \ diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c index 5b47154f41b..ab6be2f69d0 100644 --- a/source3/rpc_server/srv_spoolss_util.c +++ b/source3/rpc_server/srv_spoolss_util.c @@ -26,6 +26,7 @@ #include "../librpc/gen_ndr/srv_winreg.h" #include "../librpc/gen_ndr/cli_winreg.h" #include "../librpc/gen_ndr/ndr_security.h" +#include "secrets.h" #define TOP_LEVEL_PRINT_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print" #define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers" diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index faa2bfff3ef..0917badbdfe 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -24,6 +24,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../librpc/gen_ndr/cli_netlogon.h" #include "rpc_client/cli_netlogon.h" +#include "secrets.h" static WERROR cmd_netlogon_logon_ctrl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 7b788e8d1a1..dba5204326d 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -26,6 +26,7 @@ #include "librpc/gen_ndr/messaging.h" #include "registry.h" #include "libcli/auth/schannel.h" +#include "secrets.h" static_decl_rpc; diff --git a/source3/utils/net.c b/source3/utils/net.c index c677e3a9ba5..1c342858ee3 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -42,6 +42,7 @@ #include "includes.h" #include "utils/net.h" +#include "secrets.h" extern bool AllowDebugChange; diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 71181990b58..ced5674b100 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -32,6 +32,7 @@ #include "librpc/gen_ndr/libnet_join.h" #include "libnet/libnet_join.h" #include "smb_krb5.h" +#include "secrets.h" #ifdef HAVE_ADS diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 1400e31174c..702c6f9eeeb 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -20,6 +20,7 @@ #define FOO(x) (x) #include "includes.h" #include "utils/net.h" +#include "secrets.h" #define ALLOC_CHECK(mem) do { \ if (!mem) { \ diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index d27545d1c63..00ebe13af5f 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -33,6 +33,7 @@ #include "../librpc/gen_ndr/cli_spoolss.h" #include "../librpc/gen_ndr/cli_initshutdown.h" #include "../librpc/gen_ndr/cli_winreg.h" +#include "secrets.h" static int net_mode_share; static bool sync_files(struct copy_clistate *cp_clistate, const char *mask); diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 4659fe52ec8..c17dfa4c326 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -27,6 +27,7 @@ #include "rpc_client/init_samr.h" #include "../librpc/gen_ndr/ndr_netlogon.h" #include "rpc_client/cli_netlogon.h" +#include "secrets.h" /* Macro for checking RPC error codes to make things more readable */ diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index b6ab03d9132..11ef42cd61c 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -24,6 +24,7 @@ #include "../librpc/gen_ndr/cli_lsa.h" #include "rpc_client/cli_lsarpc.h" #include "../librpc/gen_ndr/cli_dssetup.h" +#include "secrets.h" NTSTATUS net_rpc_lookup_name(struct net_context *c, TALLOC_CTX *mem_ctx, struct cli_state *cli, diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 7957dd8a62a..08ccab21261 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -17,6 +17,7 @@ * this program; if not, see . */ #include "includes.h" +#include "secrets.h" extern bool AllowDebugChange; diff --git a/source3/utils/smbta-util.c b/source3/utils/smbta-util.c index 75669c1159a..e4f81445bce 100644 --- a/source3/utils/smbta-util.c +++ b/source3/utils/smbta-util.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ #include "includes.h" - +#include "secrets.h" static void delete_key(void); diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index def41c6c116..37095c12c87 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -31,6 +31,7 @@ #include "ads.h" #include "libads/ldap_schema.h" #include "nss_info.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP diff --git a/source3/winbindd/idmap_adex/idmap_adex.c b/source3/winbindd/idmap_adex/idmap_adex.c index c815e75a291..ea6d688b72f 100644 --- a/source3/winbindd/idmap_adex/idmap_adex.c +++ b/source3/winbindd/idmap_adex/idmap_adex.c @@ -22,6 +22,7 @@ #include "ads.h" #include "idmap_adex.h" #include "nss_info.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP diff --git a/source3/winbindd/idmap_adex/likewise_cell.c b/source3/winbindd/idmap_adex/likewise_cell.c index 24343eb5546..3e529b427a4 100644 --- a/source3/winbindd/idmap_adex/likewise_cell.c +++ b/source3/winbindd/idmap_adex/likewise_cell.c @@ -21,6 +21,7 @@ #include "includes.h" #include "ads.h" #include "idmap_adex.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index e7928bf3f78..71a7d0e3a2b 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -24,6 +24,7 @@ #include "includes.h" #include "winbindd.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_IDMAP diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 9efa8ed9845..05114b2432a 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -28,6 +28,7 @@ #include "librpc/gen_ndr/messaging.h" #include "../librpc/gen_ndr/srv_lsa.h" #include "../librpc/gen_ndr/srv_samr.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index 949e206d042..1d9f1f01741 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -26,6 +26,7 @@ #include "../librpc/gen_ndr/cli_netlogon.h" #include "../libds/common/flags.h" #include "ads.h" +#include "secrets.h" #ifdef HAVE_ADS diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index c10d82cb490..0ca8513f811 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -71,6 +71,7 @@ #include "librpc/gen_ndr/messaging.h" #include "libsmb/clidgram.h" #include "ads.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index 47348b997f5..c8bd0667470 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -31,6 +31,7 @@ #include "winbindd.h" #include "../../nsswitch/libwbclient/wbc_async.h" #include "librpc/gen_ndr/messaging.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 55874e057f1..bd1e1b5bee9 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -22,6 +22,7 @@ #include "includes.h" #include "winbindd.h" +#include "secrets.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND