From ebe0e64ba9815b238cccf7d24821bc473d245707 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 13 Oct 2009 10:15:34 +0200 Subject: s3: use enum netr_SchannelType all over the place. Guenther --- source3/passdb/passdb.c | 6 ++++-- source3/passdb/secrets.c | 11 ++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 0678181669..b2c3b948f1 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -2257,7 +2257,8 @@ bool is_dc_trusted_domain_situation(const char *domain_name) *******************************************************************/ bool get_trust_pw_clear(const char *domain, char **ret_pwd, - const char **account_name, uint32 *channel) + const char **account_name, + enum netr_SchannelType *channel) { char *pwd; time_t last_set_time; @@ -2329,7 +2330,8 @@ bool get_trust_pw_clear(const char *domain, char **ret_pwd, *******************************************************************/ bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16], - const char **account_name, uint32 *channel) + const char **account_name, + enum netr_SchannelType *channel) { char *pwd = NULL; time_t last_set_time; diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 36f401bc92..8b87c2cd4c 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -392,7 +392,7 @@ void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain) Routine to get the default secure channel type for trust accounts ************************************************************************/ -uint32 get_default_sec_channel(void) +enum netr_SchannelType get_default_sec_channel(void) { if (lp_server_role() == ROLE_DOMAIN_BDC || lp_server_role() == ROLE_DOMAIN_PDC) { @@ -412,7 +412,7 @@ uint32 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, - uint32 *channel) + enum netr_SchannelType *channel) { struct machine_acct_pass *pass; size_t size = 0; @@ -458,7 +458,7 @@ bool secrets_fetch_trust_account_password_legacy(const char *domain, bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16], time_t *pass_last_set_time, - uint32 *channel) + enum netr_SchannelType *channel) { char *plaintext; @@ -793,7 +793,8 @@ bool secrets_delete_domain_sid(const char *domain) the password is assumed to be a null terminated ascii string ************************************************************************/ -bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel) +bool secrets_store_machine_password(const char *pass, const char *domain, + enum netr_SchannelType sec_channel) { bool ret; uint32 last_change_time; @@ -819,7 +820,7 @@ bool secrets_store_machine_password(const char *pass, const char *domain, uint32 char *secrets_fetch_machine_password(const char *domain, time_t *pass_last_set_time, - uint32 *channel) + enum netr_SchannelType *channel) { char *ret; ret = (char *)secrets_fetch(machine_password_keystr(domain), NULL); -- cgit From 1341d4509c715ab115425698c82e05ad4fc9f5f8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 4 Oct 2009 16:52:08 +0200 Subject: s3: Fix some nonempty blank lines --- source3/passdb/util_unixsids.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/util_unixsids.c b/source3/passdb/util_unixsids.c index ad4e70256d..ad51253058 100644 --- a/source3/passdb/util_unixsids.c +++ b/source3/passdb/util_unixsids.c @@ -2,17 +2,17 @@ Unix SMB/CIFS implementation. Translate unix-defined names to SIDs and vice versa Copyright (C) Volker Lendecke 2005 - + 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 . */ @@ -31,7 +31,7 @@ bool sid_check_is_in_unix_users(const DOM_SID *sid) sid_copy(&dom_sid, sid); sid_split_rid(&dom_sid, &rid); - + return sid_check_is_unix_users(&dom_sid); } @@ -80,7 +80,7 @@ bool sid_check_is_in_unix_groups(const DOM_SID *sid) sid_copy(&dom_sid, sid); sid_split_rid(&dom_sid, &rid); - + return sid_check_is_unix_groups(&dom_sid); } -- cgit From 5cc895983d9d9e9a0acfaa6a3dfa97f14d9d94c6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 15 Oct 2009 16:55:40 -0700 Subject: Fix valgrind memory leak in bug #6814 - Fixes for problems reported by valgrind Jeremy. --- source3/passdb/secrets.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/passdb') diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 8b87c2cd4c..29e0662396 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -891,6 +891,7 @@ bool fetch_ldap_pw(char **dn, char** pw) if (asprintf(&key, "%s/%s", SECRETS_LDAP_BIND_PW, *dn) < 0) { SAFE_FREE(*dn); DEBUG(0, ("fetch_ldap_pw: asprintf failed!\n")); + return false; } *pw=(char *)secrets_fetch(key, &size); -- cgit