No subject
Tue Feb 23 11:03:59 CST 2010
Code:
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");
I have read at this forum that the best solution is to assign Wine required capability. I have done this using
Code:
sudo setcap cap_net_raw+epi /usr/bin/wine
As oiaohm written here http://forum.winehq.org/viewtopic.php?t=7588
>
> Capabilities set on wine do inherit threw. Wine is coded that way
>
But it didn't help me (I don't know why). I'm trying to investigate this problem.
First, I did strace for wine (I have also assigned the same capability for strace) and it showed
Code:
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 ...>
Second, I wrote a simple program that starts second thread and creates raw socket and it didn't fail after assigning it the same capability. Here is strace:
Code:
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
Where is my fault?
Thanks in advance
More information about the wine-users
mailing list