summaryrefslogtreecommitdiff
path: root/source3/lib
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
commiteae9b12ca56837a2a39c1ebad21eee7e502b579b (patch)
treea9ebc48e4a0f62d5fab67fc65d663dfea940b5f5 /source3/lib
parent431d0dca732108c817e4f3fecfb4c28641383642 (diff)
downloadsamba-eae9b12ca56837a2a39c1ebad21eee7e502b579b.tar.gz
samba-eae9b12ca56837a2a39c1ebad21eee7e502b579b.tar.bz2
samba-eae9b12ca56837a2a39c1ebad21eee7e502b579b.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]) (This used to be commit bc5d021916a2f070c62011870a80b3b2707aff3b)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c18
1 files changed, 18 insertions, 0 deletions
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;
+}