[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extend Timeout for kpasswd Client?



On Thu, 28 Feb 2008, Henry B. Hotz wrote:

> I've got some slow plugins in kpasswdd.  Anyone know offhand where to change 
> the 2 second retry interval that kapsswd uses?
>

Looks like it's in src/lib/krb5/changepw.c in change_password_loop():

             for (i = 0; !done && i < 5; ++i) {
                 fd_set fdset;
                 struct timeval tv;

                 if (!replied) {
                     replied = 0;

                     ret = (*proc->send_req) (context,
                                              &auth_context,
                                              creds,
                                              targprinc,
                                              is_stream,
                                              sock,
                                              newpw,
                                              hi->hostname);
                     if (ret) {
                         close(sock);
                         goto out;
                     }
                 }

                 if (sock >= FD_SETSIZE) {
                     krb5_set_error_string(context, "fd %d too large", sock);
                     ret = ERANGE;
                     close (sock);
                     goto out;
                 }

                 FD_ZERO(&fdset);
                 FD_SET(sock, &fdset);
                 tv.tv_usec = 0;
                 tv.tv_sec  = 1 + (1 << i);

                 ret = select (sock + 1, &fdset, NULL, NULL, &tv);

-- 
Eric Sturdivant
University of Maryland
Office of Information Technology
Distributed Computing Services