summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-06 21:12:39 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-06 21:12:39 +0000
commit91fbb691a2d46402f64c9ffc337ec35e6df8e262 (patch)
tree17e1a11b7c8feb5ebd1b6c08e2829d5354575a3b
parentdee3555b2a614e3fa824533125ab4b210d7f8377 (diff)
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
-rw-r--r--src/daemon/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c
index f1721b2f..789d104b 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