[Bug 235122] rc.subr limits call breaks non-root usage
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jan 22 09:46:13 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235122
Bug ID: 235122
Summary: rc.subr limits call breaks non-root usage
Product: Base System
Version: 11.2-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: conf
Assignee: bugs at FreeBSD.org
Reporter: freebsd-bugs at virtualtec.ch
We sometimes want customers to be able to restart services (like ldap)
running on non-standard and non-privileged ports. With the new unconditional
call to "limits" in the rc.subr start function, this fails:
$ sh /usr/local/etc/rc.d/slapd start
Starting slapd.
limits: setrlimit datasize: Operation not permitted
I suggest a change like the following:
--- /etc/rc.subr.orig 2019-01-22 10:40:13.973245000 +0100
+++ /etc/rc.subr 2019-01-22 09:51:18.058288000 +0100
@@ -1073,7 +1073,9 @@
fi
# Prepend default limits
- _doit="$_cd limits -C $_login_class $_doit"
+ if [ `/usr/bin/id -u` -eq 0 ]; then
+ _doit="$_cd limits -C $_login_class $_doit"
+ fi
# run the full command
#
and the same service can now be maintained by a non privileged user:
$ sh /usr/local/etc/rc.d/slapd start
Starting slapd.
Kind regards,
Markus
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list