https://fedorahosted.org/freeipa/attachment/ticket/148/admiyo-freeipa-0011-const-correctness.patch

made the data type for server consistent and correct across its usage.



>From 30d494247a84b96f78183225c6fdd67be0d2827d Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Thu, 19 Aug 2010 08:01:09 -0400
Subject: [PATCH] const correctness
 made the data type for server consistant and correct across its usage

---
 ipa-client/ipa-join.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipa-client/ipa-join.c b/ipa-client/ipa-join.c
index 217ebce..d18461f 100644
--- a/ipa-client/ipa-join.c
+++ b/ipa-client/ipa-join.c
@@ -265,7 +265,7 @@ done:
 }
 
 static int
-get_subject(const char *ipaserver, char *ldap_base, char **subject)
+get_subject(const char *ipaserver, char *ldap_base, const char **subject)
 {
     LDAP *ld = NULL;
     char *attrs[] = {"ipaCertificateSubjectBase", NULL};
@@ -358,7 +358,7 @@ join_ldap(const char *ipaserver, const char *hostname, const char ** binddn, con
         goto done;
     }
 
-    if (get_subject(ipaserver, ldap_base, &subject) != 0) {
+    if (get_subject(ipaserver, ldap_base, subject) != 0) {
         fprintf(stderr, "Unable to determine certificate subject of %s\n", ipaserver);
         /* Not a critical failure */
     }
@@ -441,7 +441,7 @@ ldap_done:
     free(filter);
     free(search_base);
     free(ldap_base);
-    free(subject);
+    free((void *)*subject);
     if (ld != NULL) {
         ldap_unbind_ext(ld, NULL, NULL);
     }
-- 
1.7.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to