dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0014-IPA-Add-s2n-request-to-string-function.patch

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