Bug#679751: Lintian now detect package pointing to /home
Am 18.09.2017 um 02:18 schrieb Michael Biebl: > It's not as simple as that. You might still have running processes with > that uid in which case usermod complains and exists. > So to successfully run usermod you'd have to kill a processes running > under that uid. Fwiw, I ran into this issue when an upstream of mine switched runtimedir from /var/run to /run and my postinst so far has created a system user with --home /var/run/foo which I now wanted to change to --home /run/foo. As the package starts a (socket activated) daemon, this needs some dedicated code to disable socket activation, then stop the daemon, then change the home directory via usermod, then re-enable socket activation. Or I just don't try to anticipate all possible corner cases and simply use the new home directory only on new installations. Not sure what's better. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#679751: Lintian now detect package pointing to /home
On Fri, 31 Jul 2015 13:16:24 +0200 Guillem Joverwrote: > Hi! > > On Fri, 2015-07-31 at 11:34:20 +0200, Bastien ROUCARIES wrote: > > On Fri, Jul 31, 2015 at 11:04 AM, Bastien ROUCARIES wrote: > > > Lintian now detect script creating user pointing to /home. > > > After a chat under #debian-qa it appear that canonical path for non > > existant home dir is /nonexistant could be documented ? > > > > Moreover how can a developper could correct a mistake in previous > > package ? Rip the /home directory correct hte passd file ? > > To fix a wrong home path you can do something like: > > ,--- > # Fix the home directory name created by an old package. > u_home=$(getent passwd USERNAME | cut -d: -f6) > if [ "$u_home" = "OLDHOME" ] ; then > usermod --home NEWHOME USERNAME >/dev/null || true > fi > `--- > It's not as simple as that. You might still have running processes with that uid in which case usermod complains and exists. So to successfully run usermod you'd have to kill a processes running under that uid. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#679751: Lintian now detect package pointing to /home
On Fri, Jul 31, 2015 at 11:34:20AM +0200, Bastien ROUCARIES wrote: After a chat under #debian-qa it appear that canonical path for non existant home dir is /nonexistant could be documented ? If we do (and I'm not expressing any opinion on that here), we should spell it correctly: /nonexistent. -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679751: Lintian now detect package pointing to /home
On Fri, Jul 31, 2015 at 13:16:24 +0200, Guillem Jover wrote: Hi! On Fri, 2015-07-31 at 11:34:20 +0200, Bastien ROUCARIES wrote: On Fri, Jul 31, 2015 at 11:04 AM, Bastien ROUCARIES wrote: Lintian now detect script creating user pointing to /home. After a chat under #debian-qa it appear that canonical path for non existant home dir is /nonexistant could be documented ? Moreover how can a developper could correct a mistake in previous package ? Rip the /home directory correct hte passd file ? To fix a wrong home path you can do something like: ,--- # Fix the home directory name created by an old package. u_home=$(getent passwd USERNAME | cut -d: -f6) if [ $u_home = OLDHOME ] ; then usermod --home NEWHOME USERNAME /dev/null || true fi `--- I think fixing that on upgrades is more dangerous than anything. If the dir exists, you'd need to move it to the new location, adding a bunch of failure modes for what seems to me a rather minor benefit. Cheers, Julien signature.asc Description: Digital signature
Bug#679751: Lintian now detect package pointing to /home
On Fri, Jul 31, 2015 at 11:34 AM, Bastien ROUCARIES roucaries.bast...@gmail.com wrote: On Fri, Jul 31, 2015 at 11:04 AM, Bastien ROUCARIES roucaries.bast...@gmail.com wrote: control: block -1 by 793613 Hi, Lintian now detect script creating user pointing to /home. Could you also document that new added user should have an /home directory or /dev/null Ntp pass wrongfully also the --no-create-home flag, this should be documented as a not to do. With my lintian maint hat, I will like this issue get more guidance in policy Bastien After a chat under #debian-qa it appear that canonical path for non existant home dir is /nonexistant could be documented ? Moreover how can a developper could correct a mistake in previous package ? Rip the /home directory correct hte passd file ? Thanks quoting debian-qa: 11:32:23) jcristau: not with --no-create-home it won't (11:32:54) jcristau: but if it does exist, then not messing with it further is probably safest anyway (11:33:00) Myon: unless the crap was in stable, you don't need to clean up everything (11:33:30) Myon: an unused directory somewhere doesn't hurt, but any postinst magic will probably at some point -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679751: Lintian now detect package pointing to /home
control: block -1 by 793613 Hi, Lintian now detect script creating user pointing to /home. Could you also document that new added user should have an /home directory or /dev/null Ntp pass wrongfully also the --no-create-home flag, this should be documented as a not to do. With my lintian maint hat, I will like this issue get more guidance in policy Bastien -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679751: Lintian now detect package pointing to /home
On Fri, Jul 31, 2015 at 11:04 AM, Bastien ROUCARIES roucaries.bast...@gmail.com wrote: control: block -1 by 793613 Hi, Lintian now detect script creating user pointing to /home. Could you also document that new added user should have an /home directory or /dev/null Ntp pass wrongfully also the --no-create-home flag, this should be documented as a not to do. With my lintian maint hat, I will like this issue get more guidance in policy Bastien After a chat under #debian-qa it appear that canonical path for non existant home dir is /nonexistant could be documented ? Moreover how can a developper could correct a mistake in previous package ? Rip the /home directory correct hte passd file ? Thanks -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679751: Lintian now detect package pointing to /home
Hi! On Fri, 2015-07-31 at 11:34:20 +0200, Bastien ROUCARIES wrote: On Fri, Jul 31, 2015 at 11:04 AM, Bastien ROUCARIES wrote: Lintian now detect script creating user pointing to /home. After a chat under #debian-qa it appear that canonical path for non existant home dir is /nonexistant could be documented ? Moreover how can a developper could correct a mistake in previous package ? Rip the /home directory correct hte passd file ? To fix a wrong home path you can do something like: ,--- # Fix the home directory name created by an old package. u_home=$(getent passwd USERNAME | cut -d: -f6) if [ $u_home = OLDHOME ] ; then usermod --home NEWHOME USERNAME /dev/null || true fi `--- Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org