summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-23 17:42:09 +0200
committerStefan Metzmacher <metze@samba.org>2017-07-13 10:51:20 +0200
commit6c728cc38f19265d67637d4bf517c0bb4446d9f6 (patch)
tree64a008f3bdc9a8a6914fafc4be1b0deaec3f9ddc
parentad1e456f306a29c47526d987308aec34daec1bee (diff)
downloadsamba-6c728cc38f19265d67637d4bf517c0bb4446d9f6.tar.gz
s3:secrets: remove unused secrets_store_[prev_]machine_password()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit f513c20ee04fe896900c99ae804753d445414d7d)
-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)