From eae9b12ca56837a2a39c1ebad21eee7e502b579b Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 30 Oct 1999 20:32:40 +0000 Subject: general, drastic improvements to rpcclient. added samgroup command added samgroupmem command added proper registry key completion added sam command user-completion (e.g samuser [tab]) added sam command group-completion (e.g samgroup [tab]) (This used to be commit bc5d021916a2f070c62011870a80b3b2707aff3b) --- source3/lib/util.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index 1d318c40a1..9e13e819be 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3243,3 +3243,21 @@ void free_char_array(uint32 num_entries, char **entries) free(entries); } } + +BOOL add_chars_to_array(uint32 *len, char ***array, const char *name) +{ + if (len == NULL || array == NULL) + { + return False; + } + + (*array) = (char**)Realloc((*array), ((*len)+1) * sizeof((*array)[0])); + + if ((*array) != NULL) + { + (*array)[(*len)] = strdup(name); + (*len)++; + return True; + } + return True; +} -- cgit