Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627708 - sys-libs/cracklib: creates unowned dictionary files, and does not clean them up on removal
Summary: sys-libs/cracklib: creates unowned dictionary files, and does not clean them ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-12 17:53 UTC by Michał Górny
Modified: 2021-11-01 05:36 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-12 17:53:27 UTC
The following files are created by cracklib ebuild in postinst:

/usr/lib/cracklib_dict.hwm
/usr/lib/cracklib_dict.pwd
/usr/lib/cracklib_dict.pwi

However, they are neither owned by the package, nor removed when cracklib is removed completely from the system. So please:

1. Make sure to 'own' the files from the package -- at least create empty files in src_install() to make sure the package is considered the owner. You will need to remove them in pkg_setup() when upgrading from the old version to avoid file collisions.

2. Make sure to remove them when the package is being removed, i.e. remove them in pkg_postrm() with empty REPLACED_BY_VERSION.
Comment 1 Alexander Tsoy 2019-06-16 22:02:11 UTC
sys-apps/miscfiles also run create-cracklib-dict in pkg_postinst()
Comment 2 Alexander Tsoy 2019-06-16 22:06:04 UTC
(In reply to Alexander Tsoy from comment #1)
Nevermind, that doesn't matter.
Comment 3 Joakim Tjernlund 2020-03-03 12:10:18 UTC
I too ran into this, cracklib left MB of garbage in the live FS after
deleting the pkg
Comment 4 Jean-Claude Repetto 2020-12-06 17:46:16 UTC
I also ran into this problem when upgrading my profile:

unsymlink-lib --analyze

orphan dirs/files (not owned by any package) that will be moved to /usr/lib/:
	cracklib_dict.hwm
	cracklib_dict.pwd
	cracklib_dict.pwi
Comment 5 Peter Levine 2021-05-05 22:31:56 UTC
According to the man pages, this is the correct path for it.  Maybe get rid of pkg_postins() and add something like the following to the end of multilib_src_install_all():

"${ED}"/usr/sbin/create-cracklib-dict -o \
    "${ED}"/usr/lib/cracklib_dict \ 
    "${ED}"/usr/share/dict/* > /dev/null