summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-23 17:42:09 +0200
committerStefan Metzmacher <metze@samba.org>2017-06-27 16:57:46 +0200
commitf513c20ee04fe896900c99ae804753d445414d7d (patch)
tree2a66f3f7a4d5f234302dcb4789675bbe156dd853 /source3/passdb
parentb874dc90c91dd41c35e99bf7c4fe04220465edca (diff)
downloadsamba-f513c20ee04fe896900c99ae804753d445414d7d.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>
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/machine_account_secrets.c49
1 files changed, 0 insertions, 49 deletions
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)