#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
#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
/* 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
#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"
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.
*/
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);
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
*/
#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 */
#include "libnet/libnet_join.h"
#include "libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/cli_wkssvc.h"
+#include "secrets.h"
/****************************************************************
****************************************************************/
#include "includes.h"
#include "lib/netapi/netapi.h"
#include "lib/netapi/netapi_private.h"
+#include "secrets.h"
extern bool AllowDebugChange;
#include "includes.h"
#include "smbldap.h"
+#include "secrets.h"
/* Try not to hit the up or down server forever */
#include "includes.h"
+#include "secrets.h"
static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
const char *str);
*/
#include "includes.h"
+#include "secrets.h"
extern char *global_clobber_region_function;
extern unsigned int global_clobber_region_line;
#include "smb_krb5.h"
#include "../librpc/gen_ndr/ndr_misc.h"
#include "libads/kerberos_proto.h"
+#include "secrets.h"
#ifdef HAVE_KRB5
#include "includes.h"
#include "smb_krb5.h"
#include "ads.h"
+#include "secrets.h"
#ifdef HAVE_KRB5
#include "includes.h"
#include "smb_krb5.h"
#include "libads/kerberos_proto.h"
+#include "secrets.h"
#ifdef HAVE_KRB5
#include "includes.h"
#include "ads.h"
+#include "secrets.h"
#ifdef HAVE_KRB5
#include "lib/smbconf/smbconf.h"
#include "lib/smbconf/smbconf_reg.h"
#include "../libds/common/flags.h"
-
+#include "secrets.h"
/****************************************************************
****************************************************************/
#include "includes.h"
#include "libsmbclient.h"
#include "libsmb_internal.h"
+#include "secrets.h"
/*
#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.
#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};
#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;
#include "general.h"
#include "support.h"
+#include "secrets.h"
#include "../libcli/auth/libcli_auth.h"
#if defined(HAVE_SECURITY_PAM_EXT_H)
#include "includes.h"
#include "../librpc/gen_ndr/ndr_security.h"
+#include "secrets.h"
/*****************************************************************
Dissect a user-provided name into domain, name, sid and type.
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
*/
#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
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
#include "tldap.h"
#include "tldap_util.h"
#include "../libds/common/flags.h"
+#include "secrets.h"
struct pdb_ads_state {
struct sockaddr_un socket_address;
*/
#include "includes.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
#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
#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 */
#include "rpc_server/srv_spoolss_util.h"
#include "nt_printing.h"
#include "ads.h"
+#include "secrets.h"
#ifdef HAVE_ADS
/*****************************************************************
#include "includes.h"
#include "../librpc/gen_ndr/srv_dssetup.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
#include "includes.h"
#include "../librpc/gen_ndr/srv_lsa.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
#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
#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) \
#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"
#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,
#include "librpc/gen_ndr/messaging.h"
#include "registry.h"
#include "libcli/auth/schannel.h"
+#include "secrets.h"
static_decl_rpc;
#include "includes.h"
#include "utils/net.h"
+#include "secrets.h"
extern bool AllowDebugChange;
#include "librpc/gen_ndr/libnet_join.h"
#include "libnet/libnet_join.h"
#include "smb_krb5.h"
+#include "secrets.h"
#ifdef HAVE_ADS
#define FOO(x) (x)
#include "includes.h"
#include "utils/net.h"
+#include "secrets.h"
#define ALLOC_CHECK(mem) do { \
if (!mem) { \
#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);
#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 */
#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,
* this program; if not, see <http://www.gnu.org/licenses/>. */
#include "includes.h"
+#include "secrets.h"
extern bool AllowDebugChange;
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "includes.h"
-
+#include "secrets.h"
static void delete_key(void);
#include "ads.h"
#include "libads/ldap_schema.h"
#include "nss_info.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
#include "ads.h"
#include "idmap_adex.h"
#include "nss_info.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
#include "includes.h"
#include "ads.h"
#include "idmap_adex.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
#include "includes.h"
#include "winbindd.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
#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
#include "../librpc/gen_ndr/cli_netlogon.h"
#include "../libds/common/flags.h"
#include "ads.h"
+#include "secrets.h"
#ifdef HAVE_ADS
#include "librpc/gen_ndr/messaging.h"
#include "libsmb/clidgram.h"
#include "ads.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
#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
#include "includes.h"
#include "winbindd.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND