I'm trying to run my favourite game under Wine but it fails here:
From icmp.c:
Code: Select all
int sid=socket(AF_INET,SOCK_RAW,IPPROTO_ICMP);
if (sid < 0) {
ERR_(winediag)("Failed to use ICMP (network ping), this requires special permissions.\n");
Code: Select all
sudo setcap cap_net_raw+epi /usr/bin/wine
But it didn't help me (I don't know why). I'm trying to investigate this problem.Capabilities set on wine do inherit threw. Wine is coded that way
First, I did strace for wine (I have also assigned the same capability for strace) and it showed
Code: Select all
3848 execve("/usr/bin/wine", ["wine", "C:\\Games\\Lineage\\L2.exe"], [/* 27 vars */]) = 0
......
3848 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7821728) = 3869
......
3869 clone(child_stack=0x2d3f494, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x2d3fbd8, {entry_number:7, base_addr:0x2d3fb70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x2d3fbd8) = 3896
......
3896 socket(PF_INET, SOCK_RAW, IPPROTO_ICMP <unfinished ...>
3869 mprotect(0x2050c000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC <unfinished ...>
3896 <... socket resumed> ) = -1 EPERM (Operation not permitted)
3869 <... mprotect resumed> ) = 0
3896 write(2, "err:winediag:IcmpCreateFile Fail"..., 98 <unfinished ...>
Code: Select all
clone(Process 3841 attached
child_stack=0xb77bc494, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb77bcbd8, {entry_number:6, base_addr:0xb77bcb70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb77bcbd8) = 3841
.......
[pid 3841] socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3
Thanks in advance