Bug 476261
Summary: | Compare operation in nsaccountlock returns error | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Daniel Cristian Cruz <danielcristian> | ||||||
Component: | Unknown | Assignee: | Rich Megginson <rmeggins> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Chandrasekar Kannan <ckannan> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 1.1.3 | CC: | benl, jgalipea, nhosoi | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
URL: | https://www.redhat.com/archives/fedora-directory-users/2008-December/msg00086.html | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 8.1 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-04-29 23:08:55 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 249650, 493682 | ||||||||
Attachments: |
|
Description
Daniel Cristian Cruz
2008-12-12 19:38:34 UTC
I think the problem may be that operational attributes do not work with the compare operation. You tried with a regular attribute and compare works, correct? Yes, as shown in the thread, when used with a regular attribte it works. Just get error message using nsaccountlock. Created attachment 331887 [details]
cvs diff ldapserver/ldap/servers/plugins/cos/cos_cache.c
Description: Compare function for the CoS attribute cos_cache_cmp_attr failed to set the result.
By setting the right return code, the nsAccountLock matches true if the user's account is inactivated.
$ ldapcompare -D "cn=Directory Manager" -w <password> nsAccountLock:True "uid=tuser0,dc=example,dc=com"
comparing type: "nsAccountLock" value: "True" in entry "uid=tuser0,dc=example,dc=com"
compare TRUE
$ ldapcompare -D "cn=Directory Manager" -w <password> nsAccountLock:False "uid=tuser0,dc=example,dc=com"
comparing type: "nsAccountLock" value: "False" in entry "uid=tuser0,dc=example,dc=com"
compare FALSE
Note: once the user is activated, the compare command returns "No such attribute" (regardless of the value to compare, of course):
$ ldapcompare -D "cn=Directory Manager" -w <password> nsAccountLock:True "uid=tuser0,dc=example,dc=com"
comparing type: "nsAccountLock" value: "True" in entry "uid=tuser0,dc=example,dc=com"
ldap_compare: No such attribute
$ ldapcompare -D "cn=Directory Manager" -w <password> nsAccountLock:False "uid=tuser0,dc=example,dc=com"
comparing type: "nsAccountLock" value: "False" in entry "uid=tuser0,dc=example,dc=com"
ldap_compare: No such attribute
Created attachment 332061 [details]
cvs commit message
Reviewed by Rich (Thank you!!)
Checked in into CVS HEAD.
fix verifiedd DS 8.1 RHEL 5 Inactive User: [root@jennyv2 ~]# /usr/lib/mozldap/ldapcompare -D "cn=Directory Manager" -w Secret123 nsAccountLock:True "uid=ryan,ou=people,dc=example,dc=com" comparing type: "nsAccountLock" value: "True" in entry "uid=ryan,ou=people,dc=example,dc=com" compare TRUE [root@jennyv2 ~]# /usr/lib/mozldap/ldapcompare -D "cn=Directory Manager" -w Secret123 nsAccountLock:False "uid=ryan,ou=people,dc=example,dc=com" comparing type: "nsAccountLock" value: "False" in entry "uid=ryan,ou=people,dc=example,dc=com" compare FALSE Active User: [root@jennyv2 ~]# /usr/lib/mozldap/ldapcompare -D "cn=Directory Manager" -w Secret123 nsAccountLock:True "uid=ryan,ou=people,dc=example,dc=com" comparing type: "nsAccountLock" value: "True" in entry "uid=ryan,ou=people,dc=example,dc=com" ldap_compare: No such attribute [root@jennyv2 ~]# /usr/lib/mozldap/ldapcompare -D "cn=Directory Manager" -w Secret123 nsAccountLock:False "uid=ryan,ou=people,dc=example,dc=com" comparing type: "nsAccountLock" value: "False" in entry "uid=ryan,ou=people,dc=example,dc=com" ldap_compare: No such attribute An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-0455.html |