> > "Todd C. Miller" <todd.mil...@courtesan.com> writes:
> >
> >> From source inspection, Net and Free appear to allow read(2) of
> >> dirs to succeed.  However, since Linux, Mac OS X and Solaris have
> >> the EISDIR behavior I think it is probably safe from a portability
> >> standpoint.
> >>
> >> We're long past the days when opendir(3)/readdir(3) used read(2)...
> >>
> >> HP-UX and AIX still allow reads of directories but no one cares
> >> about them ;-)
> >
> > So I think that we agree that EISDIR is more useful, and seems safe from
> > a portability POV.   I've built base and x sets on i386, and ajacoutot
> > ran the ports bulk builds.  The two offenders in the ports tree were due
> > to an unrelated glitch in base libtool which has since been fixed.
> 
> I've hold this for a few days until the release cycle comes back to an
> almost normal state.  But, as Theo points out, we have to think about the
> drawbacks.  Some configurations that do work right now are very likely
> to break.
> 
>   $ cat /; echo $?
>   cat: /: Is a directory
>   1
> 
> is only a trivial example.
> 
> I still think that it is better to error out instead of, for example,
> silently ignoring invalid/mistyped CLI arguments and config parameters.
> But I don't want to mindlessly break people's setups behind their backs,
> so I'd like to hear more opinions and... *test reports*.

The change will affect a huge number of program in significant ways.
I am waiting for people to actually try itd, and I haven't been seeing
that.

I don't like the cat example above.  It does not actually expose the
full change in behaviour from this simple program.  Here is a better
example:

   % cat / /etc/shells; echo $?
   #       $OpenBSD: shells,v 1.8 2009/02/14 17:06:40 sobrado Exp $
   #
   # list of acceptable shells for chpass(1).
   # ftpd(8) will not allow users to connect who are not using
   # one of these shells, unless the user is listed in /etc/ftpchroot.
   /bin/sh
   /bin/csh
   /bin/ksh
   0
   %

Will become:

   % cat / /etc/shells; echo $?
   cat: /: Is a directory
   1
   %

The semantic will cause a subtle behavioural difference in hundreds
of programs.

Reply via email to