X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Foverlays%2Fauditlog.c;h=82f065515b209078037bb52562227c5b44d1b3af;hb=6041828a517e66b9e6b99f6f6a4af3e941bfa647;hp=8879ee39f409df138061db0efde52dab2e503513;hpb=3a9310431e4e90005c1d7573c2b8f492cbf0cd0d;p=openldap
diff --git a/servers/slapd/overlays/auditlog.c b/servers/slapd/overlays/auditlog.c
index 8879ee39f4..82f065515b 100644
--- a/servers/slapd/overlays/auditlog.c
+++ b/servers/slapd/overlays/auditlog.c
@@ -2,7 +2,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software .
*
- * Copyright 2005-2007 The OpenLDAP Foundation.
+ * Copyright 2005-2008 The OpenLDAP Foundation.
* Portions copyright 2004-2005 Symas Corporation.
* All rights reserved.
*
@@ -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);
@@ -224,32 +225,6 @@ auditlog_db_destroy(
return 0;
}
-static int
-auditlog_config(
- BackendDB *be,
- const char *fname,
- int lineno,
- int argc,
- char **argv
-)
-{
- slap_overinst *on = (slap_overinst *) be->bd_info;
- auditlog_data *ad = on->on_bi.bi_private;
-
- /* history log file */
- if ( strcasecmp( argv[0], "auditlog" ) == 0 ) {
- if ( argc < 2 ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: missing filename in \"auditlog \" line\n",
- fname, lineno, 0 );
- return( 1 );
- }
- ad->ad_logfile = ch_strdup( argv[1] );
- return 0;
- }
- return SLAP_CONF_UNKNOWN;
-}
-
int auditlog_initialize() {
int rc;