From 7f67a28c2a2ee81b0998e57a10bccbdfe9078fd7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 29 Jan 2003 13:16:03 +0000 Subject: HAVE_WRITABLE_ARGV is set if argv[] is writable on the system, and then we attempt to hide some of the more sensitive command line arguments --- configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 43a6678d8..9542f00d6 100644 --- a/configure.in +++ b/configure.in @@ -318,6 +318,22 @@ if test -n "$RANDOM_FILE" ; then [a suitable file to read random data from]) fi +dnl ********************************************************************** +dnl Check if the operating system allows programs to write to their own argv[] +dnl ********************************************************************** + +AC_MSG_CHECKING([if argv can be written to]) +AC_TRY_RUN([ +int main(int argc, char ** argv) { + argv[0][0] = ' '; + return (argv[0][0] == ' ')?0:1; +} + ], + AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) +) + dnl ********************************************************************** dnl Check for the presence of Kerberos4 libraries and headers dnl ********************************************************************** -- cgit v1.2.3