Description of problem: The ldapdelete command prints its error message to standard out. However, the manpage states, "Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error." Version-Release number of selected component (if applicable): openldap-clients-2.3.19-4 How reproducible: Every time Steps to Reproduce: 1. Try to delete an LDAP object that does not exist; execute a command like: ldapdelete -x -D cn=Manager,dc=flyn,dc=org -W "cn=Domain Users,ou=Group,dc=flyn,dc=org" 2> /dev/null 2. Execute "echo $?" to confirm exit status is non-zero. 3. Notice that ldapdelete printed error to standard out. Actual results: The following was printed: Delete Result: No such object (32) Matched DN: ou=group,dc=flyn,dc=org Expected results: The exit status was non-zero. According to the manpage the error message should go to standard error. Additional info:
See also http://www.openldap.org/its/index.cgi?findid=4453.
It seems to be fixed in the latest stable upstream 2.3.24 ...
Seems fixed: [mike@imp ~]$ ldapdelete -x -D cn=Manager,dc=flyn,dc=org -W "cn=Domain Users,ou=Group,dc=flyn,dc=org" > /dev/null Enter LDAP Password: ldap_delete: No such object (32) matched DN: ou=group,dc=flyn,dc=org Notice that the error message now goes to stderr.