aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2017-05-01 09:10:02 +0800
committerIan Kent <raven@themaw.net>2017-05-11 10:15:57 +0800
commit92f648acf082f06ebf73febc907bf6c4ffef4518 (patch)
tree539b3a05cc1d0909c097237054bcb5248f816fbf /include
parent1a64a6bbc5c23dc2439afbb0d15d6989200a97f0 (diff)
downloadautofs-92f648acf082f06ebf73febc907bf6c4ffef4518.tar.gz
autofs-5.1.2 - add configure option for limiting getgrgid_r() stack usage
Almost all the time it isn't a problem for glibc to use stack allocation to store group information during calls to getgrgid_r(). But if it is a problem the --enable-limit-getgrgid-size configure option can be used to limit the buffer size passed to getgrgid_r() (which is used to decide whether to alloca() local storage for the call). The check allows the call to go ahead if the increased buffer size is less than 0.9 of the thread stack size. This isn't ideal because the current stack usage isn't known but should be ok much of the time. Signed-off-by: Ian Kent <raven@themaw.net>
Diffstat (limited to 'include')
-rw-r--r--include/config.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/config.h.in b/include/config.h.in
index 7037b240..e8885092 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -9,6 +9,9 @@
/* Enable exit, ignoring busy mounts */
#undef ENABLE_IGNORE_BUSY_MOUNTS
+/* Enable limit stack use of getgrgid_r() */
+#undef ENABLE_LIMIT_GETGRGID_SIZE
+
/* Disable use of locking when spawning mount command */
#undef ENABLE_MOUNT_LOCKING