Lily Li writes:
> <blockquote cite="mid:18862.36218.789866.874548 at gargle.gargle.HOWL"

Please use plain text in ARC messages, if at all possible.

> If there are no setuid binaries involved, then how exactly does the
> "ping" (-p) option work?
> 
>   </pre>
> </blockquote>
> In fact, shmux use 'fping' instead of 'ping' to test if the target is
> alive or not, and it only does ping test when '-p' option is
> provided(see below, in shmux manpage). And checking with fping source
> codes, 'fping' also does not use 'ping' inside, it uses socket call.<br>

OK, then, my question is still the same: how does that work?

% fping zhadum
fping: can't create raw socket : Permission denied
% 

'fping' (as currently delivered on Solaris and OpenSolaris) requires
privileges that ordinary users don't have.  How do you plan to make
shmux work reliably?

> -bash-3.2$ shmux -p -r rsh -c "uname -a" pollen<br>
> <font color="#ff0000">&nbsp;shmux! fping: can't create raw socket :
> Permission denied<br>

Right; it doesn't work.

> -bash-3.00$ shmux -p -r rsh -c "uname -a" pollen<br>
> <font color="#ff0000">&nbsp;shmux! Fatal error for fping: execv(fping): No
> such file or directory<br>

I'm having trouble reading through the HTML, but that doesn't look
right at all.  If you depend on fping being installed, then you should
have a package dependency on SUNWfping so you can _guarantee_ that it
is present.  It shouldn't just break apart in the user's hands.

> As a result, shmux depends on whether the fping has been installed with
> setuid or not, it does not have setuid itself.<br>

Users can't set the 'setuid' bit on /usr/bin/fping in any reliable
way.  The permission bits for packaged software are controlled by
packaging.  Moreover, given the nature of the program, they almost
certainly should *not* set that bit.

In other words, if it doesn't ship in a way that's functional for your
purposes, then you can't depend on users hacking around the problem.

One complicated way out of this would be to file a bug against fping
(perhaps some options should work by default but don't), and then make
integration of shmux dependent on that fix.

Another much simpler answer would be to change the code to use regular
/usr/sbin/ping, which *does* have the right privileges and *does* work
for ordinary users.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to