소스 검색

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!)
Mark Reynolds 13 년 전
부모
커밋
940ac98613
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      ldap/servers/plugins/rootdn_access/rootdn_access.c

+ 3 - 2
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;
         }
     }