Hello,<div><br></div><div>Any comments on the below?<br><br>On Fri, Mar 7, 2014 at 2:48 PM, Colin Walters <walters@verbum.org> wrote:<br>
<blockquote type="cite">Hi,<div><br></div><div>I'd like to talk about my shadow-utils patch that lives here:</div><div><a href="http://fedorapeople.org/~walters/Use-usr-lib-passwd-for-system-users-if-it-exists.patch">http://fedorapeople.org/~walters/Use-usr-lib-passwd-for-system-users-if-it-exists.patch</a></div><div><br></div><div>The commit message links to the Sourceware bug which has some rationale, but let me retype it here briefly:</div><div><br></div><div>OSTree is a new general-purpose upgrade system for Linux-based operating systems, designed to *complement* existing package systems like dpkg/rpm.  You feed it packages on the build server, and clients merely pull from the repository.</div><div><br></div><div>In this model, there is no %post/postinst - no code execution at all.  That means no calls to /usr/sbin/adduser to add new system users from new packages.</div><div><br></div><div>In order to make this work then, the system users come in /usr/lib/passwd, and any end up in /etc/passwd.</div><div><br></div><div>On the client side, <a href="https://github.com/aperezdc/nss-altfiles">https://github.com/aperezdc/nss-altfiles</a> is used as a NSS module to tell glibc to find the file.</div><div><br></div><div>Fortuitously, shadow-utils already has a '-r' option to specify a system user.  So on the build server side, any RPMs whose %post calls out to useradd will go in /usr/lib/passwd (if it exists).</div><div><br></div><div>The last bit is important - the patch checks to see if /usr/lib/passwd exists, if it doesn't, the users end up in the traditional /etc/passwd, so RPM/dpkg continue to work as is.</div><div><br></div><div>Comments appreciated!</div><div><br></div></blockquote></div>