From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH] libxl: Be more careful with error handling in libxl__dm_runas_helper() Date: Tue, 1 Dec 2015 10:32:29 -0500 Message-ID: <565DBD8D.2040204@oracle.com> References: <1448488569-3003-1-git-send-email-boris.ostrovsky@oracle.com> <22103.17713.650054.585156@mariner.uk.xensource.com> <1448617231.13576.56.camel@citrix.com> <565C9440.1030408@oracle.com> <1448980733.15768.137.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448980733.15768.137.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 , Ian Jackson Cc: xen-devel@lists.xen.org, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 12/01/2015 09:38 AM, Ian Campbell wrote: > On Mon, 2015-11-30 at 13:24 -0500, Boris Ostrovsky wrote: >> root@orochi-c> cat /etc/redhat-release >> Fedora release 20 (Heisenbug) >> root@orochi-c> ./a.out foobar >> s = 2 errno = 2 result = (nil) >> getpwnam_r: No such file or directory >> root@orochi-c> >> >> which does look like a bug in F20 since the code above is taken from man >> pages' EXAMPLE and doesn't look like it works as intended (which was to >> produce "Not found" string) > https://bugzilla.redhat.com/show_bug.cgi?id=988068 seems related (although > is blaming "sssd" rather than glibc it seems). This too: https://sourceware.org/bugzilla/show_bug.cgi?id=17922 They claim that glibc v2.20 fails (i.e. returns non-zero/ENOENT) but in my case on fedora 21 with 2.20-8 I get 0. My "failing" fedora 20 uses 2.18. I don't know whether it's really a bug in glibc since Linux man pages do allow ENOENT (and some other codes) to indicate absence of entry. (But then if this is not a bug in glibc then there is a bug in man pages' example code). In any case, I think we need to account for this in libxl. -boris