]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
New access_allowed()
[openldap] / include / ldap.h
index 59dd2e45394f262fe3d0b3685626412708b56c2e..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
@@ -177,11 +185,20 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_X_SASL_SSF_MAX                        0x6108
 #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 */
@@ -237,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 */
 
@@ -273,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 */
@@ -288,7 +305,8 @@ typedef struct ldapcontrol {
 #define LDAP_CONTROL_SLURP                             "1.3.6.1.4.1.4203.666.5.13"
 #define LDAP_CONTROL_VALSORT                   "1.3.6.1.4.1.4203.666.5.14"
 #define LDAP_CONTROL_DONTUSECOPY               "1.3.6.1.4.1.4203.666.5.15"
-
+#define        LDAP_CONTROL_X_DEREF                    "1.3.6.1.4.1.4203.666.5.16"
+#define        LDAP_CONTROL_X_WHATFAILED               "1.3.6.1.4.1.4203.666.5.17"
 
 /* LDAP Chaining Behavior Control *//* work in progress */
 /* <draft-sermersheim-ldap-chaining>;
@@ -321,10 +339,6 @@ typedef struct ldapcontrol {
                                                LDAP_CONTROL_X_SESSION_TRACKING ".2"
 #define LDAP_CONTROL_X_SESSION_TRACKING_USERNAME \
                                                LDAP_CONTROL_X_SESSION_TRACKING ".3"
-/* Dereference Control (work in progress) */
-#define        LDAP_CONTROL_X_DEREF                    "1.3.6.1.4.1.4203.666.5.16"
-/* "What Failed?" Control (work in progress) */
-#define        LDAP_CONTROL_X_WHATFAILED               "1.3.6.1.4.1.4203.666.5.17"
 #endif /* LDAP_DEVEL */
 
 /* various expired works */
@@ -342,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
@@ -611,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 */
@@ -1339,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:
  */