summaryrefslogtreecommitdiff
path: root/source4/lib/data_blob.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-06 03:44:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:32 -0500
commite1f38d81383c4adcb28b8e6e4bc0b3c7600277d4 (patch)
tree4974570769359f466a4ba2aae3e685e33980fb3d /source4/lib/data_blob.c
parentac29f519363d994052e4f6ec44c7bae40cd0d9a9 (diff)
downloadsamba-e1f38d81383c4adcb28b8e6e4bc0b3c7600277d4.tar.gz
samba-e1f38d81383c4adcb28b8e6e4bc0b3c7600277d4.tar.bz2
samba-e1f38d81383c4adcb28b8e6e4bc0b3c7600277d4.zip
r3571: rough guesses at what abartlet really wanted to do in his last commit
(which I suspect was missing some pieces) this at least fixes the build so i can keep going on pvfs. Please review/fix Andrew. (This used to be commit bffd18d09df04c1e492ef12f744ff4b6c561d53c)
Diffstat (limited to 'source4/lib/data_blob.c')
-rw-r--r--source4/lib/data_blob.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c
index 7803179d39..d2147be6b2 100644
--- a/source4/lib/data_blob.c
+++ b/source4/lib/data_blob.c
@@ -61,6 +61,18 @@ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t leng
return ret;
}
+
+/*******************************************************************
+ construct a data blob which is a reference to another blob, in
+the given mem context
+*******************************************************************/
+DATA_BLOB data_blob_talloc_reference(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
+{
+ DATA_BLOB ret = *blob;
+ ret.data = talloc_reference(mem_ctx, ret.data);
+ return ret;
+}
+
/*******************************************************************
construct a zero data blob, using supplied TALLOC_CTX.
use this sparingly as it initialises data - better to initialise