;ELC   
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.



(byte-code "\300\301!\210\302\303\304\"\210\305\306\307\310\311\312\313\314&\210\315\316\317\320\321DD\322\323\324%\210\315\325\317\320\326DD\327\323\330%\210\315\331\317\320\332DD\333\323\334%\210\315\335\317\320\336DD\337\323\340%\210\315\341\317\320\342DD\343\323\344%\210\315\345\317\320\346DD\347\323\350%\210\315\351\317\320\352DD\353\323\354\311\355&\210\315\356\317\320\357DD\360\323\361%\210\315\362\317\320\363DD\364\323\365%\210\315\366\317\320\367DD\370\323\365%\207" [require password-cache autoload auth-source-search "auth-source" custom-declare-group ldap nil "Lightweight Directory Access Protocol." :version "21.1" :group comm custom-declare-variable ldap-default-host funcall function #[0 "\300\207" [nil] 1 #1=""] "Default LDAP server.\nA TCP port number can be appended to that name using a colon as\na separator." :type (choice (string :tag "Host name") (const :tag "Use library default" nil)) ldap-default-port #[0 "\300\207" [nil] 1 #1#] "Default TCP port for LDAP connections.\nInitialized from the LDAP library at build time.\nDefault value is 389." (choice (const :tag "Use library default" nil) (natnum :tag "Port number")) ldap-default-base #[0 "\300\207" [nil] 1 #1#] "Default base for LDAP searches.\nThis is a string using the syntax of RFC 1779.\nFor instance, \"o=ACME, c=US\" limits the search to the\nAcme organization in the United States." (choice (const :tag "Use library default" nil) (string :tag "Search base")) ldap-host-parameters-alist #[0 "\300\207" [nil] 1 #1#] "Alist of host-specific options for LDAP transactions.\nThe format of each list element is (HOST PROP1 VAL1 PROP2 VAL2 ...).\nHOST is the hostname of an LDAP server (with an optional TCP port number\nappended to it using a colon as a separator).\nPROPn and VALn are property/value pairs describing parameters for the server.\nValid properties include:\n  `auth-source' specifies whether or not to look up, via the\n  `auth-source' library, options which are not otherwise provided\n  in this list.  See `ldap-search-internal'.\n  `binddn' is the distinguished name of the user to bind as\n    (in RFC 1779 syntax).\n  `passwd' is the password to use for simple authentication.\n  `auth' is the authentication method to use.\n    Possible values are: `simple', `krbv41' and `krbv42'.\n  `base' is the base for the search as described in RFC 1779.\n  `scope' is one of the three symbols `subtree', `base' or `onelevel'.\n  `deref' is one of the symbols `never', `always', `search' or `find'.\n  `timelimit' is the timeout limit for the connection in seconds.\n  `sizelimit' is the maximum number of matches to return." (repeat :menu-tag "Host parameters" :tag "Host parameters" (list :menu-tag "Host parameters" :tag "Host parameters" :value nil (string :tag "Host name") (checklist :inline t :greedy t (list :tag "Use auth-source" :inline t (const :tag "Use auth-source" auth-source) boolean) (list :tag "Search Base" :inline t (const :tag "Search Base" base) string) (list :tag "Binding DN" :inline t (const :tag "Binding DN" binddn) string) (list :tag "Password" :inline t (const :tag "Password" passwd) string) (list :tag "Authentication Method" :inline t (const :tag "Authentication Method" auth) (choice (const :menu-tag "None" :tag "None" nil) (const :menu-tag "Simple" :tag "Simple" simple) (const :menu-tag "Kerberos 4.1" :tag "Kerberos 4.1" krbv41) (const :menu-tag "Kerberos 4.2" :tag "Kerberos 4.2" krbv42))) (list :tag "Search Scope" :inline t (const :tag "Search Scope" scope) (choice (const :menu-tag "Default" :tag "Default" nil) (const :menu-tag "Subtree" :tag "Subtree" subtree) (const :menu-tag "Base" :tag "Base" base) (const :menu-tag "One Level" :tag "One Level" onelevel))) (list :tag "Dereferencing" :inline t (const :tag "Dereferencing" deref) (choice (const :menu-tag "Default" :tag "Default" nil) (const :menu-tag "Never" :tag "Never" never) (const :menu-tag "Always" :tag "Always" always) (const :menu-tag "When searching" :tag "When searching" search) (const :menu-tag "When locating base" :tag "When locating base" find))) (list :tag "Time Limit" :inline t (const :tag "Time Limit" timelimit) (integer :tag "(in seconds)")) (list :tag "Size Limit" :inline t (const :tag "Size Limit" sizelimit) (integer :tag "(number of records)"))))) ldap-ldapsearch-prog #[0 "\300\207" ["ldapsearch"] 1 #1#] "The name of the ldapsearch command line program." (string :tag "`ldapsearch' Program") ldap-ldapsearch-args #[0 "\300\207" [nil] 1 #1#] "A list of additional arguments to pass to `ldapsearch'." (repeat :tag "`ldapsearch' Arguments" (string :tag "Argument")) ldap-ldapsearch-password-prompt-regexp #[0 "\300\207" ["Enter LDAP Password: "] 1 #1#] "Regexp used to recognize the `ldapsearch' program's password prompt." regexp "25.1" ldap-ignore-attribute-codings #[0 "\300\207" [nil] 1 #1#] "If non-nil, do not encode/decode LDAP attribute values." boolean ldap-default-attribute-decoder #[0 "\300\207" [nil] 1 #1#] "Decoder function to use for attributes whose syntax is unknown." symbol ldap-coding-system #[0 "\300\207" [utf-8] 1 #1#] "Coding system of LDAP string values.\nLDAP v3 specifies the coding system of strings to be UTF-8."] 8)#@237 A vector of functions used to encode LDAP attribute values.
The sequence of functions corresponds to the sequence of LDAP attribute syntax
object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in
RFC2252 section 4.3.2
(defvar ldap-attribute-syntax-encoders [nil nil nil nil nil nil ldap-encode-boolean nil nil nil ldap-encode-country-string ldap-encode-string nil nil ldap-encode-string nil nil nil nil nil nil nil nil nil nil nil number-to-string nil nil nil nil nil nil nil nil nil nil nil nil nil ldap-encode-address nil nil ldap-encode-string nil nil nil nil nil nil nil nil nil nil nil nil nil nil] (#$ . 5256))#@237 A vector of functions used to decode LDAP attribute values.
The sequence of functions corresponds to the sequence of LDAP attribute syntax
object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in
RFC2252 section 4.3.2
(defvar ldap-attribute-syntax-decoders [nil nil nil nil nil nil ldap-decode-boolean nil nil nil ldap-decode-string ldap-decode-string nil nil ldap-decode-string nil nil nil nil nil nil nil nil nil nil nil string-to-number nil nil nil nil nil nil nil nil nil nil nil nil nil ldap-decode-address nil nil ldap-decode-string nil nil nil nil nil nil nil nil nil nil nil nil nil nil] (#$ . 5897))#@157 A map of LDAP attribute names to their type object id minor number.
This table is built from RFC2252 Section 5, RFC2256 Section 5 and
RFC2798 Section 9.1.1
(defvar ldap-attribute-syntaxes-alist '((createtimestamp . 24) (modifytimestamp . 24) (creatorsname . 12) (modifiersname . 12) (subschemasubentry . 12) (attributetypes . 3) (objectclasses . 37) (matchingrules . 30) (matchingruleuse . 31) (namingcontexts . 12) (altserver . 26) (supportedextension . 38) (supportedcontrol . 38) (supportedsaslmechanisms . 15) (supportedldapversion . 27) (ldapsyntaxes . 16) (ditstructurerules . 17) (nameforms . 35) (ditcontentrules . 16) (objectclass . 38) (aliasedobjectname . 12) (cn . 15) (sn . 15) (serialnumber . 44) (c . 15) (l . 15) (st . 15) (street . 15) (o . 15) (ou . 15) (title . 15) (description . 15) (searchguide . 25) (businesscategory . 15) (postaladdress . 41) (postalcode . 15) (postofficebox . 15) (physicaldeliveryofficename . 15) (telephonenumber . 50) (telexnumber . 52) (telexterminalidentifier . 51) (facsimiletelephonenumber . 22) (x121address . 36) (internationalisdnnumber . 36) (registeredaddress . 41) (destinationindicator . 44) (preferreddeliverymethod . 14) (presentationaddress . 43) (supportedapplicationcontext . 38) (member . 12) (owner . 12) (roleoccupant . 12) (seealso . 12) (userpassword . 40) (usercertificate . 8) (cacertificate . 8) (authorityrevocationlist . 9) (certificaterevocationlist . 9) (crosscertificatepair . 10) (name . 15) (givenname . 15) (initials . 15) (generationqualifier . 15) (x500uniqueidentifier . 6) (dnqualifier . 44) (enhancedsearchguide . 21) (protocolinformation . 42) (distinguishedname . 12) (uniquemember . 34) (houseidentifier . 15) (supportedalgorithms . 49) (deltarevocationlist . 9) (dmdname . 15) (carlicense . 15) (departmentnumber . 15) (displayname . 15) (employeenumber . 15) (employeetype . 15) (jpegphoto . 28) (preferredlanguage . 15) (usersmimecertificate . 5) (userpkcs12 . 5)) (#$ . 6530))#@13 

(fn BOOL)
(defalias 'ldap-encode-boolean #[257 "\211\203 \300\207\301\207" ["TRUE" "FALSE"] 2 (#$ . 8502)])#@12 

(fn STR)
(defalias 'ldap-decode-boolean #[257 "\211\300\230\203 \301\207\211\302\230\203 \303\207\304\305\"\207" ["TRUE" t "FALSE" nil error "Wrong LDAP boolean string: %s"] 4 (#$ . 8618)])#@12 

(fn STR)
(defalias 'ldap-encode-country-string #[257 "\211G\300U?\205\f \301\302\"\207" [2 error "Invalid country string: %s"] 4 (#$ . 8818)])#@12 

(fn STR)
(defalias 'ldap-decode-string #[257 "\301\"\207" [ldap-coding-system decode-coding-string] 4 (#$ . 8969)])#@12 

(fn STR)
(defalias 'ldap-encode-string #[257 "\301\"\207" [ldap-coding-system encode-coding-string] 4 (#$ . 9094)])#@12 

(fn STR)
(defalias 'ldap-decode-address #[257 "\300\301\302\303\"\304#\207" [mapconcat ldap-decode-string split-string "\\$" "\n"] 6 (#$ . 9219)])#@12 

(fn STR)
(defalias 'ldap-encode-address #[257 "\300\301\302\303\"\304#\207" [mapconcat ldap-encode-string split-string "\n" "$"] 6 (#$ . 9374)])#@91 Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'.

(fn HOST PARAMETER)
(defalias 'ldap-get-host-parameter #[514 "\301\302\"A\"\207" [ldap-host-parameters-alist plist-get assoc] 6 (#$ . 9527)])#@256 Decode the attribute/value pair ATTR according to LDAP rules.
The attribute name is looked up in `ldap-attribute-syntaxes-alist'
and the corresponding decoder is then retrieved from
`ldap-attribute-syntax-decoders' and applied on the value(s).

(fn ATTR)
(defalias 'ldap-decode-attribute #[257 "\211@A\303\227!\236A\304\203 	SH\262\202 \n\262\211\203' \305\"B\207\207" [ldap-attribute-syntaxes-alist ldap-attribute-syntax-decoders ldap-default-attribute-decoder intern nil mapcar] 9 (#$ . 9748)])#@539 Perform an LDAP search.
FILTER is the search filter in RFC1558 syntax.
HOST is the LDAP host on which to perform the search.
ATTRIBUTES are the specific attributes to retrieve, nil means
retrieve all.
ATTRSONLY, if non-nil, retrieves the attributes only, without
the associated values.
If WITHDN is non-nil, each entry in the result will be prepended with
its distinguished name WITHDN.
Additional search parameters can be specified through
`ldap-host-parameters-alist', which see.

(fn FILTER &optional HOST ATTRIBUTES ATTRSONLY WITHDN)
(defalias 'ldap-search #[1281 "\204 \211\262\204 \303\304!\210\305	\"A\306\307\310	\311	\312\n\313BBBBBBBBBB!\n\2036 \207\314\315\"\207" [ldap-default-host ldap-host-parameters-alist ldap-ignore-attribute-codings error "No LDAP host specified" assoc ldap-search-internal host filter attributes attrsonly withdn mapcar #[257 "\300\301\"\207" [mapcar ldap-decode-attribute] 4 "\n\n(fn RECORD)"]] 18 (#$ . 10264) "sFilter:"])#@444 Read LDAP password for HOST.
If the password is cached, it is read from the cache, otherwise the user
is prompted for the password.  If `password-cache' is non-nil the password
is verified and cached.  The `password-cache-expiry' variable
controls for how long the password is cached.

This function can be specified for the `passwd' property in
`ldap-host-parameters-alist' when interactive password prompting
is desired for HOST.

(fn HOST)
(defalias 'ldap-password-read #[257 "\302P\303\304\305\306\232\203 \306\202 \304\307\"\"\"\203K \310!\204K \311\312\313\314\315\316\317\316\320\316\321\f\322	\"ABBBBBBBBBBBB!\204K \323\"\210\207" [password-cache ldap-host-parameters-alist "ldap:" password-read format "Enter LDAP Password%s: " "" " for %s" password-in-cache-p ldap-search-internal host filter "emacs-test-password=" attributes nil attrsonly withdn passwd assoc password-cache-add] 19 (#$ . 11248)])#@2008 Perform a search on a LDAP server.
SEARCH-PLIST is a property list describing the search request.
Valid keys in that list are:

  `auth-source', if non-nil, will use `auth-source-search' and
will grab the :host, :secret, :base, and (:user or :binddn)
tokens into the `host', `passwd', `base', and `binddn' parameters
respectively if they are not provided in SEARCH-PLIST.  So for
instance *each* of these netrc lines has the same effect if you
ask for the host "ldapserver:2400":

  machine ldapserver:2400 login myDN secret myPassword base myBase
  machine ldapserver:2400 binddn myDN secret myPassword port ldap
  login myDN secret myPassword base myBase

but if you have more than one in your netrc file, only the first
matching one will be used.  Note the "port ldap" part is NOT
required.

  `host' is a string naming one or more (blank-separated) LDAP servers
to try to connect to.  Each host name may optionally be of the form HOST:PORT.
  `filter' is a filter string for the search as described in RFC 1558.
  `attributes' is a list of strings indicating which attributes to retrieve
for each matching entry. If nil, return all available attributes.
  `attrsonly', if non-nil, indicates that only attributes are retrieved,
not their associated values.
  `auth' is one of the symbols `simple', `krbv41' or `krbv42'.
  `base' is the base for the search as described in RFC 1779.
  `scope' is one of the three symbols `sub', `base' or `one'.
  `binddn' is the distinguished name of the user to bind as (in
RFC 1779 syntax).
  `passwd' is the password to use for simple authentication.
  `deref' is one of the symbols `never', `always', `search' or `find'.
  `timelimit' is the timeout limit for the connection in seconds.
  `sizelimit' is the maximum number of matches to return.
  `withdn' if non-nil each entry in the result will be prepended with
its distinguished name DN.
The function returns a list of matching entries.  Each entry is itself
an alist of attribute/value pairs.

(fn SEARCH-PLIST)
(defalias 'ldap-search-internal #[257 "\306\307!\306\310!\311\312\"\206 \311\313\"\205  \314\315\206 \316\317\316$@\206( \311\315\"\311\320\"\2064 \311\321\"\322!\203K \211\323=\203F \211!\202L \211 \202L \211\311\324\"\206_ \311\325\"\206_ \311\326\"\311	\327\"\206o \311\330\"\206o 	\311\n\331\"\311\332\"\311\f\333\"\311\334\"\311\335\"\311\336\"\311\337\"\311\340\"\311\341\"\342\343\344D\345\211\211\211\211\203\261 \346\232\203\265 \347\350!\210B\262rq\210\351 \210\203\346 \346\232\204\346 \352\353\354\"\203\336 \355\202\337 \356\"C\244\262\203\370 \346\232\204\370 \357C\244\262\203\346\232\204\352\360\"C\244\262\f\203$\f\346\232\204$\352\361\"C\244\262\203:\346\232\204:\352\362\"C\244\262\203L\363=\203L\364C\244\262\203W\365C\244\262\n\203m\n\346\232\204m\352\366\"C\244\262	\203\203	\346\232\204\203\352\367\f\"C\244\262\203\231\346\232\204\231\352\370\"C\244\262\203\371\n#\372\373\374%eb\210\375\fd\316#\204\300\376\377\"\210\202\255\201@ \"\210\201@ \201A \"\210\201B !\201C >\204\350\201D \201E !\210\202\321\201F !\211\201G >\204\211\201H =\203\347\201I !\266\2024\347\201J \201K \201L \201M ##\210\266\2024\372\201N \345\345D\345\371\f\n#&\210\201A c\210eb\210\375\201O \fP\345\316#\203Q\201P \346!\210\202<eb\210\201Q \201R !\203f\347\201S !\202>\201T \201U !\210\201Q \201V !\203{\377y\210\201W \345w\210m\2044`\201X  {\262\377y\210\201Q \201Y !\203\201Z \377!\262\201Z \201[ !\262\201\\ >\203\305\353\201] \"\342=\203\305\201Z \377\"\262\201Z \201^ !\203\363rq\210\351 \210\201_ \345!\210\201` !\210\201a !\210\201b  )\262\202\370\201c \262DB\262\377y\210\202\220\203\237BB\262\202\203\237B\262\345\262\201T \201d \"\210T\262\202{\201T \201e !\210\211\237)\207" [ldap-default-host ldap-default-base ldap-ldapsearch-args ldap-ldapsearch-prog ldap-ldapsearch-password-prompt-regexp system-type get-buffer-create " *ldap-search*" " *ldap-value*" plist-get host auth-source auth-source-search :host t :create passwd :secret functionp ldap-password-read binddn :user :binddn base :base filter attributes attrsonly scope auth deref timelimit sizelimit withdn 0 "-LLL" "-tt" nil "" error "No search filter" erase-buffer format string-match "^[a-zA-Z]+://" "-H%s" "-h%s" "-A" "-b%s" "-s%s" "-D%s" simple "-x" "-W" "-a%s" "-l%s" "-z%s" append apply start-process "ldapsearch" re-search-forward accept-process-output 1 process-send-string "\n" process-status (exit signal) sit-for 0.1 process-exit-status (0 4) 49 "Incorrect LDAP password or bind distinguished name (binddn)" "Failed ldapsearch invocation: %s \"%s\"" mapconcat identity "\" \"" call-process "[	\n\f]+ \\|" replace-match looking-at "usage" "Incorrect ldapsearch invocation" message "Parsing results... " "Size limit exceeded" " 	\n" line-end-position "^\\([A-Za-z][-A-Za-z0-9]*\\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:	 ]+\\(<[	 ]*file://\\)?\\(.*\\)$" match-string 4 (windows-nt ms-dos) "/\\(.:.*\\)$" 3 set-buffer-multibyte insert-file-contents-literally delete-file buffer-string " " "Parsing results... %d" "Parsing results... done"] 36 (#$ . 12179)])
(provide 'ldap)
