Mike Gerdts writes:
> I would like to get some eyes on my proposed fix for 6717067.
>
> http://cr.opensolaris.org/~mgerdts/6717067/
217: Too bad X11 has 'bogus share' disease ... I think I would have
used /usr/X11/man here instead (as that's really the proper path
for a man page), but it probably doesn't matter. (By "bogus
share," I'm referring to the fact that /usr/share is a special
mount location defined in filesystem(5) ... putting your own
directory under there is reasonable, but putting "share" into
some far-flung path makes no sense at all. Nobody's going to
share a bunch of random directories. In short, "/usr/share/foo/"
is right, and "/usr/foo/share" is wrong.)
3186: the logic appears to be backwards here. The original code used
"!=0" for the stat() check -- it was returning NULL when the
directory being stat'd didn't exist. This new code is returning
NULL when the directory _does_ exist, and non-NULL when it
doesn't.
The code should be simply:
if (stat(mand, &sb) == 0 && S_ISDIR(sb.st_mode))
return (mand);
free(mand);
return (NULL);
Other than that, it looks like this file doesn't (or shouldn't) pass
C-style, as it has non-compliant function definitions. Oh, well.
Don't bother fixing that if you don't feel up to it.
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677