Bug 154246 - [jail] [patch] Bad symlink created if devfs mount point does not exist on jail startup
Summary: [jail] [patch] Bad symlink created if devfs mount point does not exist on jai...
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-jail (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 18:30 UTC by David Wimsey
Modified: 2016-01-25 20:39 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (993 bytes, patch)
2011-01-23 18:30 UTC, David Wimsey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Wimsey 2011-01-23 18:30:09 UTC
/etc/rc.d/jail does not currently test for the existance of the mountpoint for the devfs mount phase of jail startup.   If the jail root is read only, the mount will fail, but the symlink is created anyway.

Fix: Attached file aborts jail startup and uses warn to alert the user if the mount point directory doesn't exist

Patch attached with submission follows:
How-To-Repeat: Create a new jail in /jail/testjail
rm /jail/testjail/dev
/etc/rc.d/jail start

/jail will contain a symlink named 'log' pointing to '../var/run/log'
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-01-24 00:09:11 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-jail

Over to maintainer(s).
Comment 2 Jamie Gritton freebsd_committer freebsd_triage 2016-01-25 20:39:26 UTC
As of 10-STABLE, this link is no longer created by /etc/rc.d/jail.