• Status New
  • Percent Complete
  • Task Type Bug Report
  • Category tools → pkgutils
  • Assigned To
  • Operating System Linux
  • Severity Low
  • Priority Very Low
  • Reported Version 2.5
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: CRUX
Opened by jue - 19.11.2008
Last edited by Romster - 02.01.2009

FS#380 - pkgadd: rejected directories might have the wrong ower in /var/lib/pkg/rejected

if pkgadd writes an entry to /var/lib/pkg/rejected the directory owner is ignored if only a file in that directory is rejected.

The above sound a bit crazy, let's show an example:

fcron owns the following directories in /var:

drwxr-xr-x root/root var/spool/
drwxrwx--- daemon/daemon var/spool/fcron/
-rw------- root/root var/spool/fcron/root.orig

if root.orig is modified and therefore rejected by pkgadd we got the following in /var/lib/rejected:

drwxr-xr-x root/root var/spool/
drwxrwx--- root/root var/spool/fcron/
-rw------- root/root var/spool/fcron/root.orig

It looks like an intentional behaviour of libarchive, when the leading components of a path are not already on disk and archive_read_extract must create them. The patch by ukky (attached) keeps track of all the directories that might be created by archive_read_extract, and at the end of pkg_install goes through this set to ensure that new directories in /var/lib/pkg/rejected have the correct owner/group.

Users might not benefit from this bugfix unless FS#379 is also resolved. If rejmerge ignores directory permissions, then the owner/group of a conflicting directory will be left as it was from a previous installation, and all our efforts to ensure correct directory permissions under /var/lib/pkg/rejected will go unnoticed.


Available keyboard shortcuts


Task Details

Task Editing