summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-03-07 18:26:24 +0000
committerSimo Sorce <idra@samba.org>2003-03-07 18:26:24 +0000
commit8a751c019c21b1925fd352639f8237cf0a6ebac9 (patch)
treec2a906c5500c2386e17e058f6899e64ef8eda54e /source3/lib
parent04858cd7025bb4c3fdb34a2795568a6b52004c3b (diff)
downloadsamba-8a751c019c21b1925fd352639f8237cf0a6ebac9.tar.gz
samba-8a751c019c21b1925fd352639f8237cf0a6ebac9.tar.bz2
samba-8a751c019c21b1925fd352639f8237cf0a6ebac9.zip
Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :) (This used to be commit 4c6d461a8572f03cd33cba95500cc837638b732c)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_sid.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 824987f189..81d17ae3f2 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -629,3 +629,21 @@ void print_guid(GUID *guid)
d_printf("%02x", guid->info[i]);
d_printf("\n");
}
+
+/*******************************************************************
+ Tallocs a duplicate SID.
+********************************************************************/
+
+DOM_SID *sid_dup_talloc(TALLOC_CTX *ctx, DOM_SID *src)
+{
+ DOM_SID *dst;
+
+ if(!src)
+ return NULL;
+
+ if((dst = talloc_zero(ctx, sizeof(DOM_SID))) != NULL) {
+ sid_copy( dst, src);
+ }
+
+ return dst;
+}