ldap/servers/plugins/rootdn_access/rootdn_access.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 940ac98613957b69c3b32e47ed50cd25d5a80542
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Sep 21 15:33:45 2012 -0400
Ticket 747 - Root DN Access Control - days allowed not working correctly
Bug Description: If you set more than one day in the rootdn-days-allowed config
attribute the plugin can reject all rootDN binds.
Fix Description: Correct the order of the char strings in strstr().
https://fedorahosted.org/389/ticket/474
Reviewed by: richm(Thanks!)
diff --git a/ldap/servers/plugins/rootdn_access/rootdn_access.c
b/ldap/servers/plugins/rootdn_access/rootdn_access.c
index 19e578c..bae2703 100644
--- a/ldap/servers/plugins/rootdn_access/rootdn_access.c
+++ b/ldap/servers/plugins/rootdn_access/rootdn_access.c
@@ -440,8 +440,9 @@ rootdn_check_access(Slapi_PBlock *pb){
memmove(day, timestr, 3); // we only want the day
today = strToLower(today);
- if(!strstr(today, daysAllowed)){
- slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: bind not allowed for today\n");
+ if(!strstr(daysAllowed, today)){
+ slapi_log_error(SLAPI_LOG_PLUGIN, ROOTDN_PLUGIN_SUBSYSTEM,
"rootdn_check_access: bind not allowed for today(%s), "
+ "only allowed on days: %s\n", today, daysAllowed);
return -1;
}
}