summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-11-29 13:28:00 +0200
committerKamen Mazdrashki <kamenim@samba.org>2010-12-01 13:01:16 +0200
commit16bd9dd7aef2e92771cffc7be55d4f35687c0e64 (patch)
treef48159898671f17209605c8469650dd5d5a048ca /source4
parent4041791d01b10b250dab5b356f0477fb8a40907e (diff)
downloadsamba-16bd9dd7aef2e92771cffc7be55d4f35687c0e64.tar.gz
samba-16bd9dd7aef2e92771cffc7be55d4f35687c0e64.tar.bz2
samba-16bd9dd7aef2e92771cffc7be55d4f35687c0e64.zip
s4-dsdb/prefixMap: Add prefixMap shallow copy function
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_prefixmap.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c
index 18b22ffdcd..f900f40a90 100644
--- a/source4/dsdb/schema/schema_prefixmap.c
+++ b/source4/dsdb/schema/schema_prefixmap.c
@@ -121,6 +121,23 @@ WERROR dsdb_schema_pfm_new(TALLOC_CTX *mem_ctx, struct dsdb_schema_prefixmap **_
}
+struct dsdb_schema_prefixmap *dsdb_schema_pfm_copy_shallow(TALLOC_CTX *mem_ctx,
+ const struct dsdb_schema_prefixmap *pfm)
+{
+ uint32_t i;
+ struct dsdb_schema_prefixmap *pfm_copy;
+
+ pfm_copy = _dsdb_schema_prefixmap_talloc(mem_ctx, pfm->length);
+ if (!pfm_copy) {
+ return NULL;
+ }
+ for (i = 0; i < pfm_copy->length; i++) {
+ pfm_copy->prefixes[i] = pfm->prefixes[i];
+ }
+
+ return pfm_copy;
+}
+
/**
* Adds oid to prefix map.
* On success returns ID for newly added index