Opening RAW sockets in linux without being superuser

前端 未结 2 1079
余生分开走
余生分开走 2021-02-11 02:22

I have to write a ping function to run on Linux. The language is C++, so C if fine too.

Searching on the Internet and looking at the source code for the ping

2条回答
  •  悲哀的现实
    2021-02-11 02:58

    You can make your program a SUID command, granting it effectively root permissions, without granting them to the executing user. For an example and explanation see here.

提交回复
热议问题