summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c6
-rw-r--r--source3/passdb/secrets.c12
-rw-r--r--source3/passdb/util_unixsids.c10
3 files changed, 16 insertions, 12 deletions
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..29e0662396 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);
@@ -890,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);
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 <http://www.gnu.org/licenses/>.
*/
@@ -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);
}