/usr/lib/ocaml/ocamldap/ldap_types.mli is in libldap-ocaml-dev 2.1.8-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | (* Common data types from rfc 2251 used throughout the library
Copyright (C) 2004 Eric Stokes, and The California State University
at Northridge
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*)
(** Common data types used by ocamldap. Most of these types are taken
from the ASN.1 specification for LDAP as defined in rfc2251 @see
<http://www.ietf.org/rfc/rfc2251.txt> rfc2251*)
(** An encoding error has occurred, the argument contains a
description of the error This is likely a bug, so it should be
reported *)
exception LDAP_Encoder of string
(** A decoding error has occurred, the argument contains a description
of the error. This MAY be a bug, but it may also be that the server
you are talking to is non standard. Please report these right away in
any case.*)
exception LDAP_Decoder of string
type ldap_resultcode = [
`SUCCESS
| `OPERATIONS_ERROR
| `PROTOCOL_ERROR
| `TIMELIMIT_EXCEEDED
| `SIZELIMIT_EXCEEDED
| `COMPARE_FALSE
| `COMPARE_TRUE
| `AUTH_METHOD_NOT_SUPPORTED
| `STRONG_AUTH_REQUIRED
| `REFERRAL
| `ADMINLIMIT_EXCEEDED
| `UNAVAILABLE_CRITICAL_EXTENSION
| `CONFIDENTIALITY_REQUIRED
| `SASL_BIND_IN_PROGRESS
| `NO_SUCH_ATTRIBUTE
| `UNDEFINED_TYPE
| `INAPPROPRIATE_MATCHING
| `CONSTRAINT_VIOLATION
| `TYPE_OR_VALUE_EXISTS
| `INVALID_SYNTAX
| `NO_SUCH_OBJECT
| `ALIAS_PROBLEM
| `INVALID_DN_SYNTAX
| `IS_LEAF
| `ALIAS_DEREF_PROBLEM
| `INAPPROPRIATE_AUTH
| `INVALID_CREDENTIALS
| `INSUFFICIENT_ACCESS
| `BUSY
| `UNAVAILABLE
| `UNWILLING_TO_PERFORM
| `LOOP_DETECT
| `NAMING_VIOLATION
| `OBJECT_CLASS_VIOLATION
| `NOT_ALLOWED_ON_NONLEAF
| `NOT_ALLOWED_ON_RDN
| `ALREADY_EXISTS
| `NO_OBJECT_CLASS_MODS
| `AFFECTS_MULTIPLE_DSAS
| `OTHER
| `SERVER_DOWN
| `LOCAL_ERROR
| `ENCODING_ERROR
| `DECODING_ERROR
| `TIMEOUT
| `AUTH_UNKNOWN
| `FILTER_ERROR
| `USER_CANCELLED
| `PARAM_ERROR
| `NO_MEMORY
| `CONNECT_ERROR
| `NOT_SUPPORTED
| `CONTROL_NOT_FOUND
| `NO_RESULTS_RETURNED
| `MORE_RESULTS_TO_RETURN
| `CLIENT_LOOP
| `REFERRAL_LIMIT_EXCEEDED
| `UNKNOWN_ERROR of int ]
type ldap_result = {
result_code: ldap_resultcode;
matched_dn: string;
error_message: string;
ldap_referral: (string list) option;
}
(** extended information to return with the LDAP_Failure
exception. Contains the remaining values which are defined by the
protocol ext_matched_dn: the matched dn. Commonly set by
`NO_SUCH_OBJECT. ext_referral: a list of ldapurls returned by the
server when you attempted to do a write operation. If you use
Ldap_ooclient with referrals set to follow you will never see this*)
type ldap_ext_return = {
ext_matched_dn: string;
ext_referral: string list option;
}
(** The exception raised to indicate all types of failure in the
higher level libraries Ldap_funclient, and Ldap_ooclient. example
[LDAP_Failure (`NO_SUCH_OBJECT, "no such object",
{ext_matched_dn=Some "o=csun";ext_referral=None})] *)
exception LDAP_Failure of ldap_resultcode * string * ldap_ext_return
type saslCredentials = {
sasl_mechanism: string;
sasl_credentials: string option;
}
type authentication = Simple of string
| Sasl of saslCredentials
type bind_request = {
bind_version: int;
bind_name: string;
bind_authentication: authentication;
}
type bind_response = {
bind_result: ldap_result;
bind_serverSaslCredentials: string option;
}
type attribute = {
attr_type: string;
attr_vals: string list;
}
type dn = attribute list
(** the type used to encode and decode a search entry. Also the type
returned by search_s and search_a in Ldap_funclient *)
type search_result_entry = {
sr_dn: string;
sr_attributes: attribute list;
}
(** a type defining the scope of a search filter *)
type search_scope = [ `BASE (** search only at the base *)
| `ONELEVEL (** search one level below the base *)
| `SUBTREE (** search the entire tree under the base *)]
type alias_deref = [ `NEVERDEREFALIASES
| `DEREFINSEARCHING
| `DEREFFINDINGBASE
| `DEREFALWAYS ]
type attribute_value_assertion = {
attributeDesc: string;
assertionValue: string;
}
type matching_rule_assertion = {
matchingRule: string option;
ruletype: string option;
matchValue: string;
dnAttributes: bool; (* default false *)
}
type substring_component = { (* at least one must be specified *)
substr_initial: string list;
substr_any: string list;
substr_final: string list;
}
type substring_filter = {
attrtype: string;
substrings: substring_component;
}
type filter = [ `And of filter list
| `Or of filter list
| `Not of filter
| `EqualityMatch of attribute_value_assertion
| `Substrings of substring_filter
| `GreaterOrEqual of attribute_value_assertion
| `LessOrEqual of attribute_value_assertion
| `Present of string
| `ApproxMatch of attribute_value_assertion
| `ExtensibleMatch of matching_rule_assertion ]
type search_request = {
baseObject: string;
scope: search_scope;
derefAliases: alias_deref;
sizeLimit: int32;
timeLimit: int32;
typesOnly: bool;
filter: filter;
s_attributes: string list;
}
type modify_optype = [ `ADD
| `DELETE
| `REPLACE ]
type modify_op = {
mod_op: modify_optype;
mod_value: attribute;
}
type modify_request = {
mod_dn: string;
modification: modify_op list
}
type modify_dn_request = {
modn_dn: string;
modn_newrdn: string;
modn_deleteoldrdn: bool;
modn_newSuperior: string option
}
type compare_request = {
cmp_dn: string;
cmp_ava: attribute_value_assertion;
}
type extended_request = {
ext_requestName: string;
ext_requestValue: string option;
}
type extended_response = {
ext_result: ldap_result;
ext_responseName: string option;
ext_response: string option;
}
type protocol_op = Bind_request of bind_request
| Bind_response of bind_response
| Unbind_request
| Search_request of search_request
| Search_result_entry of search_result_entry
| Search_result_reference of string list
| Search_result_done of ldap_result
| Modify_request of modify_request
| Modify_response of ldap_result
| Add_request of search_result_entry
| Add_response of ldap_result
| Delete_request of string
| Delete_response of ldap_result
| Modify_dn_request of modify_dn_request
| Modify_dn_response of ldap_result
| Compare_request of compare_request
| Compare_response of ldap_result
| Abandon_request of Int32.t
| Extended_request of extended_request
| Extended_response of extended_response
type ldap_control = {
controlType: string;
criticality: bool;
controlValue: string option
}
type ldap_controls = ldap_control list
type ldap_message = {
messageID: Int32.t;
protocolOp: protocol_op;
controls: ldap_controls option;
}
type con_mech = [ `SSL
| `PLAIN ]
type ldap_url = {
url_mech: con_mech;
url_host: string option;
url_port: string option;
url_dn: string option;
url_attributes: (string list) option;
url_scope: search_scope option;
url_filter: filter option;
url_ext: ((bool * string * string) list) option;
}
(** see draft-zeilenga-ldap-grouping-xx Ldap grouping is a way of
telling the server that a set of ldap operations is related, its most
interesting application is transactions across multiple objects.
This draft is not yet implemented by any present day ldap server *)
type ldap_grouping_type = [ `LDAP_GROUP_TXN ]
(** a cookie that is sent with every ldap operation which is part of a
group *)
type ldap_grouping_cookie
|