Welcome, Guest
Username: Password: Remember me
CodeTyphon Platforms (Win32/64, GTK2/3/4, QT4/5/6, Cocoa, FpGUI etc) Development, discussions and problems
  • Page:
  • 1

TOPIC:

[tech tip] TIdIcmpClient on Linux 6 months 3 weeks ago #18502

  • Libaud
  • Libaud's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 23
  • Thank you received: 0
Hi
For those who develop with Linux as a target for example. If you use Indy components and especially TIdIcmpClient. It is common knowledge that it does not work.
And for good reason, the security features have greatly evolved in recent years. As for other OS (Windows, Mac...) moreover.
In fact, the concern that is not one, is that you must assign a "capabilities" to your binary. So that TIdIcmpClient can work properly. I refer you to the documentation and other tutorials available on the web for more details.
However, two commands to be aware of:
- getcap: to obtain the capabilities of a file or binary;
- setcap: to assign capabilities to a file or binary.
Like the ping binary, yours will have to have the cap_net_raw "capabilities".
You will need to root setcap 'cap_net_raw+ep' [mybinary]. [mybinary] representing the full path to the executable.
This will allow you to operate TIdIcmClient properly.
Frédéric Libaud, Digital Expert

Please Log in or Create an account to join the conversation.

  • Page:
  • 1