Bug 1163461

Summary: Should not check aci syntax when deleting an aci
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: mreynolds, nkinder, rmeggins, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.3.1-9.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:37:02 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:

Description Noriko Hosoi 2014-11-12 18:17:27 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47953

Attempting to delete to specific aci will have the aci value's syntax checked.  So it makes it impossible to delete an aci if its syntax is invalid.  We should not check the syntax of aci if we are deleting it.

Comment 1 mreynolds 2014-11-12 20:21:19 UTC
Fixed upstream

Comment 3 Viktor Ashirov 2014-11-24 13:29:34 UTC
$ rpm -qa | grep 389
389-ds-base-1.3.3.1-9.el7.x86_64
389-ds-base-debuginfo-1.3.3.1-9.el7.x86_64
389-ds-base-libs-1.3.3.1-9.el7.x86_64

I did a fresh install of DS, imported ldif using ldif2db from https://fedorahosted.org/389/ticket/47953#comment:1 that contains aci with invalid syntax

Check if it was imported: 
$ ldapsearch -o ldif-wrap=no -LLL -x -H ldap://localhost:389 -D "cn=Directory Manager" -w Secret123 -b dc=example,dc=com -s base "(objectclass=*)" aci | grep fffff
aci: (targetattr ="fffff")(version 3.0;acl "Directory Administrators Group";allow (all) (groupdn = "ldap:///cn=Directory Administrators, dc=example,dc=com");)

Delete aci entry with invalid syntax: 
$ ldapmodify -D "cn=Directory Manager" -w Secret123  -H ldap://localhost:389  << EOF
dn: dc=example,dc=com
changetype: modify
delete: aci
aci: (targetattr ="fffff")(version 3.0;acl "Directory Administrators Group";al
 low (all) (groupdn = "ldap:///cn=Directory Administrators, dc=example,dc=com"
 );)
EOF

modifying entry "dc=example,dc=com"

Check if it was deleted: 
$ ldapsearch -o ldif-wrap=no -LLL -x -H ldap://localhost:389 -D "cn=Directory Manager" -w Secret123 -b dc=example,dc=com -s base "(objectclass=*)" aci | grep fffff
$ echo $?
1

Invalid aci entry was successfully deleted. Hence marking as VERIFIED.

Comment 5 errata-xmlrpc 2015-03-05 09:37:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html