Bug#840469: dh_sysuser: should add a dependency to "perl-modules" to remove sysuser.
Russ Allbery
rra at debian.org
Mon Oct 24 23:59:49 UTC 2016
Dmitry Bogatov <KAction at gnu.org> writes:
> It is unfortunate. I am considering following patch:
> --- a/postrm-sysuser.sh
> +++ b/postrm-sysuser.sh
> @@ -3,6 +3,8 @@
> if [ "$1" = purge ] ; then
> rm -f "$store/$package"
> if [ $(count_files_in "$store") = 1 ] ; then
> - deluser --force --remove-home "$username"
> + home=$(getent passwd "$username"| cut -d: -f6)
> + deluser --force "$username"
> + rm -fr --preserve-root --one-file-system -- "$home"
> fi
> fi
> but I am scared to invoke `rm -fr' with root. I beleive, that deluser would
> handle it better then me.
I would be pretty scared about that too. It would make me very nervous.
I think you'd at least want to put some sanity checks here. I could see a
local sysadmin changing the home directory of a system user to / or some
other catastrophic location.
--
Russ Allbery (rra at debian.org) <http://www.eyrie.org/~eagle/>
More information about the Perl-maintainers
mailing list