SemiOT: filePro on FreeBSD chown gotcha

Jay R. Ashworth jra at baylink.com
Tue Jun 22 13:12:44 PDT 2004


On Tue, Jun 22, 2004 at 04:09:12PM -0400, Fairlight wrote:
> With neither thought nor caution, Jay Ashworth blurted:
> > On Tue, Jun 22, 2004 at 01:39:26PM -0400, Fairlight wrote:
> > > This public service announcement was brought to you by Jay Ashworth:
> > > > > Hate to tell you, but Solaris 7 and 8 both constrain chown() as well.
> > > > 
> > > > Did you have the impression I'd be surprised?  Polaris is BSD-based.
> > > 
> > > Bzzzzt.  SVR4-based.  SunOS 4.1.x was the last truly BSD-based Sun offering.
> > 
> > I thought it was still dual-universe.  No?
> 
> What do you mean, exactly, by dual-universe?  As I said, SunOS 4.1.x was
> wholly BSD-derived.  At the point they released the first Solaris, that was
> SVR4-based.  While SVR4 contains some BSD code, it's still SysV.

I believe that Solaris, the followup to SunOS -- it was effectively
SunOS 5 -- was one of the Unices that was "dual-universe": it would
allow you to comfortably run apps that expected either set of
semantics, depending on (among other things) how your $PATH was set.

I remember that the dual-universe systems handled semantic items like
what we're talking about (chown(2) semantics), but I don't remember
how; no one's cared for about 10 years.

> > I dunno; *my* interpretation of that manpage was that it was compliing
> > your *app* to use fchown that was what they meant.
> 
> Rereading what they say about the prototype for fchown only being available
> if _BSD_SOURCE is defined may indeed point to how you compile your
> application.  However, fchown is simply a chown that takes an open file
> descriptor instead of a pathname.  And -using- BSD would be the exact
> opposite of what you want, since it's the BSD variance that induces this
> "Not owner" type behaviour.

Indeed.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

                2004 Stanley Cup Champion Tampa Bay Lightning


More information about the Filepro-list mailing list