]> git.sur5r.net Git - openldap/blobdiff - include/ldap_pvt.h
New access_allowed()
[openldap] / include / ldap_pvt.h
index 8760591023dd1eec6c01ea110b5e2813af98ef02..50a84b2c6e475218a059f47ef149dcf43ebe79f8 100644 (file)
@@ -91,6 +91,47 @@ ldap_pvt_ctime LDAP_P((
        const time_t *tp,
        char *buf ));
 
+# if defined( HAVE_GMTIME_R )
+#   define USE_GMTIME_R
+#   define ldap_pvt_gmtime(timep, result) gmtime_r((timep), (result))
+# else
+LDAP_F( struct tm * )
+ldap_pvt_gmtime LDAP_P((
+       LDAP_CONST time_t *timep,
+       struct tm *result ));
+#endif
+
+# if defined( HAVE_LOCALTIME_R )
+#   define USE_LOCALTIME_R
+#   define ldap_pvt_localtime(timep, result) localtime_r((timep), (result))
+# else
+LDAP_F( struct tm * )
+ldap_pvt_localtime LDAP_P((
+       LDAP_CONST time_t *timep,
+       struct tm *result ));
+# endif
+
+#if defined( USE_GMTIME_R ) && defined( USE_LOCALTIME_R )
+#   define ldap_pvt_gmtime_lock() (0)
+#   define ldap_pvt_gmtime_unlock() (0)
+#else
+LDAP_F( int )
+ldap_pvt_gmtime_lock LDAP_P(( void ));
+
+LDAP_F( int )
+ldap_pvt_gmtime_unlock LDAP_P(( void ));
+#endif /* USE_GMTIME_R && USE_LOCALTIME_R */
+
+/* Get current time as a structured time */
+struct lutil_tm;
+LDAP_F( void )
+ldap_pvt_gettime LDAP_P(( struct lutil_tm * ));
+
+/* use this macro to allocate buffer for ldap_pvt_csnstr */
+#define LDAP_PVT_CSNSTR_BUFSIZE        64
+LDAP_F( size_t )
+ldap_pvt_csnstr( char *buf, size_t len, unsigned int replica, unsigned int mod );
+
 LDAP_F( char *) ldap_pvt_get_fqdn LDAP_P(( char * ));
 
 struct hostent;        /* avoid pulling in <netdb.h> */
@@ -262,6 +303,8 @@ struct sb_sasl_generic_data {
        Sockbuf_Buf                             sec_buf_in;
        Sockbuf_Buf                             buf_in;
        Sockbuf_Buf                             buf_out;
+       unsigned int                            flags;
+#define LDAP_PVT_SASL_PARTIAL_WRITE    1
 };
  
 #ifndef LDAP_PVT_SASL_LOCAL_SSF
@@ -286,6 +329,11 @@ LDAP_F (int) ldap_open_internal_connection LDAP_P((
 LDAP_F (int) ldap_init_fd LDAP_P((
        ber_socket_t fd, int proto, LDAP_CONST char *url, struct ldap **ldp ));
 
+/* sasl.c */
+LDAP_F (int) ldap_pvt_sasl_generic_install LDAP_P(( Sockbuf *sb,
+       struct sb_sasl_generic_install *install_arg ));
+LDAP_F (void) ldap_pvt_sasl_generic_remove LDAP_P(( Sockbuf *sb ));
+
 /* search.c */
 LDAP_F( int ) ldap_pvt_put_filter LDAP_P((
        BerElement *ber,
@@ -304,6 +352,34 @@ LDAP_F( int )
 ldap_bv2escaped_filter_value_x LDAP_P(( struct berval *in, struct berval *out,
        int inplace, void *ctx ));
 
+LDAP_F (int) ldap_pvt_search LDAP_P((
+       struct ldap *ld,
+       LDAP_CONST char *base,
+       int scope,
+       LDAP_CONST char *filter,
+       char **attrs,
+       int attrsonly,
+       struct ldapcontrol **sctrls,
+       struct ldapcontrol **cctrls,
+       struct timeval *timeout,
+       int sizelimit,
+       int deref,
+       int *msgidp ));
+
+LDAP_F(int) ldap_pvt_search_s LDAP_P((
+       struct ldap *ld,
+       LDAP_CONST char *base,
+       int scope,
+       LDAP_CONST char *filter,
+       char **attrs,
+       int attrsonly,
+       struct ldapcontrol **sctrls,
+       struct ldapcontrol **cctrls,
+       struct timeval *timeout,
+       int sizelimit,
+       int deref,
+       struct ldapmsg **res ));
+
 /* string.c */
 LDAP_F( char * )
 ldap_pvt_str2upper LDAP_P(( char *str ));
@@ -318,7 +394,7 @@ LDAP_F( struct berval * )
 ldap_pvt_str2lowerbv LDAP_P(( char *str, struct berval *bv ));
 
 /* tls.c */
-LDAP_F (int) ldap_int_tls_config LDAP_P(( struct ldap *ld,
+LDAP_F (int) ldap_pvt_tls_config LDAP_P(( struct ldap *ld,
        int option, const char *arg ));
 LDAP_F (int) ldap_pvt_tls_get_option LDAP_P(( struct ldap *ld,
        int option, void *arg ));