summaryrefslogtreecommitdiff
path: root/source4/lib/credentials.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/credentials.c')
-rw-r--r--source4/lib/credentials.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/lib/credentials.c b/source4/lib/credentials.c
index aaaa2cf05d..58a1b8c0e3 100644
--- a/source4/lib/credentials.c
+++ b/source4/lib/credentials.c
@@ -504,6 +504,7 @@ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred)
"realm",
"secureChannelType",
"ntPwdHash",
+ "msDS-KeyVersionNumber",
NULL
};
@@ -594,6 +595,8 @@ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred)
cli_credentials_set_password(cred, password, CRED_SPECIFIED);
}
+ cli_credentials_set_kvno(cred, ldb_msg_find_int(msgs[0], "msDS-KeyVersionNumber", 0));
+
talloc_free(mem_ctx);
return NT_STATUS_OK;
@@ -651,6 +654,25 @@ enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_creden
return cred->secure_channel_type;
}
+/**
+ * Set Kerberos KVNO
+ */
+
+void cli_credentials_set_kvno(struct cli_credentials *cred,
+ int kvno)
+{
+ cred->kvno = kvno;
+}
+
+/**
+ * Return Kerberos KVNO
+ */
+
+int cli_credentials_get_kvno(struct cli_credentials *cred)
+{
+ return cred->kvno;
+}
+
/**
* Fill in a credentials structure as the anonymous user
*/