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