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

RE: ldapcompare tool (ITS#1560)

I resubmitted the patch, it's now /incoming/costlow-020128-ldapcompare.tar.gz. 
Sorry for not replying through the ITS, it wouldn't let me reply without logging in. 

1) removed -a deref option 
2) removed -l timelimit option 
3) changed -q to -z for forward compatibility. 
4) added ldif-style base64 encoding for binary attributes. 
5) updated man page for all the above. 

I didn't add URL support nor testXXX-compare ability. 

-----Original Message----- 
From: Kurt D. Zeilenga [<mailto:Kurt@OpenLDAP.org>mailto:Kurt@OpenLDAP.org] 
Sent: Monday, January 28, 2002 2:53 PM 
To: Jeff Costlow 
Cc: openldap-its@OpenLDAP.org 
Subject: Re: ldapcompare tool (ITS#1560) 

At 01:57 PM 2002-01-28, j.costlow@f5.com wrote: 
>Full_Name: Jeff Costlow 
>Version: HEAD 
>OS: Linux, freeBSD 
>URL: <ftp://ftp.openldap.org/incoming/>ftp://ftp.openldap.org/incoming/ 
>Submission from: (NULL) ( 

The URL for this contribution is: 

A few comments: 

>An ldapcompare implementation, including a man page. Built against 2.0.21, but 
>should apply cleanly to HEAD. 
>To apply copy the tar file into your topdir, and untar it.  3 files are 
>Apply the patch: 
>patch -p0 <ldapcompare.patch. 
>The patch file only patches clients/tools/Makefile.in to know about the new 
>ldapcompare.c.  The new man page will be noticed at maketime. 
>I basically just beat up ldapsearch, so i left in some options, like 
>dereferencing and timelimits, that may not mean anything. 

Starting from ldapdelete would likely have been better, it 
doesn't have all the search specific options.  So, no cruft 
to clean up. 

Anyways, please do remove all the search specific options. 

>The good side is that 
>all the options are the same. 
>I wanted a mode for shell scripts, so there is a new option -q that will never 
>write anything out, but will return 5 for LDAP_COMPARE_FALSE, 6 for 
>LDAP_COMPARE_TRUE.  If you don't use -q, then both LDAP_COMPARE_FALSE and 
>LDAP_COMPARE_TRUE will return 0.  This keeps with the tradition of returning 0 
>on success. 

-q is reserved for later use (across all ldap*(1) tools). 
-z would be a better choice. 

>Support for comparing binary attributes would probably require an option for 
>file support and would pass in a ber_value to do_compare instead of a char*. 

I suggest supporting base64 encoded assertion values. 
I'd suggest using an LDIFv1 like syntax: 

extra credit for URL support. 

And bonus points for a testXXX-compare test.