diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-29 11:37:17 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-01-02 08:16:55 +1100 |
commit | c3061794ef4d03d5b26d4a221a93722b3ed08197 (patch) | |
tree | 9d66a5b128ec686cc60a64579c5337e2eb8d485f /source4/dsdb/schema | |
parent | baae6ef9d24a59f794a8cbc9aa0ccdbbeb2ed369 (diff) | |
download | samba-c3061794ef4d03d5b26d4a221a93722b3ed08197.tar.gz samba-c3061794ef4d03d5b26d4a221a93722b3ed08197.tar.bz2 samba-c3061794ef4d03d5b26d4a221a93722b3ed08197.zip |
s4-dsdb: use ldb_val_to_time() instead of ldb_string_to_time()
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema_syntax.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index 843b65d59d..de52b9c628 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -488,13 +488,17 @@ static WERROR dsdb_syntax_NTTIME_ldb_to_drsuapi(struct ldb_context *ldb, for (i=0; i < in->num_values; i++) { NTTIME v; time_t t; + int ret; out->value_ctr.values[i].blob = &blobs[i]; blobs[i] = data_blob_talloc(blobs, NULL, 8); W_ERROR_HAVE_NO_MEMORY(blobs[i].data); - t = ldb_string_to_time((const char *)in->values[i].data); + ret = ldb_val_to_time(&in->values[i], &t); + if (ret != LDB_SUCCESS) { + return WERR_DS_INVALID_ATTRIBUTE_SYNTAX; + } unix_to_nt_time(&v, t); v /= 10000000; |