Re: publicfile on solaris, issues with file/dev/tcp

adam morley <[email protected]> Fri, 6 Sep 2002 23:56:30 -0700
Newsgroups gmane.comp.djb.publicfile
Message-ID <[email protected]>
On Fri, Sep 06, 2002 at 09:50:35AM +0300, Victor Stanescu wrote:
> I wonder why it didn't worked for you by default. You are right about the
> code, still, on three different solaris/sparc boxes, it works for me without
> the patch.

I've not actually tried it (should've mentioned this), I was more trying to say that it doesn't work to make tcp 11,42, as that's not the major/minor for tcp under solaris.  i also corrected my own post below.

it might work, i dont really know, but i think ill try it with the patch just to be consistant

> 
> ----- Original Message -----
> From: "adam morley" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, September 05, 2002 11:56 PM
> Subject: publicfile on solaris, issues with file/dev/tcp
> 
> 
> > configure from publicfile seems to have a hardcoded major/minor number for
> > file/dev/tcp:
> >
> > if (mknod("file/dev/tcp",S_IFCHR | 0667,makedev(42,0)) == -1)

this should be:

  if (mknod("file/dev/tcp",S_IFCHR | 0667,makedev(11,42)) == -1)

> >
> > this doesn't work under solaris as:

or so i think.

> >
> > $ ls -lL /dev/tcp
> > crw-rw-rw-   1 root     sys       42,  0 Jul  3 22:47 /dev/tcp
> >
> > so i wrote a patch:
> >
> > $ diff configure.c configure.c.orig
> > 166,168c166
> > <   struct stat dev_tcp;
> > <   stat("/dev/tcp", &dev_tcp);
> > <   if
> (mknod("file/dev/tcp",dev_tcp.st_mode,makedev(major(dev_tcp.st_rdev),minor(d
> ev_tcp.st_rdev))) == -1)
> > ---
> > >   if (mknod("file/dev/tcp",S_IFCHR | 0667,makedev(11,42)) == -1)
> >
> > but I'm wondering if file/dev/tcp really needs to be 667 not 666 as it is
> on
> > solaris. (ie: is this a publicfile thing?)
> >
> > and yes, I'm not checking the return of stat, but I figure if you've got
> it
> > then why check it.
> >
> > thanks in advance, sorry if this is a rerun, but I couldn't find the
> archives
> >
> > oh, and I didn't see an announce list for new version announcements --- do
> > such announcements go here?
> >
> > adam
> >
> >
>