On 04/06/2014 19:23, A. Fortuny wrote: > Le 4/06/2014 17:01, Reinier Olislagers a écrit : >> On 04/06/2014 16:54, Michael Van Canneyt wrote: >>> On Wed, 4 Jun 2014, A. Fortuny wrote: >>>> How to gain temporarily root privileges in a pascal program ? I >>>> need to 'ping' an IP address and for ping to work (Indy 10) I need >>>> to be root. >> Why do you need root to ping? You could set up sudo to allow > The program I intend to make will be developed as a service "pinging" on > a regular basis remote stations just to see if they are alive. The way > that Indy implements ICMP protocol means that "pinger" socket is > available only under root permission. The same test programs which fails > under normal user succeeds under root. > This is clearly stated in Indy FAQ. Read http://www.indyproject.org/KB/ > for this subject and associated questions. I'll take your word for it that Indy states that.
As I tried to indicate though, the time that you only had root and non root in *nix is over. Perhaps this http://linux.die.net/man/7/capabilities could help. I haven't kept up with this (currently only involved with Linux as a personal user), don't know if/how SELinux etc influence this -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
