summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-19 12:23:42 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-21 23:41:05 +1100
commit9d56f656d4f593289340a876445785cdfefd3d91 (patch)
tree12a75e3571594686ee9909404abde24fef9b3d7e /source4/dsdb
parente89a2db4f24ee70c45e0636e9baa8b6212a27cde (diff)
downloadsamba-9d56f656d4f593289340a876445785cdfefd3d91.tar.gz
samba-9d56f656d4f593289340a876445785cdfefd3d91.tar.bz2
samba-9d56f656d4f593289340a876445785cdfefd3d91.zip
s4-dsdb: added dsdb_get_extended_dn_uint64()
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 774f9a757c..b0f9ef0f35 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2735,9 +2735,9 @@ NTSTATUS dsdb_get_extended_dn_guid(struct ldb_dn *dn, struct GUID *guid)
}
/*
- return a NTTIME from a extended DN structure
+ return a uint64_t from a extended DN structure
*/
-NTSTATUS dsdb_get_extended_dn_nttime(struct ldb_dn *dn, NTTIME *nttime, const char *component_name)
+NTSTATUS dsdb_get_extended_dn_uint64(struct ldb_dn *dn, uint64_t *val, const char *component_name)
{
const struct ldb_val *v;
char *s;
@@ -2749,13 +2749,21 @@ NTSTATUS dsdb_get_extended_dn_nttime(struct ldb_dn *dn, NTTIME *nttime, const ch
s = talloc_strndup(dn, (const char *)v->data, v->length);
NT_STATUS_HAVE_NO_MEMORY(s);
- *nttime = strtoull(s, NULL, 0);
+ *val = strtoull(s, NULL, 0);
talloc_free(s);
return NT_STATUS_OK;
}
/*
+ return a NTTIME from a extended DN structure
+ */
+NTSTATUS dsdb_get_extended_dn_nttime(struct ldb_dn *dn, NTTIME *nttime, const char *component_name)
+{
+ return dsdb_get_extended_dn_uint64(dn, nttime, component_name);
+}
+
+/*
return a uint32_t from a extended DN structure
*/
NTSTATUS dsdb_get_extended_dn_uint32(struct ldb_dn *dn, uint32_t *val, const char *component_name)