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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Dec 2014 10:31:53 +0200
From:	Vadim Kochan <vadim4j@...il.com>
To:	Mahesh Bandewar <maheshb@...gle.com>
Cc:	netdev <netdev@...r.kernel.org>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Vadim Kochan <vadim4j@...il.com>,
	Saied Kazemi <saied@...gle.com>
Subject: Re: [PATCH Iproute2 next] ip netns: 'ip netns id' cmd without
 argument should not give error

On Thu, Dec 18, 2014 at 10:05:38PM -0800, Mahesh Bandewar wrote:
> The command 'ip netns identify' without PID parameter is supposed to
> use the self PID to identify its ns but a trivial error prevented it
> from doing so. This patch fixes that error.
> 
> So before the patch -
> 	# ip netns id
> 	No pid specified
> 	# echo $?
> 	1
> 	#
> 
> After the patch -
> 	# ip netns id
> 	test-ns
> 	# echo $?
> 	0
> 	#
> 
> Signed-off-by: Mahesh Bandewar <maheshb@...gle.com>
> Cc: Stephen Hemminger <stephen@...workplumber.org>
> Cc: Vadim Kochan <vadim4j@...il.com> 
> Cc: Saied Kazemi <saied@...gle.com>
> ---
>  ip/ipnetns.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ip/ipnetns.c b/ip/ipnetns.c
> index 1c8aa029073e..ec9afa2177a5 100644
> --- a/ip/ipnetns.c
> +++ b/ip/ipnetns.c
> @@ -298,7 +298,7 @@ static int netns_identify(int argc, char **argv)
>  	DIR *dir;
>  	struct dirent *entry;
>  
> -	if (argc < 1) {
> +	if (!argc) {
>  		pidstr = "self";
>  	} else if (argc > 1) {
>  		fprintf(stderr, "extra arguments specified\n");
> -- 
> 2.2.0.rc0.207.ga3a616c
> 

Hi Mahesh,

I did not get such error on the current master branch?

Did I miss something ?

Regards,
Vadim Kochan
--
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