mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
r26465: ntlm_auth: Remoce pstring.
(This used to be commit 15b388ce51cafcf09301fe6d8a50922a3b9b43d1)
This commit is contained in:
parent
1bc38f9fb3
commit
3dc7779c61
@ -339,16 +339,25 @@ static const char *get_password(struct cli_credentials *credentials)
|
||||
**/
|
||||
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)
|
||||
return true;
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user