summaryrefslogtreecommitdiff
path: root/lib/ldb-samba
diff options
context:
space:
mode:
authorSwen Schillig <swen@linux.ibm.com>2019-06-04 08:57:03 +0200
committerRalph Boehme <slow@samba.org>2019-06-30 11:32:18 +0000
commita8bbd60fd9d10afa0aaf9359782428b8836a9732 (patch)
tree2b13141739710b4d2c2d1e1e25f43b87535fc23b /lib/ldb-samba
parent73640b8ad8ced213d4855a2698df0d15318696ac (diff)
downloadsamba-a8bbd60fd9d10afa0aaf9359782428b8836a9732.tar.gz
lib: Update all consumers of strtoul_err(), strtoull_err() to new API
Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'lib/ldb-samba')
-rw-r--r--lib/ldb-samba/ldb_matching_rules.c18
-rw-r--r--lib/ldb-samba/ldif_handlers.c2
2 files changed, 13 insertions, 7 deletions
diff --git a/lib/ldb-samba/ldb_matching_rules.c b/lib/ldb-samba/ldb_matching_rules.c
index 0754e7e066b..4b357bb706a 100644
--- a/lib/ldb-samba/ldb_matching_rules.c
+++ b/lib/ldb-samba/ldb_matching_rules.c
@@ -382,7 +382,6 @@ static int dsdb_match_for_dns_to_tombstone_time(struct ldb_context *ldb,
DBG_ERR("Invalid timestamp passed\n");
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
} else {
- char *p = NULL;
int error = 0;
char s[value_to_match->length+1];
@@ -392,8 +391,12 @@ static int dsdb_match_for_dns_to_tombstone_time(struct ldb_context *ldb,
DBG_ERR("Empty timestamp passed\n");
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
}
- tombstone_time = strtoull_err(s, &p, 10, &error);
- if (error != 0 || *p != '\0') {
+ tombstone_time = smb_strtoull(s,
+ NULL,
+ 10,
+ &error,
+ SMB_STR_FULL_STR_CONV);
+ if (error != 0) {
DBG_ERR("Invalid timestamp string passed\n");
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
}
@@ -514,7 +517,6 @@ static int dsdb_match_for_expunge(struct ldb_context *ldb,
if (value_to_match->length >=64) {
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
} else {
- char *p = NULL;
int error = 0;
char s[value_to_match->length+1];
@@ -523,8 +525,12 @@ static int dsdb_match_for_expunge(struct ldb_context *ldb,
if (s[0] == '\0' || s[0] == '-') {
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
}
- tombstone_time = strtoull_err(s, &p, 10, &error);
- if (error != 0 || *p != '\0') {
+ tombstone_time = smb_strtoull(s,
+ NULL,
+ 10,
+ &error,
+ SMB_STR_FULL_STR_CONV);
+ if (error != 0) {
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
}
}
diff --git a/lib/ldb-samba/ldif_handlers.c b/lib/ldb-samba/ldif_handlers.c
index 23d0860dd9b..e74a7182ecf 100644
--- a/lib/ldb-samba/ldif_handlers.c
+++ b/lib/ldb-samba/ldif_handlers.c
@@ -622,7 +622,7 @@ static int ldif_read_prefixMap(struct ldb_context *ldb, void *mem_ctx,
}
blob->ctr.dsdb.mappings[blob->ctr.dsdb.num_mappings].id_prefix =
- strtoul_err(line, &oid, 10, &error);
+ smb_strtoul(line, &oid, 10, &error, SMB_STR_STANDARD);
if (oid[0] != ':' || error != 0) {
talloc_free(tmp_ctx);