Sun, sockets, and 4.3

der Mouse mouse at mcgill-vision.UUCP
Thu Nov 24 11:43:59 AEST 1988


In article <1358 at mcgill-vision.UUCP>, mouse at mcgill-vision.UUCP (der Mouse) writes:
> [I had a use for AF_UNIX access rights passing]  I just got it all to
> the point where it ought to work and now I find out that Sun 3.5
> doesn't support passing access rights over UNIX domain sockets.

> [asking for help, with various swipes at Sun]

After exchanging letters with a couple of people at Sun and hacking on
my code a bit, I can now report:

- Sun 3.5 does not support passing access rights in the way 4.3 does.

- It does support it in some form, which I am told is the way 4.2 does.
  I can't check this personally, not having a 4.2 machine around.

- The support that is there works, with a couple of minor glitches.

In addition, I believe I was harsher on Sun than the situation called
for, for which I would like to apologize.

The glitches:

- Using sizeof(struct sockaddr_un) as an address size (eg, the third
  argument to bind() does not work.  This is because sizeof(sun_path)
  is odd, so the structure gets padded....

- Using sizeof(struct sockaddr_un)-1 in the mh_namelen field for a
  sendto() produced panic: sbappendaddr.  I had to use
  strlen(foo.sun_path)+3, which is ugly because that 3 is unobvious.

I have been told that the first of these was present in 4.2; presumably
the other is too.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.wizards mailing list