File 0024-Increment-kvno-after-password-change-with-user-creds.patch of Package adcli.22052

From dd288de866d25058f06eb45084e7e80dadebae14 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Fri, 15 Mar 2019 14:31:12 +0100
Subject: [PATCH 24/25] Increment kvno after password change with user creds

Originally only the host credential part was fixed in the context of
https://bugs.freedesktop.org/show_bug.cgi?id=91185. This patch adds the
fix to the case when user credentials are used.

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1642546
---
 library/adenroll.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/adenroll.c b/library/adenroll.c
index 53bd440..6a17d92 100644
--- a/library/adenroll.c
+++ b/library/adenroll.c
@@ -1052,6 +1052,10 @@ set_password_with_user_creds (adcli_enroll *enroll)
 #endif
 	} else {
 		_adcli_info ("Set computer password");
+		if (enroll->kvno > 0) {
+			enroll->kvno++;
+			_adcli_info ("kvno incremented to %d", enroll->kvno);
+		}
 		res = ADCLI_SUCCESS;
 	}
 
-- 
2.16.4

openSUSE Build Service is sponsored by