]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/slurp.h
Rework unprotected simple bind checks
[openldap] / servers / slurpd / slurp.h
index e0fe83fb64d44102806e7caf4b82d9c755c9e96d..0cb25e3736ddf4701a499defbd2a655e7edfed3a 100644 (file)
@@ -1,4 +1,8 @@
 /* $OpenLDAP$ */
+/*
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 /*
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
@@ -16,7 +20,7 @@
 #ifndef _SLURPD_H_
 #define _SLURPD_H_
 
-#ifndef LDAP_SYSLOG
+#if !defined(HAVE_WINSOCK) && !defined(LDAP_SYSLOG)
 #define LDAP_SYSLOG 1
 #endif
 
 #include "ldap_defaults.h"
 #include "ldif.h"
 
+#ifdef HAVE_WINSOCK
+#define ftruncate(a,b) _chsize(a,b)
+#define truncate(a,b) _lclose( _lcreat(a, 0))
+#define S_IRGRP 0
+#define S_IWGRP 0
+#endif
 
 /* Default directory for slurpd's private copy of replication logs */
 #define        DEFAULT_SLURPD_REPLICA_DIR      LDAP_RUNDIR LDAP_DIRSEP "openldap-slurp"
 
 /* Config file keywords */
 #define        HOSTSTR                 "host"
+#define        ATTRSTR                 "attr"
+#define        SUFFIXSTR               "suffix"
 #define        BINDDNSTR               "binddn"
 #define        BINDMETHSTR             "bindmethod"
 #define        KERBEROSSTR             "kerberos"
@@ -250,7 +262,7 @@ struct re {
     ldap_pvt_thread_mutex_t
                re_mutex;               /* mutex for this Re */
     int                re_refcnt;              /* ref count, 0 = done */
-    char       *re_timestamp;          /* timestamp of this re */
+    time_t     re_timestamp;           /* timestamp of this re */
     int                re_seq;                 /* sequence number */
     Rh         *re_replicas;           /* array of replica info */
     char       *re_dn;                 /* dn of entry being modified */
@@ -320,7 +332,7 @@ struct rq {
 typedef struct stel {
     char       *hostname;              /* host name of replica */
     int                port;                   /* port number of replica */
-    char       last[ 64 ];             /* timestamp of last successful repl */
+    time_t     last;                   /* timestamp of last successful repl */
     int                seq;                    /* Sequence number of last repl */
 } Stel;