summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-01-15 03:54:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:54 -0500
commitff909274787a92fcdb0ed36bab097f7d2ae07036 (patch)
treeb41eadef6832bed2cba4d9be555d258ed2975b67 /source3/lib
parentc727866172b5abb1cab0913eb78f3f1d58fcb9aa (diff)
downloadsamba-ff909274787a92fcdb0ed36bab097f7d2ae07036.tar.gz
samba-ff909274787a92fcdb0ed36bab097f7d2ae07036.tar.bz2
samba-ff909274787a92fcdb0ed36bab097f7d2ae07036.zip
r4746: add server support for lsa_enum_acct_rights(); last checkin for the night
(This used to be commit ccdff4a998405544433aa32938963e4c37962fcc)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_str.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 6ebada94d7..6b6581b4a7 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -2092,3 +2092,19 @@ void string_append(char **left, const char *right)
safe_strcat(*left, right, new_len-1);
}
+
+BOOL add_string_to_array(TALLOC_CTX *mem_ctx,
+ const char *str, const char ***strings,
+ int *num)
+{
+ char *dup_str = talloc_strdup(mem_ctx, str);
+
+ *strings = TALLOC_REALLOC_ARRAY(mem_ctx, *strings, const char *, (*num)+1);
+
+ if ((*strings == NULL) || (dup_str == NULL))
+ return False;
+
+ (*strings)[*num] = dup_str;
+ *num += 1;
+ return True;
+}