diff options
author | Gerald Carter <jerry@samba.org> | 2005-01-15 03:54:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:54 -0500 |
commit | ccdff4a998405544433aa32938963e4c37962fcc (patch) | |
tree | 0e9628d5218b905ebebcbcd2e803cb921a9e6d3e /source/lib/util_str.c | |
parent | 7bf1312287cc1ec6b97917ba25fc60d6db09f26c (diff) | |
download | samba-ccdff4a998405544433aa32938963e4c37962fcc.tar.gz samba-ccdff4a998405544433aa32938963e4c37962fcc.tar.xz samba-ccdff4a998405544433aa32938963e4c37962fcc.zip |
r4746: add server support for lsa_enum_acct_rights(); last checkin for the night
Diffstat (limited to 'source/lib/util_str.c')
-rw-r--r-- | source/lib/util_str.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 6ebada94d71..6b6581b4a7b 100644 --- a/source/lib/util_str.c +++ b/source/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; +} |