| Summary: | app-portage/gentoolkit - revdep-rebuild follows /var/cache symlink and then complains about it | ||
|---|---|---|---|
| Product: | Portage Development | Reporter: | David Flogeras <dflogeras2> |
| Component: | Tools | Assignee: | Portage Tools Team <tools-portage> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
David Flogeras
2012-03-15 13:56:42 UTC
Sorry about the late response. I'm not sure how I missed this when you filed the bug. This is done on purpose to prevent symlink attacks on revdep-rebuild when run as root. The security bug for the design decision is Bug 203414. Please note the discussion at the end of the bug for removing the check only applied when revdep-rebuild was run as a user. The solution to fix the problem is to not use a symlink, but to bind mount the desired directories. So assuming that you have the following: /mnt/sd3/var is your desired location for /var instead of making /var as symlink to /mnt/sd3/var you want to do the following: mount --bind /mnt/sd3/var /var The /etc/fstab entry to do this automatically should look like: /mnt/sd3/var /var none bind Also be sure to set the permissions and ownership of /var/cache/revdep-rebuild chown root:root /var/cache/revdep-rebuild chmod 700 /var/cache/revdep-rebuild *** This bug has been marked as a duplicate of bug 263661 *** Cheers, and sorry for the late response-reponse :) I like that solution much better than symlinks anyway, just never thought of it |