Ok, found it. Attached patch will reset new 2.5 getpeername behavior for
ORBIT.
What happens in 2.5 is the getpeername system call sets the
u.usock.sun_path to it's peer, while 2.4 leaves it empty.
So the patch just sets the u.usock.sun_path for the new connection to an
empty string[0] = '\0' after getpeername.
Got to talk to the kernel developers if that is a feature or a bug, my
guess is it's a bug in 2.4.
BTW, ximian uses 0.5.16 but has only the code for 0.5.15 on their site.
Can somebody fix that?
Have fun with 2.5,
Ronald
--- ORBit-0.5.15-old/src/IIOP/connection.c Mon Mar 11 05:40:02 2002
+++ ORBit-0.5.15-new/src/IIOP/connection.c Wed Oct 30 14:07:57 2002
@@ -459,6 +459,7 @@
fd_cnx->u.usock.sun_family = AF_UNIX;
getpeername(GIOP_CONNECTION_GET_FD(fd_cnx),
(struct sockaddr *)&fd_cnx->u.usock, &n);
+ fd_cnx->u.usock.sun_path[0] = '\0';
break;
#ifdef HAVE_IPV6