diff options
author | Michael Adam <obnox@samba.org> | 2013-08-28 14:32:19 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2013-10-01 12:01:07 +0000 |
commit | 56c80d1c829978ac394a022ff2e069c2ccfee5b4 (patch) | |
tree | 329369e2e3e24a6097495c78ad4842fc097dfb3c /source3/winbindd | |
parent | 173cdfe0a42f6d4917b0d28bfd23d7fff1ccf232 (diff) | |
download | samba-56c80d1c829978ac394a022ff2e069c2ccfee5b4.tar.gz samba-56c80d1c829978ac394a022ff2e069c2ccfee5b4.tar.bz2 samba-56c80d1c829978ac394a022ff2e069c2ccfee5b4.zip |
idmap_autorid: refactor idmap_autorid_loadconfig to use idmap_config_getconfigstr
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')
-rw-r--r-- | source3/winbindd/idmap_autorid_tdb.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/winbindd/idmap_autorid_tdb.c b/source3/winbindd/idmap_autorid_tdb.c index 6933c9e31e..1673f19674 100644 --- a/source3/winbindd/idmap_autorid_tdb.c +++ b/source3/winbindd/idmap_autorid_tdb.c @@ -264,16 +264,13 @@ NTSTATUS idmap_autorid_getconfigstr(struct db_context *db, TALLOC_CTX *mem_ctx, struct autorid_global_config *idmap_autorid_loadconfig(struct db_context *db, TALLOC_CTX *ctx) { - - TDB_DATA data; struct autorid_global_config *cfg; unsigned long minvalue, rangesize, maxranges; NTSTATUS status; + char *configstr = NULL; - status = dbwrap_fetch_bystring(db, ctx, CONFIGKEY, &data); - + status = idmap_autorid_getconfigstr(db, ctx, &configstr); if (!NT_STATUS_IS_OK(status)) { - DEBUG(10, ("No saved config found\n")); return NULL; } @@ -282,7 +279,7 @@ struct autorid_global_config *idmap_autorid_loadconfig(struct db_context *db, return NULL; } - if (sscanf((char *)data.dptr, + if (sscanf(configstr, "minvalue:%lu rangesize:%lu maxranges:%lu", &minvalue, &rangesize, &maxranges) != 3) { DEBUG(1, |