Bug 186621 - ldapdelete prints error message to stdout
ldapdelete prints error message to stdout
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
5
All Linux
low Severity low
: ---
: ---
Assigned To: Jay Fenlason
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-24 14:45 EST by W. Michael Petullo
Modified: 2014-08-31 19:28 EDT (History)
1 user (show)

See Also:
Fixed In Version: openldap-2.3.24-2.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-19 11:15:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description W. Michael Petullo 2006-03-24 14:45:28 EST
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:
Comment 1 W. Michael Petullo 2006-03-25 16:02:51 EST
See also http://www.openldap.org/its/index.cgi?findid=4453.
Comment 2 Dmitry Butskoy 2006-06-19 13:07:22 EDT
It seems to be fixed in the latest stable upstream 2.3.24 ...
Comment 3 W. Michael Petullo 2006-08-19 11:15:23 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.