summaryrefslogtreecommitdiffstats
path: root/source/lib/util_str.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-04-07 12:43:44 +0000
committerGerald Carter <jerry@samba.org>2004-04-07 12:43:44 +0000
commita5f89b6f8c6af1fa8156184709a196fe41f46f8a (patch)
treee94a50dd0252b4fc1f57f04094a1c06e24c80cc4 /source/lib/util_str.c
parent5f71b7bc783f3c92d199808e45bc2c8b20402552 (diff)
downloadsamba-a5f89b6f8c6af1fa8156184709a196fe41f46f8a.tar.gz
samba-a5f89b6f8c6af1fa8156184709a196fe41f46f8a.tar.xz
samba-a5f89b6f8c6af1fa8156184709a196fe41f46f8a.zip
r116: volker's patch for local group and group nesting
Diffstat (limited to 'source/lib/util_str.c')
-rw-r--r--source/lib/util_str.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index e4b07a4b731..600c830aced 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -2038,3 +2038,21 @@ SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr)
return val;
}
+
+void string_append(char **left, const char *right)
+{
+ int new_len = strlen(right) + 1;
+
+ if (*left == NULL) {
+ *left = malloc(new_len);
+ *left[0] = '\0';
+ } else {
+ new_len += strlen(*left);
+ *left = Realloc(*left, new_len);
+ }
+
+ if (*left == NULL)
+ return;
+
+ safe_strcat(*left, right, new_len-1);
+}