New password echoes on Sol8
Ed Phillips
ed at UDel.Edu
Sat Oct 27 06:12:35 EST 2001
I tried replacing readpassphrase() for v2.9.9p2 on Sol8 with a different
version that just calls getpassphrase(). It appears to solve the echo
problem when the user tries to login in interactive mode and needs to
change their password.
Can anyone else try this with v2.9.9p2 on Solaris? Be sure to add:
#define HAVE_GETPASSPHRASE
... to config.h when compiling (since it's not a configurable option yet).
Thanks,
Ed
Ed Phillips <ed at udel.edu> University of Delaware (302) 831-6082
Systems Programmer III, Network and Systems Services
finger -l ed at polycut.nss.udel.edu for PGP public key
*** openbsd-compat/readpassphrase.c_orig Fri Oct 26 14:50:44 2001
--- openbsd-compat/readpassphrase.c Fri Oct 26 15:28:34 2001
***************
*** 33,38 ****
--- 33,40 ----
#ifndef HAVE_READPASSPHRASE
+ #ifndef HAVE_GETPASSPHRASE
+
#include <termios.h>
#include <readpassphrase.h>
***************
*** 148,153 ****
--- 150,176 ----
(void)close(input);
return(buf);
}
+ #else
+
+ #include <unistd.h>
+
+ char *
+ readpassphrase(prompt, buf, bufsiz, flags)
+ const char *prompt;
+ char *buf;
+ size_t bufsiz;
+ int flags;
+ {
+ char *phrase;
+
+ phrase = getpassphrase(prompt);
+ strncpy(buf, phrase, bufsiz - 1);
+ buf[bufsiz - 1] = '\0';
+ return buf;
+ }
+
+ #endif /* HAVE_GETPASSPHRASE */
+
#endif /* HAVE_READPASSPHRASE */
#if 0
More information about the openssh-unix-dev
mailing list