Blame SOURCES/0001-enroll-add-is_service-member.patch

541bac
From 4e4dbf8d2b437808863f8be85e7f30865d88c7fc Mon Sep 17 00:00:00 2001
541bac
From: Sumit Bose <sbose@redhat.com>
541bac
Date: Fri, 23 Oct 2020 16:46:43 +0200
541bac
Subject: [PATCH 1/7] enroll: add is_service member
541bac
541bac
Add helpers to indicate a managed service account.
541bac
541bac
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1854112
541bac
---
541bac
 library/adenroll.c | 17 +++++++++++++++++
541bac
 library/adenroll.h |  4 ++++
541bac
 2 files changed, 21 insertions(+)
541bac
541bac
diff --git a/library/adenroll.c b/library/adenroll.c
541bac
index 98e9786..5ae1f7b 100644
541bac
--- a/library/adenroll.c
541bac
+++ b/library/adenroll.c
541bac
@@ -103,6 +103,8 @@ static char *default_ad_ldap_attrs[] =  {
541bac
 struct _adcli_enroll {
541bac
 	int refs;
541bac
 	adcli_conn *conn;
541bac
+	bool is_service;
541bac
+	bool is_service_explicit;
541bac
 
541bac
 	char *host_fqdn;
541bac
 	int host_fqdn_explicit;
541bac
@@ -2942,6 +2944,21 @@ adcli_enroll_get_desciption (adcli_enroll *enroll)
541bac
 	return enroll->description;
541bac
 }
541bac
 
541bac
+void
541bac
+adcli_enroll_set_is_service (adcli_enroll *enroll, bool value)
541bac
+{
541bac
+	return_if_fail (enroll != NULL);
541bac
+
541bac
+	enroll->is_service = value;
541bac
+	enroll->is_service_explicit = true;
541bac
+}
541bac
+
541bac
+bool
541bac
+adcli_enroll_get_is_service (adcli_enroll *enroll)
541bac
+{
541bac
+	return enroll->is_service;
541bac
+}
541bac
+
541bac
 const char **
541bac
 adcli_enroll_get_service_principals_to_add (adcli_enroll *enroll)
541bac
 {
541bac
diff --git a/library/adenroll.h b/library/adenroll.h
541bac
index 0606169..7765ed4 100644
541bac
--- a/library/adenroll.h
541bac
+++ b/library/adenroll.h
541bac
@@ -130,6 +130,10 @@ const char *       adcli_enroll_get_desciption          (adcli_enroll *enroll);
541bac
 void               adcli_enroll_set_description         (adcli_enroll *enroll,
541bac
                                                          const char *value);
541bac
 
541bac
+bool               adcli_enroll_get_is_service          (adcli_enroll *enroll);
541bac
+void               adcli_enroll_set_is_service          (adcli_enroll *enroll,
541bac
+                                                         bool value);
541bac
+
541bac
 krb5_kvno          adcli_enroll_get_kvno                (adcli_enroll *enroll);
541bac
 
541bac
 void               adcli_enroll_set_kvno                (adcli_enroll *enroll,
541bac
-- 
541bac
2.28.0
541bac