summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-10-30 20:32:40 +0000
committerLuke Leighton <lkcl@samba.org>1999-10-30 20:32:40 +0000
commitbc5d021916a2f070c62011870a80b3b2707aff3b (patch)
treebd3c44a49fb28e26b154c5f1d06befa9038fad2d /source/lib/util.c
parent6e3b8a62b95c3dd7b6938ae45f4df8f573c5125d (diff)
downloadsamba-bc5d021916a2f070c62011870a80b3b2707aff3b.tar.gz
samba-bc5d021916a2f070c62011870a80b3b2707aff3b.tar.xz
samba-bc5d021916a2f070c62011870a80b3b2707aff3b.zip
general, drastic improvements to rpcclient.
added samgroup <groupname> command added samgroupmem <groupname> command added proper registry key completion added sam command user-completion (e.g samuser [tab]) added sam command group-completion (e.g samgroup [tab])
Diffstat (limited to 'source/lib/util.c')
-rw-r--r--source/lib/util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 1d318c40a14..9e13e819be3 100644
--- a/source/lib/util.c
+++ b/source/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;
+}