nah, don't use the system's getpass() function since it too often is limited
authorDaniel Stenberg <daniel@haxx.se>
Sun, 26 Dec 2004 09:17:38 +0000 (09:17 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 26 Dec 2004 09:17:38 +0000 (09:17 +0000)
to 8(!) or similar lengths passwords

configure.ac
src/getpass.c

index 406d27f..ccc01a9 100644 (file)
@@ -1268,7 +1268,6 @@ AC_CHECK_FUNCS( strtoll \
                 siginterrupt \
                 sigaction \
                 signal \
-                getpass \
                 getpass_r \
                 strlcat \
                 getpwuid \
index 6ef8d30..2d60e7f 100644 (file)
 
 #include "getpass.h"
 
-#ifdef HAVE_GETPASS
-char *getpass_r(const char *prompt, char *password, size_t passlen)
-{
-  char *ptr = getpass(prompt);
-  strncpy(password, ptr, passlen);
-  password[passlen-1]=0;
-  return password;
-}
-#define DONE
-#else
-/* the rest of this file is only for systems without getpass() */
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -224,7 +212,5 @@ char *getpass_r(const char *prompt, /* prompt to display */
   return password; /* return pointer to buffer */
 }
 
-#endif /* DONE */
-
 #endif /* HAVE_GETPASS */
 #endif /* HAVE_GETPASS_R */