From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482AbcLBXTO (ORCPT ); Fri, 2 Dec 2016 18:19:14 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33739 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbcLBXTM (ORCPT ); Fri, 2 Dec 2016 18:19:12 -0500 Date: Fri, 2 Dec 2016 15:18:10 -0800 From: Stephen Hemminger To: Eric Dumazet Cc: Isaac Boukris , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iproute2: ss: escape all null bytes in abstract unix domain socket Message-ID: <20161202151810.4fab9504@xeon-e3> In-Reply-To: <1480705196.18162.381.camel@edumazet-glaptop3.roam.corp.google.com> References: <1477768820-1295-1-git-send-email-iboukris@gmail.com> <20161112101729.4d400929@samsung9> <1480705196.18162.381.camel@edumazet-glaptop3.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 02 Dec 2016 10:59:56 -0800 Eric Dumazet wrote: > On Sat, 2016-11-12 at 10:17 +0300, Stephen Hemminger wrote: > > On Sat, 29 Oct 2016 22:20:19 +0300 > > Isaac Boukris wrote: > > > > > Abstract unix domain socket may embed null characters, > > > these should be translated to '@' when printed by ss the > > > same way the null prefix is currently being translated. > > > > > > Signed-off-by: Isaac Boukris > > > > Applied > > Probably not a good idea to have : > > for (int i = 0; i < len; i++) > if (name[i] == '\0') > name[i] = '@'; > > ss.c: In function 'unix_show_sock': > ss.c:3128:4: error: 'for' loop initial declarations are only allowed in C99 mode > ss.c:3128:4: note: use option -std=c99 or -std=gnu99 to compile your code > make[1]: *** [ss.o] Error 1 > > > Thanks, fixed by patch from Simon