From wxs@atarininja.org  Mon Oct  8 16:25:54 2007
Return-Path: <wxs@atarininja.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A198B16A417
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2007 16:25:54 +0000 (UTC)
	(envelope-from wxs@atarininja.org)
Received: from syn.atarininja.org (syn.csh.rit.edu [129.21.60.158])
	by mx1.freebsd.org (Postfix) with ESMTP id 85B3413C45D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2007 16:25:54 +0000 (UTC)
	(envelope-from wxs@atarininja.org)
Received: by syn.atarininja.org (Postfix, from userid 1001)
	id BA8E45C34; Mon,  8 Oct 2007 12:28:07 -0400 (EDT)
Message-Id: <20071008162807.BA8E45C34@syn.atarininja.org>
Date: Mon,  8 Oct 2007 12:28:07 -0400 (EDT)
From: Wesley Shields <wxs@atarininja.org>
Reply-To: Wesley Shields <wxs@atarininja.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch]: Fix handbook chapter 15.6.1.3
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         117024
>Category:       docs
>Synopsis:       [patch]: Fix handbook chapter 15.6.1.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    danger
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 16:30:02 GMT 2007
>Closed-Date:    Sat Oct 13 23:06:09 UTC 2007
>Last-Modified:  Sat Oct 13 23:10:01 UTC 2007
>Originator:     Wesley Shields
>Release:        FreeBSD 6.2-RELEASE-p5 amd64
>Organization:
>Environment:
System: FreeBSD syn.csh.rit.edu 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #7: Thu May 24 09:18:59 EDT 2007 root@syn.csh.rit.edu:/usr/obj/usr/src/sys/SMP amd64

>Description:
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 ~ % 

>Fix:

Index: chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/jails/chapter.sgml,v
retrieving revision 1.13
diff -u -r1.13 chapter.sgml
--- chapter.sgml	29 May 2007 12:10:12 -0000	1.13
+++ chapter.sgml	8 Oct 2007 14:45:59 -0000
@@ -775,15 +775,15 @@
 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_rootdir="/usr/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_rootdir="/usr/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_rootdir="/usr/home/j/www"
 jail_www_devfs_enable="YES"</programlisting>
 	  </step>
 	  <step>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->danger 
Responsible-Changed-By: danger 
Responsible-Changed-When: Sat Oct 13 22:56:27 UTC 2007 
Responsible-Changed-Why:  
As author of this part of the chapter, I will handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117024 
State-Changed-From-To: open->closed 
State-Changed-By: danger 
State-Changed-When: Sat Oct 13 23:04:22 UTC 2007 
State-Changed-Why:  
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! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117024 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/117024: commit references a PR
Date: Sat, 13 Oct 2007 23:04:25 +0000 (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"
 
>Unformatted:
