[SCM] Samba Shared Repository - branch master updated
David Disseldorp
ddiss at samba.org
Thu Oct 13 23:45:04 UTC 2016
The branch, master has been updated
via 22c9229 strv.c: add strv_to_env for use with execle, etc.
from 001e23f ntlmssp.idl: don't generate python bindings for ntlmssp_NTLM_RESPONSE and ntlmssp_LM_RESPONSE
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 22c92294ad06a1e3421cc66a11c6530675121ccf
Author: Trever L. Adams <trever.adams at gmail.com>
Date: Thu Oct 13 03:25:08 2016 -0600
strv.c: add strv_to_env for use with execle, etc.
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
Signed-off-by: Trever L. Adams <trever.adams at gmail.com>
Autobuild-User(master): David Disseldorp <ddiss at samba.org>
Autobuild-Date(master): Fri Oct 14 01:44:02 CEST 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
lib/util/strv.c | 26 ++++++++++++++++++++++++++
lib/util/strv.h | 1 +
2 files changed, 27 insertions(+)
Changeset truncated at 500 lines:
diff --git a/lib/util/strv.c b/lib/util/strv.c
index 577cd4d..99ce76f 100644
--- a/lib/util/strv.c
+++ b/lib/util/strv.c
@@ -155,3 +155,29 @@ void strv_delete(char **strv, char *entry)
*strv = talloc_realloc(NULL, *strv, char, len - entry_len);
}
+
+char * const *strv_to_env(TALLOC_CTX *mem_ctx, char *strv)
+{
+ char **data;
+ char *next = NULL;
+ size_t i;
+ size_t count = strv_count(strv);
+
+ if (strv == NULL) {
+ return NULL;
+ }
+
+ data = talloc_array(mem_ctx, char *, count + 1);
+
+ if (data == NULL) {
+ return NULL;
+ }
+
+ for(i = 0; i < count; i++) {
+ next = strv_next(strv, next);
+ data[i] = next;
+ }
+ data[count] = NULL;
+
+ return data;
+}
diff --git a/lib/util/strv.h b/lib/util/strv.h
index a3fe7ab..398e8ea 100644
--- a/lib/util/strv.h
+++ b/lib/util/strv.h
@@ -29,5 +29,6 @@ char *strv_next(char *strv, const char *entry);
char *strv_find(char *strv, const char *entry);
size_t strv_count(char *strv);
void strv_delete(char **strv, char *entry);
+char * const *strv_to_env(TALLOC_CTX *mem_ctx, char *strv);
#endif
--
Samba Shared Repository
More information about the samba-cvs
mailing list