From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 78063568A for ; Mon, 9 Nov 2015 04:51:05 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 08 Nov 2015 19:51:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,264,1444719600"; d="scan'208";a="831239688" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by fmsmga001.fm.intel.com with ESMTP; 08 Nov 2015 19:51:02 -0800 Date: Mon, 9 Nov 2015 11:54:34 +0800 From: Yuanhan Liu To: Jianfeng Tan Message-ID: <20151109035434.GG2326@yliu-dev.sh.intel.com> References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1446748276-132087-6-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446748276-132087-6-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: nakajima.yoshihiro@lab.ntt.co.jp, zhbzg@huawei.com, mst@redhat.com, dev@dpdk.org, oscar.zhangbo@huawei.com, gaoxiaoqiu@huawei.com, ann.zhuangyanying@huawei.com, zhoujingbin@huawei.com, guohongzhen@huawei.com Subject: Re: [dpdk-dev] [RFC 5/5] vhost/container: change mode of vhost listening socket X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2015 03:51:05 -0000 On Fri, Nov 06, 2015 at 02:31:16AM +0800, Jianfeng Tan wrote: > Change vhost listening socket mode so that users in groups and > others can connect to vhost listening socket. > > Signed-off-by: Huawei Xie > Signed-off-by: Jianfeng Tan > --- > lib/librte_vhost/vhost_user/vhost-net-user.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c > index 2dc0547..7b24f7c 100644 > --- a/lib/librte_vhost/vhost_user/vhost-net-user.c > +++ b/lib/librte_vhost/vhost_user/vhost-net-user.c > @@ -42,6 +42,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -137,6 +138,10 @@ uds_socket(const char *path) > if (ret == -1) > goto err; > > + ret = chmod(un.sun_path, 0666); > + if (ret == 0) > + RTE_LOG(INFO, VHOST_CONFIG, "chmod 0666, ok\n"); That doesn't seem right to me. Doing that kind of change in a libraray doesn't seem to be a good practice, don't even to say changing it to "0666" blindly, which allows every body to access it. --yliu > + > return sockfd; > > err: > -- > 2.1.4