Date: Mon, 27 Aug 2018 13:58:04 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 230937] nfsuserd - missing endpwent() and endgrent() before daemon() & fork() Message-ID: <bug-230937-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230937 Bug ID: 230937 Summary: nfsuserd - missing endpwent() and endgrent() before daemon() & fork() Product: Base System Version: 11.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: peter@ifm.liu.se Created attachment 196598 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D196598&action= =3Dedit Patch to /usr/src/usr.sbin/nfsuserd/nfsuserd.c We are using a (own developed) DB based backend for nsswitch in order to improve speed for our file servers. After upgrading to 11.2 we noticed that= we had problems on one of them in that initially on a newly booted server NFS clients correctly saw user & group names but then after a short while the client started reporting "nobody" instead. Investigating this issue it seemed to be connected to the cache timeout as specified for the nfsuserd daemon (we used 10 minutes). Any uid -> name or = gid -> name lookups after the timeout limit would just return "nobody". Looking at the source code for nfsuserd.c I noticed missing endpwent() and endgrent() calls during the initial cache priming of users & groups and bef= ore the slave workers processes were forked off, and adding those made this work nicely again.=20 Please find enclosed a (very) simple patch that adds those missing calls. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230937-227>