Bug 186621 - ldapdelete prints error message to stdout
Summary: ldapdelete prints error message to stdout
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 5
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-24 19:45 UTC by W. Michael Petullo
Modified: 2014-08-31 23:28 UTC (History)
1 user (show)

Fixed In Version: openldap-2.3.24-2.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-19 15:15:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description W. Michael Petullo 2006-03-24 19:45:28 UTC
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 21:02:51 UTC
See also http://www.openldap.org/its/index.cgi?findid=4453.

Comment 2 Dmitry Butskoy 2006-06-19 17:07:22 UTC
It seems to be fixed in the latest stable upstream 2.3.24 ...

Comment 3 W. Michael Petullo 2006-08-19 15:15:23 UTC
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.