]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
New access_allowed()
[openldap] / include / ldap.h
index 71df8e67cc670be9260d09d2f084e89ddd4acfa3..5cda775cfd3da464368825f7a7193e7fa1cd19c7 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  * 
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -144,7 +144,7 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_X_TLS_CERTFILE                0x6004
 #define LDAP_OPT_X_TLS_KEYFILE         0x6005
 #define LDAP_OPT_X_TLS_REQUIRE_CERT    0x6006
-/* #define LDAP_OPT_X_TLS_PROTOCOL             0x6007 */
+#define LDAP_OPT_X_TLS_PROTOCOL_MIN    0x6007
 #define LDAP_OPT_X_TLS_CIPHER_SUITE    0x6008
 #define LDAP_OPT_X_TLS_RANDOM_FILE     0x6009
 #define LDAP_OPT_X_TLS_SSL_CTX         0x600a  /* OpenSSL SSL* */
@@ -165,6 +165,14 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_X_TLS_CRL_PEER        1
 #define LDAP_OPT_X_TLS_CRL_ALL 2
 
+/* for LDAP_OPT_X_TLS_PROTOCOL_MIN */
+#define LDAP_OPT_X_TLS_PROTOCOL(maj,min)       (((maj) << 8) + (min))
+#define LDAP_OPT_X_TLS_PROTOCOL_SSL2           (2 << 8)
+#define LDAP_OPT_X_TLS_PROTOCOL_SSL3           (3 << 8)
+#define LDAP_OPT_X_TLS_PROTOCOL_TLS1_0         ((3 << 8) + 1)
+#define LDAP_OPT_X_TLS_PROTOCOL_TLS1_1         ((3 << 8) + 2)
+#define LDAP_OPT_X_TLS_PROTOCOL_TLS1_2         ((3 << 8) + 3)
+
 /* OpenLDAP SASL options */
 #define LDAP_OPT_X_SASL_MECH                   0x6100
 #define LDAP_OPT_X_SASL_REALM                  0x6101
@@ -178,11 +186,19 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_X_SASL_MAXBUFSIZE             0x6109
 #define LDAP_OPT_X_SASL_MECHLIST               0x610a /* read-only */
 #define LDAP_OPT_X_SASL_NOCANON                        0x610b
+#define LDAP_OPT_X_SASL_USERNAME               0x610c /* read-only */
 
 /* OpenLDAP GSSAPI options */
 #define LDAP_OPT_X_GSSAPI_DO_NOT_FREE_CONTEXT      0x6200
 #define LDAP_OPT_X_GSSAPI_ALLOW_REMOTE_PRINCIPAL   0x6201
 
+/*
+ * OpenLDAP per connection tcp-keepalive settings
+ * (Linux only, ignored where unsupported)
+ */
+#define LDAP_OPT_X_KEEPALIVE_IDLE              0x6300
+#define LDAP_OPT_X_KEEPALIVE_PROBES            0x6301
+#define LDAP_OPT_X_KEEPALIVE_INTERVAL  0x6302
 
 /* Private API Extensions -- reserved for application use */
 #define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x7000  /* Private API inclusive */
@@ -238,7 +254,6 @@ typedef struct ldapcontrol {
 #define LDAP_CONTROL_PRE_READ                  "1.3.6.1.1.13.1"                /* RFC 4527 */
 #define LDAP_CONTROL_POST_READ                 "1.3.6.1.1.13.2"                /* RFC 4527 */
 
-/*  standard track - not implemented in slapd(8) */
 #define LDAP_CONTROL_SORTREQUEST    "1.2.840.113556.1.4.473" /* RFC 2891 */
 #define LDAP_CONTROL_SORTRESPONSE      "1.2.840.113556.1.4.474" /* RFC 2891 */
 
@@ -274,6 +289,7 @@ typedef struct ldapcontrol {
 #define LDAP_SYNC_ADD                                  1
 #define LDAP_SYNC_MODIFY                               2
 #define LDAP_SYNC_DELETE                               3
+#define LDAP_SYNC_NEW_COOKIE                   4
 
 
 /* Password policy Controls *//* work in progress */
@@ -340,11 +356,10 @@ typedef struct ldapcontrol {
 #define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_MODIFY       0x4
 #define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_RENAME       0x8
 
-/* LDAP VLV *//* not implemented in slapd(8) */
+/* LDAP VLV */
 #define LDAP_CONTROL_VLVREQUEST        "2.16.840.1.113730.3.4.9"
 #define LDAP_CONTROL_VLVRESPONSE    "2.16.840.1.113730.3.4.10"
 
-
 /* LDAP Unsolicited Notifications */
 #define        LDAP_NOTICE_OF_DISCONNECTION    "1.3.6.1.4.1.1466.20036" /* RFC 4511 */
 #define LDAP_NOTICE_DISCONNECT LDAP_NOTICE_OF_DISCONNECTION
@@ -609,6 +624,8 @@ typedef struct ldapcontrol {
 #define LDAP_RESULTS_TOO_LARGE         0x46 /* CLDAP */
 #define LDAP_AFFECTS_MULTIPLE_DSAS     0x47
 
+#define LDAP_VLV_ERROR                         0x4C
+
 #define LDAP_OTHER                                     0x50
 
 /* LCUP operation codes (113-117) - not implemented */
@@ -1337,6 +1354,22 @@ ldap_perror LDAP_P((     /* deprecated, use ldap_err2string */
 #endif
 
 
+/*
+ * gssapi.c:
+ */
+LDAP_F( int )
+ldap_gssapi_bind LDAP_P((
+       LDAP *ld,
+       LDAP_CONST char *dn,
+       LDAP_CONST char *creds ));
+
+LDAP_F( int )
+ldap_gssapi_bind_s LDAP_P((
+       LDAP *ld,
+       LDAP_CONST char *dn,
+       LDAP_CONST char *creds ));
+
+
 /*
  * in modify.c:
  */