From owner-freebsd-stable@FreeBSD.ORG Thu Sep 29 23:13:51 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F451106566B for ; Thu, 29 Sep 2011 23:13:51 +0000 (UTC) (envelope-from faber@isi.edu) Received: from vim.isi.edu (unknown [IPv6:2001:1878:400:1:16fe:b5ff:fee4:12d]) by mx1.freebsd.org (Postfix) with ESMTP id 609408FC12 for ; Thu, 29 Sep 2011 23:13:51 +0000 (UTC) Received: from vim.isi.edu (localhost [127.0.0.1]) by vim.isi.edu (8.14.5/8.14.5) with ESMTP id p8TNDpaw053035; Thu, 29 Sep 2011 16:13:51 -0700 (PDT) (envelope-from faber@isi.edu) Date: Thu, 29 Sep 2011 16:13:50 -0700 From: Ted Faber To: Jeremy Chadwick Message-ID: <20110929231349.GK2677@vim.isi.edu> References: <587271317225583@web125.yandex.ru> <20110928115008.3d121d38@cox.net> <20110928121035.568ff6e6@cox.net> <753371317233305@web145.yandex.ru> <20110929175755.GA1694@callisto.augenstein.ten> <4E84BBE3.1090701@protected-networks.net> <20110929195001.GF2677@vim.isi.edu> <20110929200539.GA24098@icarus.home.lan> <20110929214009.GH2677@vim.isi.edu> <20110929220144.GA3204@icarus.home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+RZeZVNR8VILNfK" Content-Disposition: inline In-Reply-To: <20110929220144.GA3204@icarus.home.lan> X-url: http://www.isi.edu/~faber User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: linux-f10-flashplugin X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2011 23:13:51 -0000 --x+RZeZVNR8VILNfK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 29, 2011 at 03:01:44PM -0700, Jeremy Chadwick wrote: > On Thu, Sep 29, 2011 at 02:40:09PM -0700, Ted Faber wrote: > > On Thu, Sep 29, 2011 at 01:05:40PM -0700, Jeremy Chadwick wrote: > > > On Thu, Sep 29, 2011 at 12:50:01PM -0700, Ted Faber wrote: > > > > (npviewer.bin:5430): GLib-WARNING **: getpwuid_r(): failed due > > > > to unknown user id (2139) > > > > ... > > > > I haven't explored the getpwuid_r thing. > > >=20 > > > Running "id 2139" should return something other than "no such user". = If > > > not, your environment is looking up something that has such ownership. > >=20 > > 2139 is my uid, and both linux and native FreeBSD seem to agree: > >=20 > > $ /usr/bin/id > > uid=3D2139(faber) gid=3D134(div7) > > groups=3D134(div7),0(wheel),5(operator),80(www),169(dartgrp),259(sys413= ),335(cs555fac),356(arpisi),387(crisis),402(ilense),546(xcp),584(webdiv7),6= 05(rfcdev),7001(abac) > > $ /compat/linux/usr/bin/id > > uid=3D2139 gid=3D134(div7) groups=3D0(wheel),5(operator),80(www),169,25= 9,335,356,387,402,546,584,605,7001(abac) >=20 > I can only speculate what's going on here, but there's a lot of > inconsistencies in UID<->username and GID<->group name mappings shown in > the Linux "id" program there. >=20 > On a native CentOS box, /usr/bin/id *does* return a username alongside > the uid number. Example: >=20 > $ /usr/bin/id > uid=3D1535(jdc) gid=3D1535(jdc) groups=3D101(cvsusers),110(netops),{snipp= ed} >=20 > So what I'm getting at: I don't know if the error from glib complaining > about getpwuid_r() "unknown user id" is actually saying "the UID 2139 > is unknown", or if it's saying the passwd struct details aren't filled > in completely. Taken from getpwuid_r(3) RETURN VALUES section: >=20 > The functions getpwent_r(), getpwnam_r(), and getpwuid_r() return 0 > if no error occurred, or an error number to indicate failure. > It is not an error if a matching entry is not found. (Thus, if > result is NULL and the return value is 0, no matching entry exists.) >=20 > Likewise I would expect the group names to be expanded as well -- it's > expanding some of them, but not all. Why doesn't it know about GIDs > 169, 259, 335, 356, 387, 402, 546, 584, and 605? Um, because my NIS was incorrectly configured. Sorry for the blind alley. Adding nis and nisplus to the relevant entries in /compat/linux/etc/nsswitch.conf means that linux id works dandy: $ /compat/linux/usr/bin/id uid=3D2139(faber) gid=3D134(div7) groups=3D0(wheel),5(operator),80(www),169= (dartgrp),259(sys413),335(cs555fac),356(arpisi),387(crisis),402(ilense),546= (xcp),584(webdiv7),605(rfcdev),7001(abac) and the getpwnam_r error disappears. The flashplugin still fails with the errors: --- (process:52959): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (npviewer.bin:52959): Gtk-WARNING **: cannot open display: :0.0 *** NSPlugin Wrapper *** ERROR: failed to initialize plugin-side RPC client= connection NOTE: child process received `Goodbye', closing down (process:52979): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (npviewer.bin:52979): Gtk-WARNING **: cannot open display: :0.0 *** NSPlugin Wrapper *** ERROR: failed to initialize plugin-side RPC client= connection NOTE: child process received `Goodbye', closing down --- Sorry for the NIS noise. --=20 Ted Faber http://www.isi.edu/~faber PGP: http://www.isi.edu/~faber/pubkeys.= asc Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#= SIG --x+RZeZVNR8VILNfK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6E+60ACgkQaUz3f+Zf+Xv5ZwCguGmqpqGpZknXR9jhFcUJHE/v j70An1hDqQv0+x7g54BGHOd7ZCXmLuzT =j1J3 -----END PGP SIGNATURE----- --x+RZeZVNR8VILNfK--