--------------------- PatchSet 896 Date: 2000/12/07 08:52:14 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: fixed the last compile errors in smbval Members: ntlm_auth_modules/NTLMSSP/smbval/rfcnb-error.h:1.1.2.1->1.1.2.1.2.1 ntlm_auth_modules/NTLMSSP/smbval/rfcnb-util.c:1.1.2.1.2.1->1.1.2.1.2.2 ntlm_auth_modules/NTLMSSP/smbval/session.c:1.1.2.1.2.1->1.1.2.1.2.2 ntlm_auth_modules/NTLMSSP/smbval/smblib-priv.h:1.1.2.2.2.1->1.1.2.2.2.2 ntlm_auth_modules/NTLMSSP/smbval/smblib-util.c:1.1.2.1.2.1->1.1.2.1.2.2 ntlm_auth_modules/NTLMSSP/smbval/smblib.c:1.1.2.6.2.1->1.1.2.6.2.2 Index: squid/ntlm_auth_modules/NTLMSSP/smbval/rfcnb-error.h =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/smbval/Attic/rfcnb-error.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.2.1 diff -u -r1.1.2.1 -r1.1.2.1.2.1 --- squid/ntlm_auth_modules/NTLMSSP/smbval/rfcnb-error.h 3 Aug 2000 12:46:25 -0000 1.1.2.1 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/rfcnb-error.h 7 Dec 2000 08:52:14 -0000 1.1.2.1.2.1 @@ -48,7 +48,8 @@ #define RFCNBE_Timeout 16/* IO Timed out */ /* Text strings for the error responses */ - +extern char *RFCNB_Error_Strings[]; +/* static char *RFCNB_Error_Strings[] = { "RFCNBE_OK: Routine completed successfully.", @@ -70,6 +71,6 @@ "RFCNBE_Timeout: IO Operation timed out ..." }; - +*/ Index: squid/ntlm_auth_modules/NTLMSSP/smbval/rfcnb-util.c =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/smbval/Attic/rfcnb-util.c,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -u -r1.1.2.1.2.1 -r1.1.2.1.2.2 --- squid/ntlm_auth_modules/NTLMSSP/smbval/rfcnb-util.c 5 Dec 2000 15:16:36 -0000 1.1.2.1.2.1 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/rfcnb-util.c 7 Dec 2000 08:52:14 -0000 1.1.2.1.2.2 @@ -32,6 +32,7 @@ #include "rfcnb-io.h" #include + extern void (*Prot_Print_Routine)(); /* Pointer to protocol print routine */ /* Convert name and pad to 16 chars as needed */ Index: squid/ntlm_auth_modules/NTLMSSP/smbval/session.c =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/smbval/Attic/session.c,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -u -r1.1.2.1.2.1 -r1.1.2.1.2.2 --- squid/ntlm_auth_modules/NTLMSSP/smbval/session.c 5 Dec 2000 15:16:36 -0000 1.1.2.1.2.1 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/session.c 7 Dec 2000 08:52:14 -0000 1.1.2.1.2.2 @@ -36,6 +36,30 @@ #include "rfcnb-util.h" #include "rfcnb-io.h" +/* global data structures */ + +static char *RFCNB_Error_Strings[] = { + + "RFCNBE_OK: Routine completed successfully.", + "RFCNBE_NoSpace: No space available for a malloc call.", + "RFCNBE_BadName: NetBIOS name could not be translated to IP address.", + "RFCNBE_BadRead: Read system call returned an error. Check errno.", + "RFCNBE_BadWrite: Write system call returned an error. Check errno.", + "RFCNBE_ProtErr: A protocol error has occurred.", + "RFCNBE_ConGone: Connection dropped during a read or write system call.", + "RFCNBE_BadHandle: Bad connection handle passed.", + "RFCNBE_BadSocket: Problems creating socket.", + "RFCNBE_ConnectFailed: Connection failed. See errno.", + "RFCNBE_CallRejNLOCN: Call rejected. Not listening on called name.", + "RFCNBE_CallRejNLFCN: Call rejected. Not listening for called name.", + "RFCNBE_CallRejCNNP: Call rejected. Called name not present.", + "RFCNBE_CallRejInfRes: Call rejected. Name present, but insufficient resources.", + "RFCNBE_CallRejUnSpec: Call rejected. Unspecified error.", + "RFCNBE_BadParam: Bad parameters passed to a routine.", + "RFCNBE_Timeout: IO Operation timed out ..." + +}; + int RFCNB_Stats[RFCNB_MAX_STATS]; void (*Prot_Print_Routine)() = NULL; /* Pointer to print routine */ Index: squid/ntlm_auth_modules/NTLMSSP/smbval/smblib-priv.h =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/smbval/Attic/smblib-priv.h,v retrieving revision 1.1.2.2.2.1 retrieving revision 1.1.2.2.2.2 diff -u -r1.1.2.2.2.1 -r1.1.2.2.2.2 --- squid/ntlm_auth_modules/NTLMSSP/smbval/smblib-priv.h 5 Dec 2000 15:16:36 -0000 1.1.2.2.2.1 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/smblib-priv.h 7 Dec 2000 08:52:14 -0000 1.1.2.2.2.2 @@ -496,6 +496,9 @@ /* We must make it possible for callers to specify these ... */ +extern char *SMB_Prots[]; + +/* static char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0", "MICROSOFT NETWORKS 1.03", "MICROSOFT NETWORKS 3.0", @@ -509,7 +512,10 @@ "NT LM 0.12", "NT LANMAN 1.0", NULL}; +*/ +extern int SMB_Types[]; +/* static int SMB_Types[] = {SMB_P_Core, SMB_P_CorePlus, SMB_P_DOSLanMan1, @@ -523,7 +529,7 @@ SMB_P_NT1, SMB_P_NT1, -1}; - +*/ typedef struct SMB_Status { union { @@ -636,4 +642,8 @@ int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName, char *PassWord, char *UserDomain, int precrypted); +int SMB_Get_Error_Msg(int msg, char *msgbuf, int len); + +int SMB_Get_Last_Error(); + #endif /* __SMBLIB_PRIV_H__ */ Index: squid/ntlm_auth_modules/NTLMSSP/smbval/smblib-util.c =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/smbval/Attic/smblib-util.c,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -u -r1.1.2.1.2.1 -r1.1.2.1.2.2 --- squid/ntlm_auth_modules/NTLMSSP/smbval/smblib-util.c 5 Dec 2000 15:16:36 -0000 1.1.2.1.2.1 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/smblib-util.c 7 Dec 2000 08:52:14 -0000 1.1.2.1.2.2 @@ -28,6 +28,36 @@ #include "rfcnb.h" +/* global data structures */ + +static int SMB_Types[] = {SMB_P_Core, + SMB_P_CorePlus, + SMB_P_DOSLanMan1, + SMB_P_DOSLanMan1, + SMB_P_LanMan1, + SMB_P_DOSLanMan2, + SMB_P_LanMan2, + SMB_P_LanMan2_1, + SMB_P_LanMan2_1, + SMB_P_NT1, + SMB_P_NT1, + SMB_P_NT1, + -1}; + +static char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0", + "MICROSOFT NETWORKS 1.03", + "MICROSOFT NETWORKS 3.0", + "DOS LANMAN1.0", + "LANMAN1.0", + "DOS LM1.2X002", + "LM1.2X002", + "DOS LANMAN2.1", + "LANMAN2.1", + "Samba", + "NT LM 0.12", + "NT LANMAN 1.0", + NULL}; + /* Print out an SMB pkt in all its gory detail ... */ void SMB_Print_Pkt(FILE fd, RFCNB_Pkt *pkt, BOOL command, int Offset, int Len) Index: squid/ntlm_auth_modules/NTLMSSP/smbval/smblib.c =================================================================== RCS file: /cvsroot/squid-sf//squid/ntlm_auth_modules/NTLMSSP/smbval/Attic/smblib.c,v retrieving revision 1.1.2.6.2.1 retrieving revision 1.1.2.6.2.2 diff -u -r1.1.2.6.2.1 -r1.1.2.6.2.2 --- squid/ntlm_auth_modules/NTLMSSP/smbval/smblib.c 5 Dec 2000 15:16:36 -0000 1.1.2.6.2.1 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/smblib.c 7 Dec 2000 08:52:14 -0000 1.1.2.6.2.2 @@ -150,7 +150,9 @@ /* hacked by Kinkie */ i=gethostname(con->myname,sizeof(con->myname)); if (i==-1) + { strcpy(con->myname,"unknown"); + } else { if (NULL!=(address=strchr(con->myname,'.'))) { *address='\0'; /* truncate at first '.' */