Dmitry Bogatov <[email protected]> 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 ([email protected]) <http://www.eyrie.org/~eagle/>

