Ticket UUID: | 1082061 | |||
Title: | ldap::search has no way to specify scope | |||
Type: | Patch | Version: | None | |
Submitter: | dossy | Created on: | 2004-12-09 12:46:31 | |
Subsystem: | ldap | Assigned To: | loewerj | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2006-06-21 16:34:13 | |
Resolution: | Accepted | Closed By: | mic42 | |
Closed on: | 2006-06-21 09:34:13 | |||
Description: |
ldap 1.2 (Tcllib 1.7) ldap::search has no way of specifying scope. The "default" scope is subtree. This makes searching from the base DN not possible, see: % package require ldap 1.2 % set l [ldap::connect localhost] ::ldap::ldapsock5 % ldap::search $l {} (objectClass=*) namingContexts LDAP error noSuchObject: I propose adding an optional "args" option arg to the end of the call signature for [ldap::search], like so: % package require ldap 1.3 % set l [ldap::connect localhost] ::ldap::ldapsock5 % ldap::search $l {} (objectClass=*) namingContexts -scope base {{} {namingContexts dc=panoptic,dc=com}} Attached is a patch to provide the functionality in the above example. The currently only valid switch is "-scope" and valid values are: base, one{level}, sub{tree}, or any integer (0-2). | |||
User Comments: |
mic42 added on 2006-06-21 16:34:13:
Logged In: YES user_id=302287 Applied the patch. mic42 added on 2004-12-14 13:15:30: Logged In: YES user_id=302287 The other options in ldap::search should also be exposed to the script level where appropriate: set derefAliases 0 set sizeLimit 0 set timeLimit 0 set attrsOnly 0 Those are not settable by a script at the moment. dossy added on 2004-12-09 19:48:53: File Added - 111813: rfe-1082061-patch.txt |
Attachments:
- rfe-1082061-patch.txt [download] added by dossy on 2004-12-09 19:48:53. [details]