wine ICMP code

Francois Gouget fgouget at free.fr
Tue Feb 4 12:10:02 CST 2003


On Sat, 25 Jan 2003, Jason Algol wrote:
>
> hi guys, in dlls/icmp/icmp_main.c would it be possible to use
> system("/bin/ping...");  if not running as uid 0?, (or using pipes if the
> ouput needs to be parsed) as /bin/ping is obviously usually suid root and if
> the required options are available as  arguments to /bin/ping then wine can
> do as requested without running as root, this would be useful to me with
> something im working on.

There are two issues with this approach:
 * ping does not give you complete control of the packet that is sent,
especially for the TTL, IP options and contents of the packet. For the
contents of the packet you can cheat and just do as if you sent the
proper content, it is unlikely to make any difference. However the TTL
and IP options are more likely to have an impact on the result of the
probe so they cannot be ignored if anything special is specified. But
hopefully that would not be too common (of course the application I
worked on when working on the ICMP dll was the Windows port of bing
which systematically modifies the ttl).
 * the command line options and output of ping programs varies a lot
between Linux (GNU), FreeBSD and Solaris. It's probasbly going to be a
bit tricky to handle these differences cleanly.


> if you guys do consider it a possibility, i would be willing to research it
> and write the patch, id just like the go-ahead from you :) if you can think
> of any other way round it, id be greatful to hear your suggestions.

I would not object to it as long as it complements the current code
(which seems to be your intention :-).

<disclaimer>But I'm not the one with commit access.</disclaimer>

-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
               RFC 2549: ftp://ftp.isi.edu/in-notes/rfc2549.txt
                IP over Avian Carriers with Quality of Service




More information about the wine-devel mailing list