Jelajahi Sumber

Bug 693473 - rhds82 rfe - windows_tot_run to log Sizelimit exceeded instead of LDAP error - -1

https://bugzilla.redhat.com/show_bug.cgi?id=693473
Resolves: bug 693473
Bug Description: rhds82 rfe - windows_tot_run to log Sizelimit exceeded instead of LDAP error - -1
Reviewed by: nkinder (Thanks!)
Branch: master
Fix Description: I could not reproduce the sizelimit error.  However, I did
add error logging.  Now if the search gets some error, the search paramters
and the error code and message will be logged.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 14 tahun lalu
induk
melakukan
47e725dff7
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      ldap/servers/plugins/replication/windows_connection.c

+ 8 - 0
ldap/servers/plugins/replication/windows_connection.c

@@ -658,6 +658,14 @@ windows_search_entry_ext(Repl_Connection *conn, char* searchbase, char *filter,
 			serverctrls_copy , NULL /* client controls */,
 			&conn->timeout, 0 /* sizelimit */, &res);
 
+		if ((LDAP_SUCCESS != ldap_rc) && !IS_DISCONNECT_ERROR(ldap_rc)) {
+			slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+							"Could not retrieve entry from Windows using search "
+							"base [%s] scope [%d] filter [%s]: error %d:%s\n",
+							searchbase_copy, scope, filter_copy, ldap_rc,
+							ldap_err2string(ldap_rc));
+		}
+
 		slapi_ch_free_string(&searchbase_copy);
 		slapi_ch_free_string(&filter_copy);
 		slapi_ch_array_free(attrs);