开发者

Building with QtCreator and giving capability to Pcap

I am building a sniffer with Qt as GUI, pcap as capture library and QtCreator as GUI under Ubuntu 10.04.

Problem is: Before I can capture packets, since my app is not meant to be run as root, I need to

sudo setcap cap_net_raw,cap_net_admin=eip my_program

and at every build, this capability is overwr开发者_Go百科itten. Any idea how i can automate this process using QtCreator? I tried to add the command to the build steps after the Make step, but it doesn't seem to work that way, probably because of the "sudo" required...

Thank you!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜