/etc/rc.d/jail Patch for allowing paramater specification

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

/etc/rc.d/jail Patch for allowing paramater specification

Postby mhunet » 11 May 2011, 06:23

I created a patch for [FILE]/etc/rc.d/jail[/FILE] that allows paramaters to be set for a jail in [FILE]rc.conf[/FILE] in the format
Code: Select all
jail_example_params="children.max=99 allow.raw_sockets


Seeing as there is no other way to set the majority of a jail's paramaters at boot I was wondering if anybody would be interested in this or how I would go about contributing this to the base system.
mhunet
Junior Member
 
Posts: 12
Joined: 21 Apr 2011, 16:17

Postby SirDice » 11 May 2011, 06:29

Allow.raw_sockets can't be set per jail and is already covered by [file]jail_socket_unixiproute_only[/file]. Besides that there's also already a [file]jail_*_flags[/file].

What parameters are you trying to set?
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16196
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby mhunet » 11 May 2011, 06:54

  • cpuset.id
  • enforce_statfs
  • children.max
  • allow.set_hostname
  • allow.sysvipc
  • allow.chflags
  • allow.mount
  • allow.quotas
  • allow.socket_af

As far as I know none of the above paramaters are able to be set through the use of [FILE]jail_*_flags[/FILE]. And I would say that this is quite limiting.

And even for the couple of jail paramaters that can be set from [FILE]rc.conf[/FILE] removing their associated lines from [FILE]/etc/rc.d/jail[/FILE] and passing them through [FILE]jail_example_params[/FILE] would increase the efficiency of [FILE]/etc/rc.d/jail[/FILE] by decreasing its size and amount of cpu usage. This may not be a significant amount but I think the increase in funtionality while staying true to the rc system and increasing its efficiency is a no-brainer.
mhunet
Junior Member
 
Posts: 12
Joined: 21 Apr 2011, 16:17

Postby mhunet » 11 May 2011, 07:06

The proposed patch is on my blog
http://mhunet.wordpress.com/
mhunet
Junior Member
 
Posts: 12
Joined: 21 Apr 2011, 16:17

Postby cqexbesd » 27 Dec 2011, 14:20

You can submit patches using send-pr. I know the page talks mainly about bugs but new features can be submitted that way as well. Your report will then go in the list of PRs and hopefully come to the attention of a committer. Make sure you read the guidelines about filling out the PR form to give a smoother ride!

HTH,

Andrew
cqexbesd
Junior Member
 
Posts: 3
Joined: 27 Dec 2011, 14:03


Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests