lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <50A114D4.4040201@linux-ipv6.org>
Date:	Tue, 13 Nov 2012 00:25:08 +0900
From:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
To:	Jan Synacek <jsynacek@...hat.com>
CC:	netdev@...r.kernel.org, YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCH] ping: Wrap SO_BINDTODEVICE with the correct capability.

Jan Synacek wrote:
> 
> Signed-off-by: Jan Synacek <jsynacek@...hat.com>
> ---
>  ping.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/ping.c b/ping.c
> index 2f70cec..c958f1a 100644
> --- a/ping.c
> +++ b/ping.c
> @@ -316,6 +316,9 @@ main(int argc, char **argv)
>  			struct ifreq ifr;
>  			memset(&ifr, 0, sizeof(ifr));
>  			strncpy(ifr.ifr_name, device, IFNAMSIZ-1);
> +
> +			enable_capability_raw();
> +
>  			if (setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device,
> strlen(device)+1) == -1) {
>  				if (IN_MULTICAST(ntohl(dst.sin_addr.s_addr))) {
>  					struct ip_mreqn imr;
> @@ -331,6 +334,8 @@ main(int argc, char **argv)
>  					}
>  				}
>  			}
> +
> +			disable_capability_raw();
>  		}
> 
>  		if (settos &&
> 

Oh, you're right.  Applied, thank you.

--yoshfuji
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ