Re: [PATCH v2 net-next] net: Deprecate SO_DEBUG and reclaim SOCK_DBG bit.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14.02.24 20:54, Kuniyuki Iwashima wrote:
> +	case SO_DEBUG:
> +		/* deprecated, but kept for compatibility */
> +		if (val && !sockopt_capable(CAP_NET_ADMIN))
> +			ret = -EACCES;
> +		return 0;

Setting ret has no effect here. Maybe you mean something like:
> +		if (val && !sockopt_capable(CAP_NET_ADMIN))
> +			return -EACCES;
> +		return 0;

or 

return (val && !sockopt_capable(CAP_NET_ADMIN)) ? -EACCESS : 0;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux