From: Ian Campbell <ian.campbell@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org, wei.liu2@citrix.com,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] libxl: Be more careful with error handling in libxl__dm_runas_helper()
Date: Tue, 1 Dec 2015 15:52:27 +0000 [thread overview]
Message-ID: <1448985147.15768.144.camel@citrix.com> (raw)
In-Reply-To: <565DBD8D.2040204@oracle.com>
On Tue, 2015-12-01 at 10:32 -0500, Boris Ostrovsky wrote:
> 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.
I'm not sure we do for an apparently transient issue in a fast moving
"bleeding edge" type distro, for a version of which is already (long, by
their standards) out of support.
Especially given the implication in the bug that it can be worked around by
frobbing with /etc/nsswitch.conf and the fact the distro is treating it as
a bug rather than as by design.
Lastly, even the Linux man pages only, to my reading, seem to countenance
ENOENT etc for getpwnam, not for getpwnam_r, the latter does have a well
defined indication of not found vs error.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-12-01 15:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 21:56 [PATCH] libxl: Be more careful with error handling in libxl__dm_runas_helper() Boris Ostrovsky
2015-11-26 9:15 ` Dario Faggioli
2015-11-26 10:03 ` Ian Campbell
2015-11-26 10:16 ` Ian Campbell
2015-11-26 17:47 ` Ian Jackson
2015-11-27 9:29 ` Ian Campbell
2015-11-26 10:26 ` Wei Liu
2015-11-26 17:45 ` Ian Jackson
2015-11-27 9:40 ` Ian Campbell
2015-11-30 18:24 ` Boris Ostrovsky
2015-12-01 14:38 ` Ian Campbell
2015-12-01 15:32 ` Boris Ostrovsky
2015-12-01 15:52 ` Ian Campbell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448985147.15768.144.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.