Bug 117024

Summary: [patch]: Fix handbook chapter 15.6.1.3
Product: Documentation Reporter: Wesley Shields <wxs>
Component: Books & ArticlesAssignee: Daniel Gerzo <danger>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Wesley Shields 2007-10-08 17:30:02 UTC
The jail rc script now complains when trying to mount filesystems inside
the jail if any of the parent directories of the mountpoint are a
symlink.

The handbook (chapter 15.6.1.3) contains the following text:

jail_enable="YES"
jail_set_hostname_allow="NO"
jail_list="ns mail www"
jail_ns_hostname="ns.example.org"
jail_ns_ip="192.168.3.17"
jail_ns_rootdir="/home/j/ns"
jail_ns_devfs_enable="YES"
jail_mail_hostname="mail.example.org"
jail_mail_ip="192.168.3.18"
jail_mail_rootdir="/home/j/mail"
jail_mail_devfs_enable="YES"
jail_www_hostname="www.example.org"
jail_www_ip="62.123.43.14"
jail_www_rootdir="/home/j/www"
jail_www_devfs_enable="YES"

By default /home is a symlink to /usr/home and therefor devfs will not
be mounted in the jails.  In fact, they refuse to start.

I've attached a patch which changes the rootdir to not contain a
symlink.  This is my first patch to any of the documentation so please
let me know if I did anything wrong, I'll be glad to do what I can to
fix it up.

A brief discussion about this can be found at:
http://lists.freebsd.org/pipermail/freebsd-doc/2007-June/012671.html

I still maintain that the text quoted in that thread is not sufficient
given the examples and the behavior displayed.

How-To-Repeat: wxs@ack ~ % grep ^jail /etc/rc.conf
jail_enable="YES"
jail_interface="bge0"
jail_list="test"
jail_test_hostname="test"
jail_test_ip="192.168.1.222"
jail_test_rootdir="/home/wxs/test"
jail_test_devfs_enable="YES"
wxs@ack ~ % sudo /etc/rc.d/jail start
Configuring jails:.
Starting jails:/etc/rc.d/jail: WARNING: /home/wxs/test/dev has symlink
as parent - not starting jail test
.
wxs@ack ~ %
Comment 1 Daniel Gerzo freebsd_committer freebsd_triage 2007-10-13 23:56:27 UTC
Responsible Changed
From-To: freebsd-doc->danger

As author of this part of the chapter, I will handle this one.
Comment 2 Daniel Gerzo freebsd_committer freebsd_triage 2007-10-14 00:04:22 UTC
State Changed
From-To: open->closed

Fixed in revision: 1.14; of 
doc/en_US.ISO8859-1/books/handbook/jails/chapter.sgml. 
I have also added some text why it is required to use real path. 

Thank you for your submission!
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-10-14 00:04:25 UTC
danger      2007-10-13 23:04:11 UTC

  FreeBSD doc repository

  Modified files:
    en_US.ISO8859-1/books/handbook/jails chapter.sgml 
  Log:
  Update for FreeBSD-SA-07:01.jail.
  
  PR:             docs/117024
  Patch by:       Wesley Shields <wxs.atarininja.org> (partly)
  
  Revision  Changes    Path
  1.14      +22 -3     doc/en_US.ISO8859-1/books/handbook/jails/chapter.sgml
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"