Browse Source

Ticket #389 - ADD operations not in audit log

https://fedorahosted.org/389/ticket/389
Resolves: Ticket #389
Bug Description: ADD operations not in audit log
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Re-add code that was previously deleted.  Also, log the
unnormalized, raw DN for operations.
Platforms tested: RHEL6 x86_64, Fedora 17
Flag Day: no
Doc impact: no
(cherry picked from commit ff11cccbba3f60761ca949a2feacc9d0b35451e7)
Rich Megginson 13 years ago
parent
commit
97ef3ddcb0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ldap/servers/slapd/auditlog.c

+ 5 - 1
ldap/servers/slapd/auditlog.c

@@ -83,6 +83,9 @@ write_audit_log_entry( Slapi_PBlock *pb )
     case SLAPI_OPERATION_MODIFY:
         slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &change );
         break;
+    case SLAPI_OPERATION_ADD:
+    	slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &change );
+    	break;
     case SLAPI_OPERATION_DELETE:
         {
         char * deleterDN = NULL;
@@ -100,7 +103,8 @@ write_audit_log_entry( Slapi_PBlock *pb )
         return; /* Unsupported operation type. */
     }
     curtime = current_time();
-    dn = slapi_sdn_get_dn(sdn);
+    /* log the raw, unnormalized DN */
+    dn = slapi_sdn_get_udn(sdn);
     write_audit_file( operation_get_type(op), dn, change, flag, curtime );
 }