--------------------- PatchSet 2896 Date: 2001/08/29 14:08:24 Author: rbcollins Branch: ntlm Tag: (none) Log: fix formatting changes Members: src/auth/ntlm/helpers/NTLMSSP/libntlmssp.c:1.1.4.10->1.1.4.11 src/auth/ntlm/helpers/NTLMSSP/ntlm.h:1.1.4.14->1.1.4.15 src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c:1.1.4.23->1.1.4.24 Index: squid/src/auth/ntlm/helpers/NTLMSSP/libntlmssp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/NTLMSSP/Attic/libntlmssp.c,v retrieving revision 1.1.4.10 retrieving revision 1.1.4.11 diff -u -r1.1.4.10 -r1.1.4.11 --- squid/src/auth/ntlm/helpers/NTLMSSP/libntlmssp.c 29 Aug 2001 13:59:44 -0000 1.1.4.10 +++ squid/src/auth/ntlm/helpers/NTLMSSP/libntlmssp.c 29 Aug 2001 14:08:24 -0000 1.1.4.11 @@ -36,13 +36,12 @@ #include "smblib-priv.h" /* for SMB_Handle_Type */ /* a few forward-declarations. Hackish, but I don't care right now */ -SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle, char *server, - char *NTdomain); +SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle, char *server, char *NTdomain); /* this one is reallllly haackiish. We really should be using anything from smblib-priv.h */ static char *SMB_Prots[] = -{ "PC NETWORK PROGRAM 1.0", +{"PC NETWORK PROGRAM 1.0", "MICROSOFT NETWORKS 1.03", "MICROSOFT NETWORKS 3.0", "DOS LANMAN1.0", @@ -122,15 +121,14 @@ debug("Couldn't connect to SMB Server. Error:%s\n", errstr); return 1; } - if (SMB_Negotiate(handle, SMB_Prots) < 0) { /* An error */ + if (SMB_Negotiate(handle, SMB_Prots) < 0) { /* An error */ debug("Error negotiating protocol with SMB Server\n"); SMB_Discon(handle, 0); handle = NULL; return 2; } if (handle->Security == 0) { /* share-level security, unuseable */ - debug - ("SMB Server uses share-level security .. we need user sercurity.\n"); + debug("SMB Server uses share-level security .. we need user security.\n"); SMB_Discon(handle, 0); handle = NULL; return 3; @@ -227,8 +225,7 @@ memcpy(user, tmp.str, tmp.l); *(user + tmp.l) = '\0'; - debug("checking domain: '%s', user: '%s', pass='%s'\n", domain, user, - pass); + debug("checking domain: '%s', user: '%s', pass='%s'\n", domain, user, pass); rv = SMB_Logon_Server(handle, user, pass, domain, 1); debug("Login attempt had result %d\n", rv); Index: squid/src/auth/ntlm/helpers/NTLMSSP/ntlm.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/NTLMSSP/Attic/ntlm.h,v retrieving revision 1.1.4.14 retrieving revision 1.1.4.15 diff -u -r1.1.4.14 -r1.1.4.15 --- squid/src/auth/ntlm/helpers/NTLMSSP/ntlm.h 29 Aug 2001 13:59:44 -0000 1.1.4.14 +++ squid/src/auth/ntlm/helpers/NTLMSSP/ntlm.h 29 Aug 2001 14:08:24 -0000 1.1.4.15 @@ -97,7 +97,7 @@ struct _dc { char *domain; char *controller; - time_t dead; /* 0 if it's alive, otherwise time of death */ + time_t dead; /* 0 if it's alive, otherwise time of death */ dc *next; }; 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.4.23 retrieving revision 1.1.4.24 diff -u -r1.1.4.23 -r1.1.4.24 --- squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 29 Aug 2001 13:59:44 -0000 1.1.4.23 +++ squid/src/auth/ntlm/helpers/NTLMSSP/ntlm_auth.c 29 Aug 2001 14:08:24 -0000 1.1.4.24 @@ -308,18 +308,18 @@ /* notreached */ case NTLM_AUTHENTICATE: /* check against the DC */ - plen = strlen(buf) * 3 / 4; /* we only need it here. Optimization */ - signal(SIGALRM,timeout_during_auth); - alarm(30); + plen = strlen(buf) * 3 / 4; /* we only need it here. Optimization */ + signal(SIGALRM,timeout_during_auth); + alarm(30); cred = ntlm_check_auth((ntlm_authenticate *) decoded, plen); - alarm(0); - signal(SIGALRM,SIG_DFL); - if (got_timeout != 0) { - fprintf(stderr,"ntlm-auth[%d]: Timeout during authentication.\n", getpid()); - SEND("BH Timeout during authentication"); - got_timeout=0; - return; - } + alarm(0); + signal(SIGALRM,SIG_DFL); + if (got_timeout != 0) { + fprintf(stderr,"ntlm-auth[%d]: Timeout during authentication.\n", getpid()); + SEND("BH Timeout during authentication"); + got_timeout=0; + return; + } if (cred == NULL) { int smblib_err, smb_errorclass, smb_errorcode, nb_error; /* there was an error. We have two errno's to look at. @@ -330,8 +330,7 @@ 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", + 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.. */ @@ -344,8 +343,7 @@ } switch (smb_errorclass) { case SMBC_SUCCESS: - debug - ("Huh? Got a SMB success code but could check auth.."); + debug("Huh? Got a SMB success code but could check auth.."); SEND("NA Authentication failed"); /* * send_bh_or_ld("SMB success, but no creds. Internal error?",