From: Ian Jackson Subject: Re: [PATCH] libxl: Be more careful with error handling in libxl__dm_runas_helper() Date: Thu, 26 Nov 2015 17:47:49 +0000 Message-ID: <22103.17861.749417.678555@mariner.uk.xensource.com> References: <1448488569-3003-1-git-send-email-boris.ostrovsky@oracle.com> <1448532215.12165.14.camel@citrix.com> <1448533015.12165.15.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1448533015.12165.15.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Boris Ostrovsky , xen-devel@lists.xen.org, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: Be more careful with e= rror handling in libxl__dm_runas_helper()"): > On Thu, 2015-11-26 at 10:03 +0000, Ian Campbell wrote: > > My reference when reviewing this is the (IMHO more canonical)=A0http://= pubs.o > > pengroup.org/onlinepubs/9699919799/functions/getpwnam.html=A0. > = > Maybe we should be considering whether "Applications wishing to check for > error situations should set errno to 0 before calling getpwnam(). If > getpwnam() returns a null pointer and errno is non-zero, an error > occurred." ought to be applies to getpwnam_r too? Maybe that is the bug in the OS Boris is having this trouble with. If so then setting errno first would be a better workaround. Ian.