Blob Blame History Raw
From 038af878713155a87b2e3a25f18b0dd4cf74bd39 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Mon, 25 Jul 2016 11:58:21 +0200
Subject: [PATCH] delete: use keytab data to determine realm and NetBIOS name

---
 tools/computer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/computer.c b/tools/computer.c
index 7ad7bf6..d8a58c9 100644
--- a/tools/computer.c
+++ b/tools/computer.c
@@ -732,6 +732,12 @@ adcli_tool_computer_delete (adcli_conn *conn,
 
 	adcli_conn_set_allowed_login_types (conn, ADCLI_LOGIN_USER_ACCOUNT);
 
+	res = adcli_enroll_load (enroll);
+	if (res != ADCLI_SUCCESS) {
+		errx (-res, "couldn't lookup domain info from keytab: %s",
+		      adcli_get_last_error ());
+	}
+
 	res = adcli_conn_connect (conn);
 	if (res != ADCLI_SUCCESS) {
 		errx (-res, "couldn't connect to %s domain: %s",
-- 
2.7.4