Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153332332
D3630.id8659.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3630.id8659.diff
View Options
Index: etc/login.conf
===================================================================
--- etc/login.conf
+++ etc/login.conf
@@ -36,7 +36,8 @@
:memoryuse=unlimited:\
:filesize=unlimited:\
:coredumpsize=unlimited:\
- :openfiles=unlimited:\
+ :openfiles-cur=4096:\
+ :openfiles-max=65536:\
:maxproc=unlimited:\
:sbsize=unlimited:\
:vmemoryuse=unlimited:\
@@ -61,6 +62,8 @@
:tc=default:
daemon:\
:memorylocked=128M:\
+ :openfiles-cur=32768:\
+ :openfiles-max=65536:\
:tc=default:
news:\
:tc=default:
Index: etc/rc.subr
===================================================================
--- etc/rc.subr
+++ etc/rc.subr
@@ -768,6 +768,8 @@
#
# ${name}_prepend n Command added before ${command}.
#
+# ${name}_login_class n Login class to use, else "daemon".
+#
# ${rc_arg}_cmd n If set, use this as the method when invoked;
# Otherwise, use default command (see below)
#
@@ -942,7 +944,12 @@
_nice=\$${name}_nice _user=\$${name}_user \
_group=\$${name}_group _groups=\$${name}_groups \
_fib=\$${name}_fib _env=\$${name}_env \
- _prepend=\$${name}_prepend
+ _prepend=\$${name}_prepend _login_class=\$${name}_login_class
+
+ # Default to 'daemon' if no login class is provided
+ if [ "x$_login_class" = "x" ]; then
+ _login_class="daemon"
+ fi
if [ -n "$_user" ]; then # unset $_user if running as that user
if [ "$_user" = "$(eval $IDCMD)" ]; then
@@ -1050,6 +1057,9 @@
fi
fi
+ # Prepend default limits
+ _doit="limits -C $_login_class $_doit"
+
# run the full command
#
if ! _run_rc_doit "$_doit"; then
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 1:07 PM (2 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31912164
Default Alt Text
D3630.id8659.diff (1 KB)
Attached To
Mode
D3630: Fix default login class for services started via command line; allow service class in /etc/login.conf to be overridden.
Attached
Detach File
Event Timeline
Log In to Comment