svn commit: samba r26465 - in branches/SAMBA_4_0/source/utils: .

kai at samba.org kai at samba.org
Sat Dec 15 23:15:18 GMT 2007


Author: kai
Date: 2007-12-15 23:15:18 +0000 (Sat, 15 Dec 2007)
New Revision: 26465

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26465

Log:
ntlm_auth: Remoce pstring.

Modified:
   branches/SAMBA_4_0/source/utils/ntlm_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/utils/ntlm_auth.c
===================================================================
--- branches/SAMBA_4_0/source/utils/ntlm_auth.c	2007-12-15 22:23:45 UTC (rev 26464)
+++ branches/SAMBA_4_0/source/utils/ntlm_auth.c	2007-12-15 23:15:18 UTC (rev 26465)
@@ -339,16 +339,25 @@
 **/
 static bool in_list(const char *s, const char *list, bool casesensitive)
 {
-	pstring tok;
+	char *tok;
+	size_t tok_len = 1024;
 	const char *p=list;
 
 	if (!list)
 		return false;
 
-	while (next_token(&p, tok, LIST_SEP, sizeof(tok))) {
-		if ((casesensitive?strcmp:strcasecmp_m)(tok,s) == 0)
+	tok = (char *)malloc(tok_len);
+	if (!tok) {
+		return false;
+	}
+
+	while (next_token(&p, tok, LIST_SEP, tok_len)) {
+		if ((casesensitive?strcmp:strcasecmp_m)(tok,s) == 0) {
+			free(tok);
 			return true;
+		}
 	}
+	free(tok);
 	return false;
 }
 



More information about the samba-cvs mailing list