From bazerka@beardz.net  Tue Sep 13 17:17:58 2011
Return-Path: <bazerka@beardz.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C50E3106566C;
	Tue, 13 Sep 2011 17:17:58 +0000 (UTC)
	(envelope-from bazerka@beardz.net)
Received: from beardz.net (beardz.net [IPv6:2a01:4f8:121:2403:1::])
	by mx1.freebsd.org (Postfix) with ESMTP id 678EB8FC13;
	Tue, 13 Sep 2011 17:17:58 +0000 (UTC)
Received: from beardz.net (localhost [127.0.1.7])
	by beardz.net (8.14.4/8.14.4) with ESMTP id p8DHHt95068142;
	Tue, 13 Sep 2011 18:17:55 +0100 (BST)
	(envelope-from bazerka@beardz.net)
Received: (from bazerka@localhost)
	by beardz.net (8.14.4/8.14.4/Submit) id p8DHHtY1068128;
	Tue, 13 Sep 2011 18:17:55 +0100 (BST)
	(envelope-from bazerka)
Message-Id: <201109131717.p8DHHtY1068128@beardz.net>
Date: Tue, 13 Sep 2011 18:17:55 +0100 (BST)
From: Jase Thew <freebsd@beardz.net>
Reply-To: Jase Thew <freebsd@beardz.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Jaakko Heinonen <jh@freebsd.org>
Subject: [PATCH] Add log path to /etc/defaults/devfs.rules due to r221323
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         160711
>Category:       conf
>Synopsis:       [PATCH] Add log path to /etc/defaults/devfs.rules due to r221323
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 13 17:20:12 UTC 2011
>Closed-Date:    Thu Sep 22 18:38:31 UTC 2011
>Last-Modified:  Thu Sep 22 18:38:31 UTC 2011
>Originator:     Jase Thew
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD jailhost.localdomain 8.2-STABLE FreeBSD 8.2-STABLE #1 r221323: Tue Sep 13 13:38:57 BST 2011 toor@jailhost.localdomain:/usr/obj/usr/src/sys/JAILHOST amd64


	
>Description:
        /etc/rc.d/jail attempts to create a symlink inside of a jail's devfs from ../var/log/run to /dev/log, as various applications expect
        syslogd's socket to be /dev/log. r221323 introduced a change that applies devfs.rules onto any directories or symlinks created
        inside of a devfs mount (eg, /dev) - this means that the /dev/log symlink gets hidden and said applications lose their ability to
        log (an example is security/php-suhosin port).
>How-To-Repeat:
	Upgrade to stable/8 >= r221323, start a jail and check for existence of $jailroot/dev/log symlink
>Fix:

	Expose the log symlink inside of jails by adding the path to the jail ruleset in /etc/defaults/devfs.rules

--- patch-etc_defaults_devfs_rules begins here ---
--- /etc/defaults/devfs.rules.orig	2011-09-13 18:03:00.000000000 +0100
+++ /etc/defaults/devfs.rules	2011-09-13 18:01:00.000000000 +0100
@@ -83,3 +83,4 @@
 add include $devfsrules_hide_all
 add include $devfsrules_unhide_basic
 add include $devfsrules_unhide_login
+add path log unhide
--- patch-etc_defaults_devfs_rules ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Wed Sep 14 13:41:47 UTC 2011 
Responsible-Changed-Why:  
Take. 

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

From: Jaakko Heinonen <jh@FreeBSD.org>
To: Jase Thew <freebsd@beardz.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/160711: [PATCH] Add log path to /etc/defaults/devfs.rules
 due to r221323
Date: Wed, 14 Sep 2011 16:42:33 +0300

 Thanks for the report and patch!
 
 On 2011-09-13, Jase Thew wrote:
 > >Description:
 >         /etc/rc.d/jail attempts to create a symlink inside of a jail's devfs from ../var/log/run to /dev/log, as various applications expect
 >         syslogd's socket to be /dev/log. r221323 introduced a change that applies devfs.rules onto any directories or symlinks created
 >         inside of a devfs mount (eg, /dev) - this means that the /dev/log symlink gets hidden and said applications lose their ability to
 >         log (an example is security/php-suhosin port).
 
 Could you please test this specific patch?
 
 %%%
 Index: etc/defaults/devfs.rules
 ===================================================================
 --- etc/defaults/devfs.rules	(revision 225242)
 +++ etc/defaults/devfs.rules	(working copy)
 @@ -26,6 +26,7 @@ add hide
  # Requires: devfsrules_hide_all
  #
  [devfsrules_unhide_basic=2]
 +add path log unhide
  add path null unhide
  add path zero unhide
  add path crypto unhide
 %%%
 
 -- 
 Jaakko

From: Jase Thew <bazerka@beardz.net>
To: Jaakko Heinonen <jh@FreeBSD.org>
Cc: Jase Thew <freebsd@beardz.net>, bug-followup@FreeBSD.org
Subject: Re: conf/160711: [PATCH] Add log path to /etc/defaults/devfs.rules
 due to r221323
Date: Wed, 14 Sep 2011 22:35:21 +0100

 I've tested the patch as requested and I can confirm that it behaves as 
 expected.
 
 Regards,
 
 Jase.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/160711: commit references a PR
Date: Thu, 15 Sep 2011 13:32:57 +0000 (UTC)

 Author: jh
 Date: Thu Sep 15 13:32:43 2011
 New Revision: 225587
 URL: http://svn.freebsd.org/changeset/base/225587
 
 Log:
   Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
   as a symbolic link.
   
   PR:		conf/160711
   Submitted by:	Jase Thew
   Approved by:	re (kib)
   MFC after:	1 week
 
 Modified:
   head/etc/defaults/devfs.rules
 
 Modified: head/etc/defaults/devfs.rules
 ==============================================================================
 --- head/etc/defaults/devfs.rules	Thu Sep 15 12:28:17 2011	(r225586)
 +++ head/etc/defaults/devfs.rules	Thu Sep 15 13:32:43 2011	(r225587)
 @@ -26,6 +26,7 @@ add hide
  # Requires: devfsrules_hide_all
  #
  [devfsrules_unhide_basic=2]
 +add path log unhide
  add path null unhide
  add path zero unhide
  add path crypto unhide
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: jh 
State-Changed-When: Thu Sep 15 13:43:22 UTC 2011 
State-Changed-Why:  
Patched in head (r225587). I will MFC this to stable/8 in a week. Thanks 
for your submission! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/160711: commit references a PR
Date: Thu, 22 Sep 2011 17:59:42 +0000 (UTC)

 Author: jh
 Date: Thu Sep 22 17:59:33 2011
 New Revision: 225731
 URL: http://svn.freebsd.org/changeset/base/225731
 
 Log:
   MFC r225587:
   
   Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
   as a symbolic link.
   
   PR:		conf/160711
 
 Modified:
   stable/8/etc/defaults/devfs.rules
 Directory Properties:
   stable/8/etc/   (props changed)
 
 Modified: stable/8/etc/defaults/devfs.rules
 ==============================================================================
 --- stable/8/etc/defaults/devfs.rules	Thu Sep 22 17:51:09 2011	(r225730)
 +++ stable/8/etc/defaults/devfs.rules	Thu Sep 22 17:59:33 2011	(r225731)
 @@ -26,6 +26,7 @@ add hide
  # Requires: devfsrules_hide_all
  #
  [devfsrules_unhide_basic=2]
 +add path log unhide
  add path null unhide
  add path zero unhide
  add path crypto unhide
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/160711: commit references a PR
Date: Thu, 22 Sep 2011 18:21:34 +0000 (UTC)

 Author: jh
 Date: Thu Sep 22 18:21:15 2011
 New Revision: 225732
 URL: http://svn.freebsd.org/changeset/base/225732
 
 Log:
   MFC r225587:
   
   Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
   as a symbolic link.
   
   PR:		conf/160711
 
 Modified:
   stable/7/etc/defaults/devfs.rules
 Directory Properties:
   stable/7/etc/   (props changed)
 
 Modified: stable/7/etc/defaults/devfs.rules
 ==============================================================================
 --- stable/7/etc/defaults/devfs.rules	Thu Sep 22 17:59:33 2011	(r225731)
 +++ stable/7/etc/defaults/devfs.rules	Thu Sep 22 18:21:15 2011	(r225732)
 @@ -26,6 +26,7 @@ add hide
  # Requires: devfsrules_hide_all
  #
  [devfsrules_unhide_basic=2]
 +add path log unhide
  add path null unhide
  add path zero unhide
  add path crypto unhide
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: jh 
State-Changed-When: Thu Sep 22 18:38:30 UTC 2011 
State-Changed-Why:  
Fixed in head, stable/8 and stable/7. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160711 
>Unformatted:
