e3ffab
From c7b939714ed7b39056c776e5b4a721dd192178bd Mon Sep 17 00:00:00 2001
e3ffab
From: Jan Cholasta <jcholast@redhat.com>
e3ffab
Date: Mon, 10 Nov 2014 18:10:59 +0000
e3ffab
Subject: [PATCH] Fix unchecked return values in ipa-winsync
e3ffab
e3ffab
https://fedorahosted.org/freeipa/ticket/4713
e3ffab
e3ffab
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
e3ffab
---
e3ffab
 .../ipa-winsync/ipa-winsync-config.c               | 40 +++++++++++-----------
e3ffab
 1 file changed, 20 insertions(+), 20 deletions(-)
e3ffab
e3ffab
diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c
e3ffab
index 65ceaea685a276db91aab356dab617e260095873..8b62aed41bfe4704d542e37e70e9d128fa33507e 100644
e3ffab
--- a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c
e3ffab
+++ b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c
e3ffab
@@ -905,9 +905,9 @@ ipa_winsync_config_refresh_domain(
e3ffab
 
e3ffab
     if (!iwdc->realm_name) {
e3ffab
         /* error - could not find the IPA config entry with the realm name */
e3ffab
-        LOG_FATAL("Error: could not find the entry containing the realm name for "
e3ffab
-                  "ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
-                  slapi_sdn_get_dn(ds_subtree), realm_filter, realm_attr);
e3ffab
+        LOG_FATAL("Error: could not find the entry containing the realm name "
e3ffab
+                  "[%d] ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
+                  ret, slapi_sdn_get_dn(ds_subtree), realm_filter, realm_attr);
e3ffab
         goto out;
e3ffab
     }
e3ffab
 
e3ffab
@@ -918,9 +918,9 @@ ipa_winsync_config_refresh_domain(
e3ffab
                                            &new_user_objclasses, NULL);
e3ffab
     if (!new_user_objclasses) {
e3ffab
         /* error - could not find the entry containing list of objectclasses */
e3ffab
-        LOG_FATAL("Error: could not find the entry containing the new user objectclass list for "
e3ffab
-                  "ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
-                  slapi_sdn_get_dn(ds_subtree), new_entry_filter, new_user_oc_attr);
e3ffab
+        LOG_FATAL("Error: could not find the entry containing the new user objectclass list "
e3ffab
+                  "[%d] ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
+                  ret, slapi_sdn_get_dn(ds_subtree), new_entry_filter, new_user_oc_attr);
e3ffab
         goto out;
e3ffab
     }
e3ffab
 
e3ffab
@@ -933,9 +933,9 @@ ipa_winsync_config_refresh_domain(
e3ffab
                                            NULL, &iwdc->homedir_prefix);
e3ffab
     if (!iwdc->homedir_prefix) {
e3ffab
         /* error - could not find the home dir prefix */
e3ffab
-        LOG_FATAL("Error: could not find the entry containing the home directory prefix for "
e3ffab
-                  "ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
-                  slapi_sdn_get_dn(ds_subtree), new_entry_filter, homedir_prefix_attr);
e3ffab
+        LOG_FATAL("Error: could not find the entry containing the home directory prefix "
e3ffab
+                  "[%d] ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
+                  ret, slapi_sdn_get_dn(ds_subtree), new_entry_filter, homedir_prefix_attr);
e3ffab
         goto out;
e3ffab
     }
e3ffab
 
e3ffab
@@ -950,8 +950,8 @@ ipa_winsync_config_refresh_domain(
e3ffab
                                                NULL, &iwdc->login_shell);
e3ffab
         if (!iwdc->login_shell) {
e3ffab
             LOG("Warning: could not find the entry containing the login shell "
e3ffab
-                "attribute for ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
-                slapi_sdn_get_dn(ds_subtree), new_entry_filter,
e3ffab
+                "attribute [%d] ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
+                ret, slapi_sdn_get_dn(ds_subtree), new_entry_filter,
e3ffab
                 login_shell_attr);
e3ffab
         }
e3ffab
     }
e3ffab
@@ -969,9 +969,9 @@ ipa_winsync_config_refresh_domain(
e3ffab
                                            NULL, &default_group_name);
e3ffab
     if (!default_group_name) {
e3ffab
         /* error - could not find the default group name */
e3ffab
-        LOG_FATAL("Error: could not find the entry containing the default group name for "
e3ffab
-                  "ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
-                  slapi_sdn_get_dn(ds_subtree), new_entry_filter, default_group_attr);
e3ffab
+        LOG_FATAL("Error: could not find the entry containing the default group name "
e3ffab
+                  "[%d] ds subtree [%s] filter [%s] attr [%s]\n",
e3ffab
+                  ret, slapi_sdn_get_dn(ds_subtree), new_entry_filter, default_group_attr);
e3ffab
         goto out;
e3ffab
     }
e3ffab
 
e3ffab
@@ -1014,9 +1014,9 @@ ipa_winsync_config_refresh_domain(
e3ffab
                                                    NULL, &inactivated_group_dn);
e3ffab
             if (!inactivated_group_dn) {
e3ffab
                 /* error - could not find the inactivated group dn */
e3ffab
-                LOG("Could not find the DN of the inactivated users group ds "
e3ffab
-                    "subtree [%s] filter [%s]. Ignoring\n",
e3ffab
-                    slapi_sdn_get_dn(ds_subtree), inactivated_filter);
e3ffab
+                LOG("Could not find the DN of the inactivated users group "
e3ffab
+                    "[%d] ds subtree [%s] filter [%s]. Ignoring\n",
e3ffab
+                    ret, slapi_sdn_get_dn(ds_subtree), inactivated_filter);
e3ffab
                 goto out;
e3ffab
             }
e3ffab
         }
e3ffab
@@ -1026,9 +1026,9 @@ ipa_winsync_config_refresh_domain(
e3ffab
                                                    NULL, &activated_group_dn);
e3ffab
             if (!activated_group_dn) {
e3ffab
                 /* error - could not find the activated group dn */
e3ffab
-                LOG("Could not find the DN of the activated users group ds "
e3ffab
-                    "subtree [%s] filter [%s]. Ignoring\n",
e3ffab
-                    slapi_sdn_get_dn(ds_subtree), activated_filter);
e3ffab
+                LOG("Could not find the DN of the activated users group "
e3ffab
+                    "[%d] ds subtree [%s] filter [%s]. Ignoring\n",
e3ffab
+                    ret, slapi_sdn_get_dn(ds_subtree), activated_filter);
e3ffab
                 goto out;
e3ffab
             }
e3ffab
         }
e3ffab
-- 
e3ffab
2.1.0
e3ffab