--------------------- PatchSet 524 Date: 2000/08/10 15:09:25 Author: kinkie Branch: ntlm Tag: (none) Log: Reimplemented SMB_Get_My_Name, looks saner and seems to work. Members: ntlm_auth_modules/NTLMSSP/smbval/smblib.c:1.1.2.5->1.1.2.6 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.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid/ntlm_auth_modules/NTLMSSP/smbval/smblib.c 10 Aug 2000 11:54:57 -0000 1.1.2.5 +++ squid/ntlm_auth_modules/NTLMSSP/smbval/smblib.c 10 Aug 2000 15:09:25 -0000 1.1.2.6 @@ -143,7 +143,18 @@ strcpy(con -> LMType, SMBLIB_DEFAULT_LMTYPE); con -> first_tree = con -> last_tree = NULL; - SMB_Get_My_Name(con -> myname, sizeof(con -> myname)); + /* ugh. This is horribly broken. */ +/* SMB_Get_My_Name(con -> myname, sizeof(con -> myname)); */ + /* 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 '.' */ + } + } + con -> port = 0; /* No port selected */