Allow user to open raw socket without "sudo"
I'm currently writing a C program that opens a raw Ethernet socket. When I run it at the commandline, I have to do "sudo", as follows:
sudo ./inp
I'm using the Code::Blocks IDE and I want to be able to use the debugging facilities in Code::Blocks. However, I'm having a problem with having to run the debugger as root; the debugger won't play fair with the IDE because the IDE is run as "toe" and the debugger is run as "root".
Is there anything I can do to make it so that I can open a raw socket without having to do "sudo"?
Of course, I realise I could run Code::Blocks as root, but I don't want to do that. Being able to do away with "sudo" for opening raw sockets would save the day. (Of course I wouldn't leave my system like that 24/7, I'd just use it for debugging my program).
|