Re: [squid-users] Fwd: Squid/Ecap Adapter unable to open RAW Socket

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 06 May 2014 23:22:54 +1200

On 6/05/2014 11:16 p.m., Jatin Bhasin wrote:
> Hello,
>
> icmp_sock = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
>
> The above command works fine in squid. But if I run the same command
> in my eCap adapter I get an error.
> EPERM (Operation not permitted).
>
> Can you please help? Is this related the way dll are handled in linux.

It is related to the application "effective user" permissions.

The Squid helper program which that code is in requires to be run with
root user privileges solely in order to do that. Whereas the main Squid
binary running your eCAP library is operating under a protected /
unprivileged user account when it processes HTTP traffic.

Why are you trying to do ICMP from an eCAP adaptor?

Amos
Received on Tue May 06 2014 - 11:23:03 MDT

This archive was generated by hypermail 2.2.0 : Tue May 06 2014 - 12:00:08 MDT