diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 17:05:07 -0600 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-10-30 17:05:07 -0600 |
commit | 335206930979d278e871a5abbfa277e52d3d5bf1 (patch) | |
tree | 42e9089d1435f637f54d3f6a54bf38f46ea626b2 /ipa_server | |
parent | 3076cb4d2fa1be023a1c72d70cbdf5024047ff2a (diff) | |
parent | 62876ccee3ba679adda926b88564732552459619 (diff) | |
download | freeipa.git-335206930979d278e871a5abbfa277e52d3d5bf1.tar.gz freeipa.git-335206930979d278e871a5abbfa277e52d3d5bf1.tar.xz freeipa.git-335206930979d278e871a5abbfa277e52d3d5bf1.zip |
Merge branch 'master' of git://git.engineering.redhat.com/users/rcritten/freeipa2
Diffstat (limited to 'ipa_server')
-rw-r--r-- | ipa_server/plugins/b_ldap.py | 9 | ||||
-rw-r--r-- | ipa_server/servercore.py | 11 | ||||
-rw-r--r-- | ipa_server/updates/automount.update | 35 |
3 files changed, 53 insertions, 2 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py index e53afc12..c279ac70 100644 --- a/ipa_server/plugins/b_ldap.py +++ b/ipa_server/plugins/b_ldap.py @@ -139,6 +139,15 @@ class ldap(CrudBackend): return entry.get('dn') + def get_base_entry(self, searchbase, searchfilter, attrs): + return servercore.get_base_entry(searchbase, searchfilter, attrs) + + def get_sub_entry(self, searchbase, searchfilter, attrs): + return servercore.get_sub_entry(searchbase, searchfilter, attrs) + + def get_one_entry(self, searchbase, searchfilter, attrs): + return servercore.get_one_entry(searchbase, searchfilter, attrs) + def get_ipa_config(self): """Return a dictionary of the IPA configuration""" return servercore.get_ipa_config() diff --git a/ipa_server/servercore.py b/ipa_server/servercore.py index 052c386b..5f13e8d4 100644 --- a/ipa_server/servercore.py +++ b/ipa_server/servercore.py @@ -104,13 +104,20 @@ def get_sub_entry (base, searchfilter, sattrs=None): """ return get_entry(base, ldap.SCOPE_SUBTREE, searchfilter, sattrs) -def get_list (base, searchfilter, sattrs=None): +def get_one_entry (base, searchfilter, sattrs=None): + """Get the children of an entry (with a scope of ONE). + Return as a list of dict of values. + Multi-valued fields are represented as lists. + """ + return get_list(base, searchfilter, sattrs, ldap.SCOPE_ONELEVEL) + +def get_list (base, searchfilter, sattrs=None, scope=ldap.SCOPE_SUBTREE): """Gets a list of entries. Each is converted to a dict of values. Multi-valued fields are represented as lists. """ entries = [] - entries = context.conn.getConn().getList(base, ldap.SCOPE_SUBTREE, searchfilter, sattrs) + entries = context.conn.getConn().getList(base, scope, searchfilter, sattrs) return map(convert_entry, entries) diff --git a/ipa_server/updates/automount.update b/ipa_server/updates/automount.update new file mode 100644 index 00000000..25d45a09 --- /dev/null +++ b/ipa_server/updates/automount.update @@ -0,0 +1,35 @@ +# +# An automount schema based on RFC 2307-bis. +# +# This schema defines new automount and automountMap objectclasses to represent +# the automount maps and their entries. +# +dn: cn=schema +add:attributeTypes: + ( 1.3.6.1.1.1.1.31 NAME 'automountMapName' + DESC 'automount Map Name' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE + X-ORIGIN 'RFC 2307bis' ) +add:attributeTypes: + ( 1.3.6.1.1.1.1.32 NAME 'automountKey' + DESC 'Automount Key value' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE + X-ORIGIN 'RFC 2307bis' ) +add:attributeTypes: + ( 1.3.6.1.1.1.1.33 NAME 'automountInformation' + DESC 'Automount information' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE + X-ORIGIN 'RFC 2307bis' ) +add:objectClasses: + ( 1.3.6.1.1.1.2.16 NAME 'automountMap' + DESC 'Automount Map information' SUP top + STRUCTURAL MUST automountMapName MAY description + X-ORIGIN 'RFC 2307bis' ) +add:objectClasses: + ( 1.3.6.1.1.1.2.17 NAME 'automount' + DESC 'Automount information' SUP top STRUCTURAL + MUST ( automountKey $ automountInformation ) MAY description + X-ORIGIN 'RFC 2307bis' ) |