* prompter.c (krb5_prompter_posix): Make ointrfunc, fd, and errcode volatile.
* promptusr.c (krb5_os_get_tty_uio): Make ointrfunc and retval volatile.
* read_pwd.c (krb5_read_password): Make ointrfunc volatile. Fix volatile decl
for readin_string (pointer is volatile, doesn't point to volatile).
* changepw.c (krb5_change_password): Wait only two minutes, not indefinitely,
for a response from the kpasswd server.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11873
dc483132-0cff-0310-8789-
dd5450dbe970
+1999-10-22 Ken Raeburn <raeburn@mit.edu>
+
+ * prompter.c (krb5_prompter_posix): Make ointrfunc, fd, and
+ errcode volatile.
+ * promptusr.c (krb5_os_get_tty_uio): Make ointrfunc and retval
+ volatile.
+ * read_pwd.c (krb5_read_password): Make ointrfunc volatile. Fix
+ volatile decl for readin_string (pointer is volatile, doesn't
+ point to volatile).
+
+ * changepw.c (krb5_change_password): Wait only two minutes, not
+ indefinitely, for a response from the kpasswd server.
+
1999-10-18 Ken Raeburn <raeburn@mit.edu>
* localaddr.c (krb5_os_localaddr): Don't bother trying to create
for (i=0; i<naddr_p; i++)
{
+ fd_set fdset;
+ struct timeval timeout;
+
if (connect(s2, &addr_p[i], sizeof(addr_p[i])) == SOCKET_ERROR)
{
if ((SOCKET_ERRNO == ECONNREFUSED) || (SOCKET_ERRNO == EHOSTUNREACH))
chpw_rep.data = (char *) malloc(chpw_rep.length);
/* XXX need a timeout/retry loop here */
+ FD_ZERO (&fdset);
+ FD_SET (s1, &fdset);
+ timeout.tv_sec = 120;
+ timeout.tv_usec = 0;
+ switch (select (s1 + 1, &fdset, 0, 0, &timeout)) {
+ case -1:
+ code = SOCKET_ERRNO;
+ goto cleanup;
+ case 0:
+ code = ETIMEDOUT;
+ goto cleanup;
+ default:
+ /* fall through */
+ ;
+ }
/* "recv" would be good enough here... except that Windows/NT
commits the atrocity of returning -1 to indicate failure,
register char *ptr;
int scratchchar;
- krb5_sigtype (*ointrfunc)();
- krb5_error_code errcode;
+ krb5_sigtype (*volatile ointrfunc)();
+ volatile krb5_error_code errcode;
int i;
#ifndef ECHO_PASSWORD
struct termios echo_control, save_control;
- int fd;
+ volatile int fd;
#endif
if (name) {
krb5_context context;
krb5_uio uio;
{
- krb5_error_code retval;
- krb5_sigtype (*ointrfunc)();
+ volatile krb5_error_code retval;
+ krb5_sigtype (*volatile ointrfunc)();
krb5_uio p;
struct termios echo_control, save_control;
int fd;
{
/* adapted from Kerberos v4 des/read_password.c */
/* readin_string is used after a longjmp, so must be volatile */
- volatile char *readin_string = 0;
+ char *volatile readin_string = 0;
register char *ptr;
int scratchchar;
- krb5_sigtype (*ointrfunc)();
+ krb5_sigtype (*volatile ointrfunc)();
krb5_error_code errcode;
#ifndef ECHO_PASSWORD
struct termios echo_control, save_control;