summaryrefslogtreecommitdiff
path: root/passwd/apr_getpass.c
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2006-10-10 15:11:39 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2006-10-10 15:11:39 +0000
commitd054cfee77755c97ebd659fac43c4d1603dc3438 (patch)
treeac07d76ddb73040428064f9af5b31e7940aa8f0d /passwd/apr_getpass.c
parentb10d9aec16d7a7c3cfc0b7e2065642d821dd962c (diff)
downloadlibapr-d054cfee77755c97ebd659fac43c4d1603dc3438.tar.gz
* passwd/apr_getpass.c: Disable getpass() support if PASS_MAX is
defined and "small". PR: 40256 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@454774 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'passwd/apr_getpass.c')
-rw-r--r--passwd/apr_getpass.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c
index 7e8977494..4d6167e8a 100644
--- a/passwd/apr_getpass.c
+++ b/passwd/apr_getpass.c
@@ -48,6 +48,12 @@
#include <strings.h>
#endif
+/* Disable getpass() support when PASS_MAX is defined and is "small",
+ * for an arbitrary definition of "small". */
+#if defined(HAVE_GETPASS) && defined(PASS_MAX) && PASS_MAX < 32
+#undef HAVE_GETPASS
+#endif
+
#if defined(HAVE_TERMIOS_H) && !defined(HAVE_GETPASS)
#include <termios.h>
#endif