passdb: Use wrapper for string to integer conversion
authorSwen Schillig <swen@linux.ibm.com>
Mon, 28 Jan 2019 12:57:15 +0000 (13:57 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2019 00:32:10 +0000 (00:32 +0000)
commitc957f6cc069aef32d88bd6a46584a262c65579db
treee4bad66e6d3827d72b71a633ca19213b5b638b1e
parente82228f2e09d66807d0bce150bb1db9731bbd4d4
passdb: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/passdb/account_pol.c
source3/passdb/pdb_ldap.c
source3/passdb/pdb_tdb.c