[Linux-ha-dev] ipctest etc.
Alan Robertson
alanr at unix.sh
Fri Oct 1 15:18:07 MDT 2004
David Lee wrote:
> I'm peering into the depths of "lib/clplumbing/ipcsocket.c" with a view to
> making it work properly on Solaris including, potentially, authorisation.
>
> Alongside that file is a test program, "ipctest" which is proving most
> useful. But it doesn't seem to explore all the corners of "ipcsocket.c".
> Only those invoked by opening "ipcsocketpair" seem used, not those from
> (what would normally be) independent places. That is, the following
> routines (at least) don't seem to be exercised:
> socket_accept_connection()
> socket_initiate_connection()
> socket_wait_conn_new()
> socket_client_channel_new()
>
> (I'm using STABLE_1_2 CVS, should that detail be relevant.)
>
> Anyone know of any existing analogous testing things for those routines?
No.
It was written to track down a series of bugs in the message passing part
of the IPC code - which don't care where the sockets came from. I did them
that way because it was easy ;-) This is by far the trickiest part.
But, it would be easy enough to put in a simple authorization test anyway...
verify that your peer's user id is the same as yours.
Verify that your peer's group id is the same as yours.
(this won't work with Andrew's authentication code)
I asked Andrew to add his authentication code to CVS. He said he'd try
and get to that Monday.
There is a better way to do this on Solaris (using streams), but no one has
written this code yet ;-).
--
Alan Robertson <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
More information about the Linux-HA-Dev
mailing list