Andi Kleen wrote: > On Friday 17 November 2006 09:07, Hasso Tepper wrote: > > I have process which drops root privileges after startup and retains > > only some privileges using CAP_NET_ADMIN and CAP_SYS_ADMIN > > capabilities. I can change values in /proc/sys/net/ipv[46]/* (like > > turning forwarding on/off) from this process using sysctl syscall, > > but I can't write directly into /proc/sys/net/ipv[46]/* from it. > > That sounds more like a security bug than a feature to be preserved.
Why? IMHO it's normal that process with CAP_NET_ADMIN capabilities can modify settings in /proc/sys/net/. From /usr/include/sys/capability.h: /* Allow interface configuration */ /* Allow administration of IP firewall, masquerading and accounting */ /* Allow setting debug option on sockets */ /* Allow modification of routing tables */ /* Allow setting arbitrary process / process group ownership on sockets */ /* Allow binding to any address for transparent proxying */ /* Allow setting TOS (type of service) */ /* Allow setting promiscuous mode */ /* Allow clearing driver statistics */ /* Allow multicasting */ /* Allow read/write of device-specific registers */ /* Allow activation of ATM control sockets */ #define CAP_NET_ADMIN 12 regards, -- Hasso Tepper Elion Enterprises Ltd. [AS3249] Data Communication Network Administrator - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/