diff options
author | Gerald Carter <jerry@samba.org> | 2005-01-15 03:54:03 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-01-15 03:54:03 +0000 |
commit | ede002148ae5f63b1e8613101b414f9111a6ccc1 (patch) | |
tree | e9aa899385c675274a1890005480fffa3a9a3341 /source/lib | |
parent | 837513c94f59f05931e01c52cb97c481c2eb5bea (diff) | |
download | samba-ede002148ae5f63b1e8613101b414f9111a6ccc1.tar.gz samba-ede002148ae5f63b1e8613101b414f9111a6ccc1.tar.xz samba-ede002148ae5f63b1e8613101b414f9111a6ccc1.zip |
r4746: add server support for lsa_enum_acct_rights(); last checkin for the night
Diffstat (limited to 'source/lib')
-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; +} |