[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6977) ldapwhoami minor verbose bugfix patch submission



Full_Name: Chris Hecker
Version: 2.4.25
OS: centos 5.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (98.248.126.162)


Hi, ldapwhoami erroneously prints the "Result: Success (0)" string even if -v is
not specified due to a minor bug in the code.  Here is a fix.  I am running
2.3.43, but just checked the latest repository version and the bug is still
there (although at line 203 now), so I marked the version above as latest.

Thanks,
Chris


--- old/openldap-2.3.43/clients/tools/ldapwhoami.c  2008-02-11
17:24:07.000000000 -0600
+++ openldap-2.3.43/clients/tools/ldapwhoami.c  2011-06-21 14:15:28.000000000
-0500
@@ -215,7 +215,7 @@
 
 skip:
        if ( verbose || ( code != LDAP_SUCCESS ) ||
-               matcheddn || text || refs || ctrls )
+               (matcheddn && *matcheddn) || (text && *text) || refs || ctrls )
        {
                printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code
);