diff options
author | Michael Adam <obnox@samba.org> | 2013-09-10 18:07:15 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2013-10-01 12:04:44 +0000 |
commit | 802b9d7ec614e25ff99c367cfaf267d8334311f1 (patch) | |
tree | 697ca5837489e094b38b48c7bb4ea8cdd3db7bda /source3/winbindd/idmap_autorid.c | |
parent | f6c34b1e236aab275d6cfbc12e57af7d692b8c19 (diff) | |
download | samba-802b9d7ec614e25ff99c367cfaf267d8334311f1.tar.gz samba-802b9d7ec614e25ff99c367cfaf267d8334311f1.tar.bz2 samba-802b9d7ec614e25ff99c367cfaf267d8334311f1.zip |
idmap_autorid: change idmap_autorid_loadconfig() to return NTSTATUS
for better error propagation.
Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/winbindd/idmap_autorid.c')
-rw-r--r-- | source3/winbindd/idmap_autorid.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index d6fd0b9c56..60ce33c35f 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -665,7 +665,14 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom) config->minvalue, config->rangesize, config->maxranges)); /* read previously stored config and current HWM */ - storedconfig = idmap_autorid_loadconfig(autorid_db, talloc_tos()); + status = idmap_autorid_loadconfig(autorid_db, talloc_tos(), + &storedconfig); + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { + DEBUG(5, ("No configuration found. Storing initial " + "configuration.\n")); + } else if (!NT_STATUS_IS_OK(status)) { + goto error; + } status = dbwrap_fetch_uint32_bystring(autorid_db, HWM, &hwm); if (!NT_STATUS_IS_OK(status)) { |