mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
nah, don't use the system's getpass() function since it too often is limited
to 8(!) or similar lengths passwords
This commit is contained in:
parent
35ba5c826d
commit
8ac90316d9
@ -1268,7 +1268,6 @@ AC_CHECK_FUNCS( strtoll \
|
|||||||
siginterrupt \
|
siginterrupt \
|
||||||
sigaction \
|
sigaction \
|
||||||
signal \
|
signal \
|
||||||
getpass \
|
|
||||||
getpass_r \
|
getpass_r \
|
||||||
strlcat \
|
strlcat \
|
||||||
getpwuid \
|
getpwuid \
|
||||||
|
@ -38,18 +38,6 @@
|
|||||||
|
|
||||||
#include "getpass.h"
|
#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
|
#ifdef HAVE_FCNTL_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
@ -224,7 +212,5 @@ char *getpass_r(const char *prompt, /* prompt to display */
|
|||||||
return password; /* return pointer to buffer */
|
return password; /* return pointer to buffer */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* DONE */
|
|
||||||
|
|
||||||
#endif /* HAVE_GETPASS */
|
#endif /* HAVE_GETPASS */
|
||||||
#endif /* HAVE_GETPASS_R */
|
#endif /* HAVE_GETPASS_R */
|
||||||
|
Loading…
Reference in New Issue
Block a user