if (response.extra_data.data) {
const char *extra_data = (char *)response.extra_data.data;
- fstring name;
+ char *name;
char *p;
+ TALLOC_CTX *frame = talloc_stackframe();
- while(next_token(&extra_data, name, "\n", sizeof(fstring))) {
+ while(next_token_talloc(frame,&extra_data,&name,"\n")) {
p = strchr(name, '\\');
if (p == 0) {
d_fprintf(stderr, "Got invalid response: %s\n",
extra_data);
+ TALLOC_FREE(frame);
+ SAFE_FREE(response.extra_data.data);
return False;
}
*p = 0;
d_printf("%s\n", name);
}
-
+ TALLOC_FREE(frame);
SAFE_FREE(response.extra_data.data);
}
int num_rids;
uint32 *rids;
const char *p;
- char ridstr[32];
+ char *ridstr;
const char **names;
enum lsa_SidType *types;
const char *domain_name;
rids = NULL;
p = arg;
- while (next_token(&p, ridstr, " ,\n", sizeof(ridstr))) {
+ while (next_token_talloc(mem_ctx, &p, &ridstr, " ,\n")) {
uint32 rid = strtoul(ridstr, NULL, 10);
ADD_TO_ARRAY(mem_ctx, uint32, rid, &rids, &num_rids);
}
struct winbindd_request request;
struct winbindd_response response;
const char *extra_data;
- fstring name;
+ char *name;
+ TALLOC_CTX *frame = NULL;
/* Send request to winbind daemon */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
-
+
if (domain) {
/* '.' is the special sign for our own domain */
if ( strequal(domain, ".") )
extra_data = (const char *)response.extra_data.data;
- while(next_token(&extra_data, name, ",", sizeof(fstring)))
+ frame = talloc_stackframe();
+ while(next_token_talloc(frame,&extra_data,&name, ","))
d_printf("%s\n", name);
-
+ TALLOC_FREE(frame);
+
SAFE_FREE(response.extra_data.data);
return True;
struct winbindd_request request;
struct winbindd_response response;
const char *extra_data;
- fstring name;
+ TALLOC_CTX *frame = NULL;
+ char *name;
ZERO_STRUCT(request);
ZERO_STRUCT(response);
extra_data = (const char *)response.extra_data.data;
- while(next_token(&extra_data, name, ",", sizeof(fstring)))
+ frame = talloc_stackframe();
+ while(next_token_talloc(frame,&extra_data,&name, ","))
d_printf("%s\n", name);
+ TALLOC_FREE(frame);
SAFE_FREE(response.extra_data.data);
-
+
return True;
}