[Linux-ha-dev] Re: [Linux-HA] Heartbeat Signon Fails when called in a client thread..
lmb at suse.de
Thu Jun 24 01:53:03 MDT 2004
"Salman, Basith" <Basith.Salman at ca.com> said:
Let's move this to the -dev list, please.
> Signon to HB fails (although the error code from sigon is HA_OK) when
> called from a client thread as the client threads parent PID is
> compared with the thread id (from getsockopt's PEERCRED option), this
> is so on 2.4.21-4.0.1.EL linux kernel (redhat).
The heartbeat libraries are not thread-safe in general...
Though what ought to work (and I hope this is what you are doing) is to
have a single worker thread interface with heartbeat and gate all
heartbeat stuff through it. Is it this what you are doing?
> However,Since this is an issue with us working on OpenDLM I was
> wondering if this auth check for the pid could be ifdeffed out from
> open HB source as below in hb_api.c as:
> diff hb_api.c.orig hb_api.c
> > #ifdef FARSIDE_PID_CHECK
> > #endif
A unified diff would make it more obvious what you are really commenting
out here ;-) (I can see it from the context of the discussion of course,
but -u diffs are just easier to read and to merge after code changes.)
But no, that fix is not sufficient; it tries to prevent us from being
tricked into sending signals to random processes.
If anything, it'd at least need to make sure the F_PID at least belongs
to the same uid as the farside pid - so that the process cannot escalate
it's privileges this way.
But if it's a kernel bug, it really needs fixing in the kernel.
Lars Marowsky-Brée <lmb at suse.de>
High Availability & Clustering \ ever tried. ever failed. no matter.
SUSE Labs, Research and Development | try again. fail again. fail better.
SUSE LINUX AG - A Novell company \ -- Samuel Beckett
More information about the Linux-HA-Dev