summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-04-04 21:34:12 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-04-07 15:53:20 +0200
commitddb41f2af48caa856ce45338cffaadaa9226c76c (patch)
treeabe4e6d3bd372e4b4ef9fc4e3ffecbd190bb5698 /source4
parent6cef940b40b859e0b80cad1a679818de2a5b418e (diff)
downloadsamba-ddb41f2af48caa856ce45338cffaadaa9226c76c.tar.gz
samba-ddb41f2af48caa856ce45338cffaadaa9226c76c.tar.bz2
samba-ddb41f2af48caa856ce45338cffaadaa9226c76c.zip
dsdb:schema/schema_syntax.c - correctly check error code of "ldb_string_utc_to_time"
This one doesn't set ERRNO. An error happens if the result is "0". Reviewed-by: abartlet
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_syntax.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index afb53377fe..ea582db68b 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -637,9 +637,8 @@ static WERROR dsdb_syntax_NTTIME_UTC_validate_ldb(const struct dsdb_syntax_ctx *
}
memcpy(buf, in->values[i].data, in->values[i].length);
- errno = 0;
t = ldb_string_utc_to_time(buf);
- if (errno != 0) {
+ if (t == 0) {
return WERR_DS_INVALID_ATTRIBUTE_SYNTAX;
}