}
/************************************************************************
- Routine to delete the plaintext machine account password, old password,
- sec channel type and last change time from secrets database
+ Routine to delete all information related to the domain joined machine.
************************************************************************/
bool secrets_delete_machine_password_ex(const char *domain)
const char *tmpkey = NULL;
bool ok;
+ tmpkey = domain_guid_keystr(domain);
+ ok = secrets_delete(tmpkey);
+ if (!ok) {
+ return false;
+ }
+
tmpkey = machine_prev_password_keystr(domain);
ok = secrets_delete(tmpkey);
if (!ok) {
return false;
}
+ tmpkey = domain_sid_keystr(domain);
+ ok = secrets_delete_entry(tmpkey);
+ if (!ok) {
+ return false;
+ }
+
return true;
}
if (delete_join) {
secrets_delete_machine_password_ex(domain);
- secrets_delete_domain_sid(domain);
TALLOC_FREE(frame);
return true;
}