diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-02-28 04:33:51 +0300 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-02-28 04:33:51 +0300 |
commit | 796afe0536255a0f274431ee376b0d3deaf5dd96 (patch) | |
tree | 093715b40fbf45f5a57f61a190475143e4ddb0c4 /src/murmur | |
parent | 608a90cbceadcb9a62a001a51175ddcde4a7a715 (diff) |
Avoid messing with ulimits in murmurd, and first part of updated init script to use privileged capabilities
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1600 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'src/murmur')
-rw-r--r-- | src/murmur/UnixMurmur.cpp | 11 | ||||
-rw-r--r-- | src/murmur/murmur_pch.h | 2 |
2 files changed, 1 insertions, 12 deletions
diff --git a/src/murmur/UnixMurmur.cpp b/src/murmur/UnixMurmur.cpp index 393b103c6..530d0ab5b 100644 --- a/src/murmur/UnixMurmur.cpp +++ b/src/murmur/UnixMurmur.cpp @@ -227,7 +227,7 @@ void UnixMurmur::setuid() { void UnixMurmur::initialcap() { #ifdef Q_OS_LINUX - cap_value_t caps[] = {CAP_SYS_NICE, CAP_SYS_RESOURCE, CAP_NET_ADMIN, CAP_SETUID, CAP_SETGID, CAP_DAC_OVERRIDE }; + cap_value_t caps[] = {CAP_SYS_NICE, CAP_NET_ADMIN, CAP_SETUID, CAP_SETGID, CAP_DAC_OVERRIDE }; if (! bRoot) return; @@ -258,15 +258,6 @@ void UnixMurmur::finalcap() { if (! bRoot) return; - struct rlimit r; - getrlimit(RLIMIT_NOFILE, &r); - if (r.rlim_cur < 65536) { - r.rlim_max = (r.rlim_max > 65536) ? r.rlim_max : 65536; - r.rlim_cur = r.rlim_max; - qWarning("Increasing descriptor limit to %d.", static_cast<int>(r.rlim_cur)); - setrlimit(RLIMIT_NOFILE, &r); - } - int ncap = sizeof(caps)/sizeof(cap_value_t); cap_t c = cap_init(); diff --git a/src/murmur/murmur_pch.h b/src/murmur/murmur_pch.h index 02b874bbf..2e3f1d5ba 100644 --- a/src/murmur/murmur_pch.h +++ b/src/murmur/murmur_pch.h @@ -44,8 +44,6 @@ #include <sys/capability.h> #include <sys/prctl.h> #endif -#include <sys/time.h> -#include <sys/resource.h> #include <pwd.h> #ifdef __FreeBSD__ #include <netinet/in_systm.h> |