summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/secrets.h1
-rw-r--r--source3/passdb/machine_account_secrets.c49
2 files changed, 0 insertions, 50 deletions
diff --git a/source3/include/secrets.h b/source3/include/secrets.h
index 0363b6b375f..24ae5bd0664 100644
--- a/source3/include/secrets.h
+++ b/source3/include/secrets.h
@@ -140,7 +140,6 @@ NTSTATUS secrets_finish_password_change(const char *change_server,
const struct secrets_domain_info1 *info);
bool secrets_delete_machine_password_ex(const char *domain, const char *realm);
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);
time_t secrets_fetch_pass_last_set_time(const char *domain);
char *secrets_fetch_machine_password(const char *domain,
diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c
index b88fbe937bc..3d1cb5b5ee3 100644
--- a/source3/passdb/machine_account_secrets.c
+++ b/source3/passdb/machine_account_secrets.c
@@ -450,55 +450,6 @@ bool secrets_delete_domain_sid(const char *domain)
}
/************************************************************************
- Routine to store the previous machine password (by storing the current password
- as the old)
-************************************************************************/
-
-static bool secrets_store_prev_machine_password(const char *domain)
-{
- char *oldpass;
- bool ret;
-
- oldpass = (char *)secrets_fetch(machine_password_keystr(domain), NULL);
- if (oldpass == NULL) {
- return true;
- }
- ret = secrets_store(machine_prev_password_keystr(domain), oldpass, strlen(oldpass)+1);
- SAFE_FREE(oldpass);
- return ret;
-}
-
-/************************************************************************
- Routine to set the plaintext machine account password for a realm
- the password is assumed to be a null terminated ascii string.
- Before storing
-************************************************************************/
-
-bool secrets_store_machine_password(const char *pass, const char *domain,
- enum netr_SchannelType sec_channel)
-{
- bool ret;
- uint32_t last_change_time;
- uint32_t sec_channel_type;
-
- if (!secrets_store_prev_machine_password(domain)) {
- return false;
- }
-
- ret = secrets_store(machine_password_keystr(domain), pass, strlen(pass)+1);
- if (!ret)
- return ret;
-
- SIVAL(&last_change_time, 0, time(NULL));
- ret = secrets_store(machine_last_change_time_keystr(domain), &last_change_time, sizeof(last_change_time));
-
- SIVAL(&sec_channel_type, 0, sec_channel);
- ret = secrets_store(machine_sec_channel_type_keystr(domain), &sec_channel_type, sizeof(sec_channel_type));
-
- return ret;
-}
-
-/************************************************************************
Set the machine trust account password, the old pw and last change
time, domain SID and salting principals based on values passed in
(added to supprt the secrets_tdb_sync module on secrets.ldb)