Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/winbindd/winbindd_pam.c

    r751 r862  
    669669
    670670failed:
     671        /*
     672         * Do not delete an existing valid credential cache, if the user
     673         * e.g. enters a wrong password
     674         */
     675        if ((strequal(krb5_cc_type, "FILE") || strequal(krb5_cc_type, "WRFILE"))
     676            && user_ccache_file != NULL) {
     677                return result;
     678        }
    671679
    672680        /* we could have created a new credential cache with a valid tgt in it
     
    11531161{
    11541162        int attempts = 0;
     1163        int netr_attempts = 0;
    11551164        bool retry = false;
    11561165        NTSTATUS result;
     
    11671176
    11681177                if (!NT_STATUS_IS_OK(result)) {
    1169                         DEBUG(3,("could not open handle to NETLOGON pipe (error: %s)\n",
    1170                                   nt_errstr(result)));
    1171                         if (NT_STATUS_EQUAL(result, NT_STATUS_IO_TIMEOUT)) {
    1172                                 if (attempts > 0) {
    1173                                         DEBUG(3, ("This is the second problem for this "
    1174                                                 "particular call, forcing the close of "
    1175                                                 "this connection\n"));
    1176                                         invalidate_cm_connection(&domain->conn);
    1177                                 } else {
    1178                                         DEBUG(3, ("First call to cm_connect_netlogon "
    1179                                                 "has timed out, retrying\n"));
    1180                                         continue;
    1181                                 }
     1178                        DEBUG(3,("Could not open handle to NETLOGON pipe "
     1179                                 "(error: %s, attempts: %d)\n",
     1180                                  nt_errstr(result), netr_attempts));
     1181
     1182                        /* After the first retry always close the connection */
     1183                        if (netr_attempts > 0) {
     1184                                DEBUG(3, ("This is again a problem for this "
     1185                                          "particular call, forcing the close "
     1186                                          "of this connection\n"));
     1187                                invalidate_cm_connection(&domain->conn);
     1188                        }
     1189
     1190                        /* After the second retry failover to the next DC */
     1191                        if (netr_attempts > 1) {
     1192                                /*
     1193                                 * If the netlogon server is not reachable then
     1194                                 * it is possible that the DC is rebuilding
     1195                                 * sysvol and shutdown netlogon for that time.
     1196                                 * We should failover to the next dc.
     1197                                 */
     1198                                DEBUG(3, ("This is the third problem for this "
     1199                                          "particular call, adding DC to the "
     1200                                          "negative cache list\n"));
     1201                                add_failed_connection_entry(domain->name,
     1202                                                            domain->dcname,
     1203                                                            result);
     1204                                saf_delete(domain->name);
     1205                        }
     1206
     1207                        /* Only allow 3 retries */
     1208                        if (netr_attempts < 3) {
     1209                                DEBUG(3, ("The connection to netlogon "
     1210                                          "failed, retrying\n"));
     1211                                netr_attempts++;
     1212                                retry = true;
     1213                                continue;
    11821214                        }
    11831215                        return result;
    11841216                }
     1217                netr_attempts = 0;
     1218
    11851219                auth = netlogon_pipe->auth;
    11861220                if (netlogon_pipe->dc) {
Note: See TracChangeset for help on using the changeset viewer.