From 91fbb691a2d46402f64c9ffc337ec35e6df8e262 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 May 2008 21:12:39 +0000 Subject: [PATCH] explain why changing rlimits at this time is safe git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2372 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/daemon/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/daemon/main.c b/src/daemon/main.c index f1721b2..789d104 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -465,6 +465,13 @@ int main(int argc, char *argv[]) { } #ifdef HAVE_SYS_RESOURCE_H + /* Reset resource limits. If we are run as root (for system mode) + * this might end up increasing the limits, which is intended + * behaviour. For all other cases, i.e. started as normal user, or + * SUID root at this point we should have no CAP_SYS_RESOURCE and + * increasing the limits thus should fail. Which is, too, intended + * behaviour */ + set_all_rlimits(conf); #endif -- 2.7.4