sssd/0016-IPA-Add-s2n-request-to-string-function.patch
Lukas Slebodnik 387014f928 Backport upstream patches for 1.15.3 pre-release
required for building freeipa-4.5.x in rawhide
2017-04-04 16:22:51 +02:00

45 lines
1.3 KiB
Diff

From a04bef313508c423ed06cc54805a3b8106ab90cd Mon Sep 17 00:00:00 2001
From: Justin Stephenson <jstephen@redhat.com>
Date: Mon, 20 Mar 2017 11:51:05 -0400
Subject: [PATCH 16/97] IPA: Add s2n request to string function
Add a function to convert request_types to string allowing the
ability to print request type information for ipa_s2n functions during
IPA client operations.
Reviewed-by: Sumit Bose <sbose@redhat.com>
---
src/providers/ipa/ipa_s2n_exop.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 07bbb2b4d252c8ca9ada4d890c36c903c9f75773..4fe20689fe4c0f2bb5217691dd05b37d2a1cc820 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -979,6 +979,22 @@ done:
return ret;
}
+static const char *ipa_s2n_reqtype2str(enum request_types request_type)
+{
+ switch (request_type) {
+ case REQ_SIMPLE:
+ return "REQ_SIMPLE";
+ case REQ_FULL:
+ return "REQ_FULL";
+ case REQ_FULL_WITH_MEMBERS:
+ return "REQ_FULL_WITH_MEMBERS";
+ default:
+ break;
+ }
+
+ return "Unknown request type";
+}
+
struct ipa_s2n_get_list_state {
struct tevent_context *ev;
struct ipa_id_ctx *ipa_ctx;
--
2.12.2