Re: cupssamba jailed

2009-06-24 Thread Daniel Bye
On Tue, Jun 23, 2009 at 08:07:19PM -0500, Derek Funk wrote:
 Attempting to setup cups and samba into a jail. How do you mount/add 
 device node /dev/ulpt0 within a jail.
 Essentially I would like to know, how to add device nodes within jail 
 /dev for specifically the devices I want?

You need to create some devfs rules, which live in a file called
/etc/devfs.rules in the HOST system. As an example to get you going, here
is what I use (edited for brevity):

[localrules=101]
add path 'da*'  mode 0664 group operator
add path 'acd*' mode 0666 group operator
add path 'cd*'  mode 0666 group operator

[hide_all=201]
add hide

[unhide_basic=301]
add path null unhide
add path zero unhide
add path crypto unhide
add path random unhide
add path urandom unhide
add path net unhide
add path net/lo0 unhide
add path net/nfe0 unhide

[unhide_login=401]
add path 'ptyp*' unhide
add path 'ptyq*' unhide
add path 'ptyr*' unhide
..

# Devices usually found in a jail.
#
[devfsrules_jail=501]
add include $hide_all
add include $unhide_basic
add include $unhide_login


And then in /etc/rc.conf, you'll need a couple of extra settings:

devfs_system_ruleset=localrules

jail_jailname_devfs_ruleset=devfsrules_jail

In your case, you'd want to put the printer device node in either one of
the already defined rulesets, or in a new set which you then include in 
the [devfsrules_jail=501] section.

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpSjwZEYDpx7.pgp
Description: PGP signature


cupssamba jailed

2009-06-23 Thread Derek Funk
Attempting to setup cups and samba into a jail. How do you mount/add 
device node /dev/ulpt0 within a jail.
Essentially I would like to know, how to add device nodes within jail 
/dev for specifically the devices I want?
I have read man pages and tutorials on setting up jails but none show 
examples of actually putting specific device nodes within jail /dev. It 
would also be nice to know, how to build a minimal install into a jail?  
What I have read so far from search does not show this either.  Reading 
mostly states to refer to man pages and man pages state see also other 
man pages.  I missing the tie together.


Derek
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org