On Sat, 2013-01-26 at 23:45 +0100, Bálint Réczey wrote:
> Hi Ben,
> 
> 2013/1/26 Ben Hutchings <b...@decadent.org.uk>:
> > On Sat, 2013-01-26 at 00:08 +0100, Bálint Réczey wrote:
> >> tags 673038 patch upstream - moreinfo
> >> thanks
> >>
> >> Hi,
> >>
> >> Upstream seems to know about the problem and I provided a fix for them
> >> with a documentation update.
> >> Slapcat's exit code is 1 in case of missing entries thus an
> >> unsuccessful backup attempt can be detected.
> > [...]
> >
> > Really, that's not what it says here:
> > https://github.com/elmar/ldap-git-backup/blob/master/README.mdown#safe-ldif
> >
> > Is there an upstream bug fix that makes the exit code non-zero?
> Looking at slapcat.c the intention is returning 1 on errors while not
> all error cases seem to be covered:
> http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=servers/slapd/slapcat.c;h=6bd9293fe4e980dcd1d7d4a1ccd1a644062fb346;hb=HEAD
> 
> IMO the documentation should reflect the intention and the code should
> be fixed if it does not do what the documentation says.

I think we're all in agreement that the code should be fixed.  Please
help to do that, if you can.

The manual page in unstable doesn't say anything either way though the
'principle of least surprise' implies that slapcat should behave like
most Unix commands do: use stderr and non-zero exit code to report
failure.

Ben.

-- 
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to