Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427968 - app-portage/gentoolkit - revdep-rebuild fails to run when /var/ is a symlink
Summary: app-portage/gentoolkit - revdep-rebuild fails to run when /var/ is a symlink
Status: RESOLVED DUPLICATE of bug 263661
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 23:56 UTC by Vasco Figueira
Modified: 2012-07-25 15:40 UTC (History)
0 users

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 Vasco Figueira 2012-07-24 23:56:36 UTC
I have at root: /var -> var+tmp/var (root is on ssd, var and tmp aren't)

revdep-rebuild fails to run.


Reproducible: Always

Steps to Reproduce:
1. Create a symlink pointing /var to a different directory
2. Run revdep-rebuild

Actual Results:  
# revdep-rebuild -- --ask
 * Configuring search environment for revdep-rebuild
 * Working directory expected to be /var/cache/revdep-rebuild, but is /var+tmp/var/cache/revdep-rebuild


Expected Results:  
revdep-rebuild to run normally
Comment 1 Paul Varner (RETIRED) gentoo-dev 2012-07-25 15:40:22 UTC
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:

/var+tmp/var is your desired location for /var instead of making /var as symlink to /var+tmp/var you want to do the following

mount --bind /var+tmp/var /var

The /etc/fstab entry to do this automatically should look like:
/var+tmp/var /var none bind

*** This bug has been marked as a duplicate of bug 263661 ***