--------------------- PatchSet 1705 Date: 2001/03/09 11:30:23 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: ran indent Members: src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c:1.1.2.17->1.1.2.18 Index: squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/NTLMSSP/Attic/ntlm_auth.c,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -u -r1.1.2.17 -r1.1.2.18 --- squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 9 Mar 2001 10:53:30 -0000 1.1.2.17 +++ squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 9 Mar 2001 11:30:23 -0000 1.1.2.18 @@ -52,7 +52,8 @@ char error_messages_buffer[BUFFER_SIZE]; #endif -char load_balance = 0, failover_enabled = 0, protocol_pedantic = 0, last_ditch_enabled = 0; +char load_balance = 0, failover_enabled = 0, protocol_pedantic = + 0, last_ditch_enabled = 0; dc *controllers = NULL; int numcontrollers = 0; @@ -126,7 +127,9 @@ void usage() { - fprintf(stderr, "%s usage:\n%s [-b] [-f] domain\\controller [domain\\controller ...]\n-b, if specified, enables load-balancing among controllers\n-f, if specified, enables failover among controllers\n-l, if specified, changes behavior on domain controller failyures to\tlast-ditch\n\nYou MUST specify at least one Domain Controller.\nYou can use either \\ or / as separator between the domain name \n\tand the controller name\n", my_program_name, my_program_name); + fprintf(stderr, + "%s usage:\n%s [-b] [-f] domain\\controller [domain\\controller ...]\n-b, if specified, enables load-balancing among controllers\n-f, if specified, enables failover among controllers\n-l, if specified, changes behavior on domain controller failyures to\tlast-ditch\n\nYou MUST specify at least one Domain Controller.\nYou can use either \\ or / as separator between the domain name \n\tand the controller name\n", + my_program_name, my_program_name); } @@ -215,19 +218,21 @@ debug("obtain_challenge: getting new challenge\n"); for (j = 0; j < numcontrollers; j++) { if (current_dc->status == DC_OK) { - debug("getting challenge from %s\\%s (attempt no. %d)\n", current_dc->domain, current_dc->controller, j+1); + debug("getting challenge from %s\\%s (attempt no. %d)\n", + current_dc->domain, current_dc->controller, j + 1); ch = make_challenge(current_dc->domain, current_dc->controller); - debug("make_challenge retuned %p\n",ch); + debug("make_challenge retuned %p\n", ch); if (ch) { - debug("Got it\n"); + debug("Got it\n"); return ch; /* All went OK, returning */ - } + } /* Huston, we've got a problem. Take this DC out of the loop */ debug("Marking DC as DEAD\n"); current_dc->status = DC_DEAD; need_dc_resurrection = 1; } else { - debug ("controller %s\\%s not OK, skipping\n",current_dc->domain, current_dc->controller); + debug("controller %s\\%s not OK, skipping\n", current_dc->domain, + current_dc->controller); } if (failover_enabled == 0) /* No failover. Just return */ return NULL; @@ -250,7 +255,8 @@ int plen; if (fgets(buf, BUFFER_SIZE, stdin) == NULL) { - fprintf(stderr, "fgets() failed! dying..... errno=%d (%s)\n", errno, strerror(errno)); + fprintf(stderr, "fgets() failed! dying..... errno=%d (%s)\n", errno, + strerror(errno)); abort(); exit(1); /* BIIG buffer */ } @@ -287,7 +293,8 @@ return; /* notreached */ case NTLM_CHALLENGE: - SEND("NA Got a challenge. We refuse to have our authority disputed"); + SEND + ("NA Got a challenge. We refuse to have our authority disputed"); return; /* notreached */ case NTLM_AUTHENTICATE: @@ -304,12 +311,16 @@ smb_errorclass = SMBlib_Error_Class(SMB_Get_Last_SMB_Err()); smb_errorcode = SMBlib_Error_Code(SMB_Get_Last_SMB_Err()); nb_error = RFCNB_Get_Last_Error(); - debug("No creds. SMBlib error %d, SMB error class %d, SMB error code %d, NB error %d\n", smblib_err, smb_errorclass, smb_errorcode, nb_error); + debug + ("No creds. SMBlib error %d, SMB error class %d, SMB error code %d, NB error %d\n", + smblib_err, smb_errorclass, smb_errorcode, nb_error); /* Should I use smblib_err? Actually it seems I can do as well * without it.. */ if (nb_error != 0) { /* netbios-level error */ - send_bh_or_ld("NetBios error!", (ntlm_authenticate *) decoded, plen); - fprintf(stderr, "NetBios error code %d (%s)\n", nb_error, RFCNB_Error_Strings[abs(nb_error)]); + send_bh_or_ld("NetBios error!", + (ntlm_authenticate *) decoded, plen); + fprintf(stderr, "NetBios error code %d (%s)\n", nb_error, + RFCNB_Error_Strings[abs(nb_error)]); return; } switch (smb_errorclass) { @@ -340,7 +351,8 @@ SEND("NA Bad Data"); return; default: - send_bh_or_ld("DOS Error", (ntlm_authenticate *) decoded, plen); + send_bh_or_ld("DOS Error", + (ntlm_authenticate *) decoded, plen); return; } case SMBC_ERRSRV: /* server errors */ @@ -354,14 +366,17 @@ SEND("NA Server access error"); return; default: - send_bh_or_ld("Server Error", (ntlm_authenticate *) decoded, plen); + send_bh_or_ld("Server Error", + (ntlm_authenticate *) decoded, plen); return; } case SMBC_ERRHRD: /* hardware errors don't really matter */ - send_bh_or_ld("Domain Controller Hardware error", (ntlm_authenticate *) decoded, plen); + send_bh_or_ld("Domain Controller Hardware error", + (ntlm_authenticate *) decoded, plen); return; case SMBC_ERRCMD: - send_bh_or_ld("Domain Controller Command Error", (ntlm_authenticate *) decoded, plen); + send_bh_or_ld("Domain Controller Command Error", + (ntlm_authenticate *) decoded, plen); return; } }