c559 /etc/rc.d/jail Patch for allowing paramater specification - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > FreeBSD Development

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

Reply
 
Thread Tools Display Modes
  #1  
Old May 11th, 2011, 07:23
mhunet mhunet is offline
Junior Member
 
Join Date: Apr 2011
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default /etc/rc.d/jail Patch for allowing paramater specification

I created a patch for /etc/rc.d/jail that allows paramaters to be set for a jail in rc.conf in the format
Code:
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.

Last edited by DutchDaemon; May 11th, 2011 at 16:49.
Reply With Quote
  #2  
Old May 11th, 2011, 07:29
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,725
Thanks: 47
Thanked 2,023 Times in 1,862 Posts
Default

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

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.
Reply With Quote
  #3  
Old May 11th, 2011, 07:54
mhunet mhunet is offline
Junior Member
 
Join Date: Apr 2011
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

  • 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 jail_*_flags. And I would say that this is quite limiting.

And even for the couple of jail paramaters that can be set from rc.conf removing their associated lines from /etc/rc.d/jail and passing them through jail_example_params would increase the efficiency of /etc/rc.d/jail 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.

Last edited by DutchDaemon; May 11th, 2011 at 16:50. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #4  
Old May 11th, 2011, 08:06
mhunet mhunet is offline
Junior Member
 
Join Date: Apr 2011
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default

The proposed patch is on my blog
http://mhunet.wordpress.com/

Last edited by mhunet; May 11th, 2011 at 20:16. Reason: moved url
Reply With Quote
The Following User Says Thank You to mhunet For This Useful Post:
VK (June 20th, 2011)
  #5  
Old December 27th, 2011, 15:20
cqexbesd cqexbesd is offline
Junior Member
 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] system allowing su to root from non-wheel chavez243ca General 6 November 12th, 2010 15:19
Difference in Single Unix Specification, POSIX and X/Open zubairahmed_cae Off-Topic 7 April 30th, 2010 23:29
"Manual root fs specification" error on boot, then crashes halfer Installing & Upgrading 3 April 2nd, 2010 10:36
Allowing non-root to use bootloadHID caesius General 0 September 16th, 2009 11:54
[Solved] Allowing users to shutdown fonz General 2 March 6th, 2009 00:58


All times are GMT +1. The time now is 04:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0