Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1338872

Summary: Wrong result code display in audit-failure log
Product: Red Hat Enterprise Linux 7 Reporter: Kamlesh <kchaudha>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: kbanerje, nkinder, rmeggins
Target Milestone: pre-dev-freeze   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.5.7-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:42:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kamlesh 2016-05-23 14:29:19 UTC
Description of problem:
After the modifying entry in DS using the wrong object, it display error on console with error code 32 but in audit-failure log it display result -1 

Version-Release number of selected component (if applicable):
10.3.5.3

How reproducible:
Always 



Steps to Reproduce:
1. ldapmodify -D "cn=Directory Manager" -w test1234 -p 14000 -h test.example.com
dn: uid=test,ou=People,dc=example,dc=com
changetype:modify
replace:sn
sn:balu

2.

3.

Actual results:

modifying entry "uid=test,ou=People,dc=example,dc=com"
ldap_modify: No such object (32)
	matched DN: ou=People,dc=example,dc=com


in Log audit-filure log 
time: 20160523194032
dn: uid=test,ou=People,dc=example,dc=com
result: -1
changetype: modify
replace: sn
sn: balu
-
replace: modifiersname
modifiersname: cn=directory manager
-
replace: modifytimestamp
modifytimestamp: 20160523141032Z


Expected results:

time: 20160523194032
dn: uid=test,ou=People,dc=example,dc=com
result: 32
changetype: modify
replace: sn
sn: balu
-
replace: modifiersname
modifiersname: cn=directory manager
-
replace: modifytimestamp
modifytimestamp: 20160523141032Z

Additional info:

Comment 2 Noriko Hosoi 2016-06-16 17:43:15 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/48892

Comment 4 Kamlesh 2016-06-28 13:12:19 UTC
Bug Verified 
Steps performs 

[root@test /]# rpm -qa | grep 389-ds
389-ds-base-1.3.5.8-1.el7.x86_64


Step 1) Enable the Audit and Audit Failure log. Fail log update in Audit log file 
[root@test yum.repos.d]# ldapmodify -D "cn=Directory Manager" -h localhost -p 389 -w test1234  << EOF
> dn: cn=config
> changetype: modify
> replace: nsslapd-auditlog-logging-enabled
> nsslapd-auditlog-logging-enabled: on
> -
> replace: nsslapd-auditfaillog-logging-enabled
> nsslapd-auditfaillog-logging-enabled: on
> EOF

Step 2) Add Entry which give no such object error
[root@test yum.repos.d]# ldapmodify -D "cn=Directory Manager" -w test1234 -p 389 -h test.example.com << EOF
> dn: uid=test,ou=People,dc=example,dc=com
> changetype:modify
> replace:sn
> sn: test
> EOF

modifying entry "uid=test,ou=People,dc=example,dc=com"
ldap_modify: No such object (32)
	matched DN: ou=People,dc=example,dc=com

Log entry in the : /var/log/dirsrv/slapd-test/audit
time: 20160627181142
dn: uid=test,ou=People,dc=example,dc=com
result: 32
changetype: modify
replace: sn
sn: test
-
replace: modifiersname
modifiersname: cn=directory manager
-
replace: modifytimestamp
modifytimestamp: 20160627124142Z
-

Step 3) enable the Audit failure log parameters
[root@test yum.repos.d]# ldapmodify -D "cn=Directory Manager" -h localhost -p 389 -w test1234  << EOF
> dn: cn=config
> changetype: modify
> add: nsslapd-auditfaillog
> nsslapd-auditfaillog: /var/log/dirsrv/slapd-test/audit-failure
> -
> add: nsslapd-auditfaillog-mode
> nsslapd-auditfaillog-mode: 600
> -
> add: nsslapd-auditfaillog-maxlogsize
> nsslapd-auditfaillog-maxlogsize: 1
> -
> add: nsslapd-auditfaillog-logrotationtime
> nsslapd-auditfaillog-logrotationtime: 1
> -
> add: nsslapd-auditfaillog-logrotationtimeunit
> nsslapd-auditfaillog-logrotationtimeunit: Day
> -
> add: nsslapd-auditfaillog-maxlogsperdir
> nsslapd-auditfaillog-maxlogsperdir: 10
> EOF

Step 4) Add Entry which give no such object error
[root@test yum.repos.d]# ldapmodify -D "cn=Directory Manager" -w test1234 -p 389 -h test.example.com << EOF
> dn: uid=test,ou=People,dc=example,dc=com
> changetype:modify
> replace:sn
> sn: test
> EOF

Result : 
modifying entry "uid=test,ou=People,dc=example,dc=com"
ldap_modify: No such object (32)
	matched DN: ou=People,dc=example,dc=com

Log entry in the : /var/log/dirsrv/slapd-test/audit-failure

time: 20160627180025
dn: uid=test,ou=People,dc=example,dc=com
result: 32
changetype: modify
replace: sn
sn: test
-
replace: modifiersname
modifiersname: cn=directory manager
-
replace: modifytimestamp
modifytimestamp: 20160627123025Z

Comment 7 errata-xmlrpc 2016-11-03 20:42:10 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-2016-2594.html