Bug 190724
Summary: | ACIs need to be evaluated before password syntax is checked | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Nathan Kinder <nkinder> | ||||||||
Component: | Security - Password Policy | Assignee: | Nathan Kinder <nkinder> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 1.0 | ||||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-12-07 16:49:18 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: | 152373, 208654, 240316 | ||||||||||
Attachments: |
|
Description
Nathan Kinder
2006-05-04 18:34:25 UTC
Created attachment 128620 [details]
CVS Diffs
Created attachment 128660 [details]
Revised Diffs
In response to Rich's review of the fix, a few things have been changed.
Instead of searching for the target entry to check the ACIs in modify.c, I now
simply create a new Slapi_Entry that only has the dn set. This is all that is
needed when calling slapi_acl_check_mods(), and it should have better
performance than fetching the real entry. I also fixed a confusing piece of
code where an array of LDAPMod elements is created from the single userPassword
LDAPMod in modify.c.
Checked into ldapserver (HEAD). Reviewed by Rich (thanks!). Checking in add.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/add.c,v <-- add.c new revision: 1.7; previous revision: 1.6 done Checking in modify.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v <-- modify.c new revision: 1.10; previous revision: 1.9 done Created attachment 128671 [details]
Additional diff to fix HP-UX PA compilation error
The previos code fails to build on HP-UX PA because it doesn't like the way we
initialize the LDAPMod array in modify.c. Strangely, it works fine on HP-UX
IPF. This change shoudl fix the build on PA.
Checked in additional fix for HP-UX PA compilation error. Checking in modify.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v <-- modify.c new revision: 1.11; previous revision: 1.10 done Verification test: PASS Test machine: cypher.dsdev.sjc.redhat.com (REHL 64bit) Test steps: 1. setup DS on cypher 2. access "cn=config" as anonalymous (ensure anonalymous access success) 3. change password for user "cn=directory manager" as anonalysis Except result : access denial Actual result : access denied , test passed acutal test output: [yzhang@cypher en]$ /usr/lib64/mozldap/ldapsearch -h cypher -p 389 -s sub -b "cn=config" objectclass=* "*" version: 1 dn: cn=SNMP,cn=config objectClass: top objectClass: nsSNMP cn: SNMP nsSNMPEnabled: on nsSNMPName: [yzhang@cypher tmp]$ /usr/lib64/mozldap/ldapmodify -h cypher -p 389 -a -f ./changepw.ldif modifying entry cn=Directory Administrators, dc=dsdev, dc=sjc, dc=redhat, dc=com ldap_modify: Insufficient access ldap_modify: additional info: Insufficient 'write' privilege to the 'password' attribute of entry 'cn=directory administrators,dc=dsdev,dc=sjc,dc=redhat,dc=com'. Data file used [yzhang@cypher tmp]$ cat < changepw.ldif dn: cn=Directory Administrators, dc=dsdev, dc=sjc, dc=redhat, dc=com changetype: modify replace: password password: newpassword nsSNMPOrganization: nsSNMPLocation: nsSNMPContact: nsSNMPDescription: nsSNMPMasterHost: nsSNMPMasterPort: |