]> git.sur5r.net Git - openldap/commitdiff
ITS#5441
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 14 Apr 2008 23:18:48 +0000 (23:18 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 14 Apr 2008 23:18:48 +0000 (23:18 +0000)
CHANGES
servers/slapd/overlays/auditlog.c

diff --git a/CHANGES b/CHANGES
index eaac8bd102a2e63650a6fe31ea7901f92ef35657..e3db3f7ed12d0d36dd9d5c585fc9be88651285ef 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -18,6 +18,7 @@ OpenLDAP 2.4.9 Engineering
        Fixed slapd syncrepl refreshAndPersist (ITS#5454)
        Fixed slapd syncrepl modrdn processing (ITS#5397)
        Fixed slapd-ldap connection handler (ITS#5404)
+       Fixed slapo-auditlog unnecessary syscall (ITS#5441)
        Fixed slapo-refint dnSubtreeMatch (ITS#5427)
        Fixed slapo-refint global referential integrity (ITS#5428)
        Fixed slapo-syncprov psearch on closed connection (ITS#5401)
index 55aabd40af8909c858b6c49349154c1e946a0d83..82f065515b209078037bb52562227c5b44d1b3af 100644 (file)
@@ -74,7 +74,7 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
        Modifications *m;
        struct berval *b, *who = NULL;
        char *what, *suffix;
-       long stamp = slap_get_time();
+       time_t stamp;
        int i;
 
        if ( rs->sr_err != LDAP_SUCCESS ) return SLAP_CB_CONTINUE;
@@ -125,8 +125,9 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
                return SLAP_CB_CONTINUE;
        }
 
+       stamp = slap_get_time();
        fprintf(f, "# %s %ld %s%s%s\n",
-               what, stamp, suffix, who ? " " : "", who ? who->bv_val : "");
+               what, (long)stamp, suffix, who ? " " : "", who ? who->bv_val : "");
 
        if ( !BER_BVISEMPTY( &op->o_conn->c_dn ) &&
                (!who || !dn_match( who, &op->o_conn->c_dn )))
@@ -173,7 +174,7 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
                break;
        }
 
-       fprintf(f, "# end %s %ld\n\n", what, stamp);
+       fprintf(f, "# end %s %ld\n\n", what, (long)stamp);
 
        fclose(f);
        ldap_pvt_thread_mutex_unlock(&ad->ad_mutex);