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

"Victor Stanescu" <[email protected]> Fri, 6 Sep 2002 09:50:35 +0300
Newsgroups gmane.comp.djb.publicfile
Message-ID <010f01c25571$b440b480$5220fec1@VICTORH>
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.

----- 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 doesn't work under solaris as:
>
> $ 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
>
>