MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.131.85.46
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/net/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/net/ldap.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:33 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/net/ldap.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303\304\"\210\305\306\307\310\311\312\313\314&\210\315\316\307\317\320\321\313\306&\210\315\322\307\323\320\324\313\306&\210\315\325\307\326\320\327\313\306&\210\315\330\307\331\320\332\313\306&\210\315\333\334\335\320\336\313\306&\210\315\337\340\341\320\342\313\306&\210\315\343\307\344\320\345\313\306&\210\315\346\307\347\320\350\313\306&\210\315\351\352\353\320\350\313\306&\207" [require custom 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 "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 "Default TCP port for LDAP connections.\nInitialized from the LDAP library at build time. Default value is 389." (choice (const :tag "Use library default" nil) (integer :tag "Port number")) ldap-default-base "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 "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  `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 "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 "ldapsearch" "The name of the ldapsearch command line program." (string :tag "`ldapsearch' Program") ldap-ldapsearch-args '("-LL" "-tt") "A list of additional arguments to pass to `ldapsearch'." (repeat :tag "`ldapsearch' Arguments" (string :tag "Argument")) ldap-ignore-attribute-codings "If non-nil, do not encode/decode LDAP attribute values." boolean ldap-default-attribute-decoder "Decoder function to use for attributes whose syntax is unknown." symbol ldap-coding-system 'utf-8 "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] (#$ . 4974))
#@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] (#$ . 5616))
#@134 A map of LDAP attribute names to their type object id minor number.
This table is built from RFC2252 Section 5 and RFC2256 Section 5
(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)) (#$ . 6250))
(defalias 'ldap-encode-boolean #[(bool) "\203\301\207\302\207" [bool "TRUE" "FALSE"] 1])
(defalias 'ldap-decode-boolean #[(str) "\301\230\203\302\207\303\230\203\304\207\305\306\"\207" [str "TRUE" t "FALSE" nil error "Wrong LDAP boolean string: %s"] 3])
(defalias 'ldap-encode-country-string #[(str) "G\301U?\205\f\302\303\"\207" [str 2 error "Invalid country string: %s"] 3])
(defalias 'ldap-decode-string #[(str) "\302	\"\207" [str ldap-coding-system decode-coding-string] 3])
(defalias 'ldap-encode-string #[(str) "\302	\"\207" [str ldap-coding-system encode-coding-string] 3])
(defalias 'ldap-decode-address #[(str) "\301\302\303\304\"\305#\207" [str mapconcat ldap-decode-string split-string "\\$" "\n"] 5])
(defalias 'ldap-encode-address #[(str) "\301\302\303\304\"\305#\207" [str mapconcat ldap-encode-string split-string "\n" "$"] 5])
#@70 Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'.
(defalias 'ldap-get-host-parameter #[(host parameter) "\303\304	\"A\n\"\207" [host ldap-host-parameters-alist parameter plist-get assoc] 4 (#$ . 8871)])
#@245 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).
(defalias 'ldap-decode-attribute #[(attr) "@A\306	\227!\236A\307\f\203	\fSH\202 \n
\203-	\310
\n\"B\202.,\207" [attr name values ldap-attribute-syntaxes-alist syntax-id decoder intern nil mapcar ldap-attribute-syntax-decoders ldap-default-attribute-decoder] 4 (#$ . 9101)])
#@483 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.
(defalias 'ldap-search #[(filter &optional host attributes attrsonly withdn) "\204	\211\204\306\307!\210\310\n\"A\311\312\300\305
\313\314\f\315
\fBBBBBBBBBB!\203:\202>\316\317\"*\207" [host ldap-default-host ldap-host-parameters-alist result host-plist filter error "No LDAP host specified" assoc nil ldap-search-internal attributes attrsonly withdn mapcar #[(record) "\301\302\"\207" [record mapcar ldap-decode-attribute] 3] ldap-ignore-attribute-codings] 12 (#$ . 9643) "sFilter:"])
#@2051 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).
  `auth' is one of the symbols `simple', `krbv41' or `krbv42'
  `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.
(defalias 'ldap-search-internal #[(search-plist) "\306\307!\306\310!\311\n\304\"\206\311\n\312\"\205#\313\314\f\206\315\316\315$@\f\206,\311
\314\"\311\n\317\"\2068\311
\320\"\321!\203G \202I\311\n\322\"\206]\311
\323\"\206]\311
\324\"\311\n\325\"\206o\311
\326\"\206o@\311\n\327\"\311\n\330\"\311\n\331\"\311\n\332\"\311\n\333\"\311\n\334\"\311\n\335\"\311\n\336\"\311\n\337\"\340A\341\211BC\341\211DE\341\211FG\203\310\342\232\203\314\343\344!\210Brq\210\345 \210\f\203\356\f\342\232\204\356B\346\347\f\"C\244B\203\342\232\204B\350C\244B\203\342\232\204B\346\351\"C\244B\203/\342\232\204/B\346\352\"C\244B\203F\342\232\204FB\346\353\"C\244B\203Y\354\232\203YB\355C\244B\203p\342\232\204pB\346\356\"C\244B\203\207\342\232\204\207B\346\357\"C\244B\203\236\342\232\204\236B\346\360\"C\244B\203\265\342\232\204\265B\346\361\"C\244B\362\363H\341\341D\341\364BI#&\210\365c\210eb\210\366\367\341\315#\203\340\370\342\341\211#\210\202\317eb\210\371\372!\203\357\343\373!\202\326\374\375!\210\371\376!\203\374\377y\210\371\201K!\203\377y\210\201L\341w\210m\204\315`\201M {C\377y\210\371\201N!\203\225\201O\377!D\201O\201P!EJ\201Q>\203T\201R\201SE\"\340=\203T\201O\377E\"EE\342\232\203c\201TE\202\205r	q\210\345 \210\201U\341!\210\201VE!\210\201WE!\210\201X E)DEDFBF\377y\210\202\203\250CF\237BGBG\202\265F\203\265F\237GBG\341F\201L\341w\210\374\201YA\"\210AT\210\202\374\201Z!\210G\237.\207" [buf bufval search-plist ldap-default-host host asfound get-buffer-create " *ldap-search*" " *ldap-value*" plist-get auth-source auth-source-search :host t :create passwd :secret functionp binddn :user :binddn base :base filter attributes attrsonly scope auth deref timelimit sizelimit withdn 0 nil "" error "No search filter" erase-buffer format "-h%s" "-A" "-b%s" "-s%s" "-D%s" simple "-x" "-w%s" "-a%s" "-l%s" "-z%s" apply call-process append "\n" re-search-forward "[	\n\f]+ " replace-match looking-at "usage" "Incorrect ldapsearch invocation" message "Parsing results... " "Size limit exceeded" 1 ldap-default-base numres arglist dn name value record result ldap-ldapsearch-prog ldap-ldapsearch-args system-type "version:" " 	\n" point-at-eol "^\\([A-Za-z][-A-Za-z0-9]*\\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:	 ]+\\(<[	 ]*file://\\)\\(.*\\)$" match-string 4 (windows-nt ms-dos) string-match "/\\(.:.*\\)$" " " set-buffer-multibyte insert-file-contents-literally delete-file buffer-string "Parsing results... %d" "Parsing results... done"] 11 (#$ . 10641)])
(provide 'ldap)

MMCT - 2023