From 79307cf0068e719cda9105b2faa018d337632834 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 8 Feb 2011 23:24:57 +0100 Subject: s3:net idmap restore: correctly abort operation if dbfile could not be determined --- source3/utils/net_idmap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/utils/net_idmap.c') diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 42f1172ad2..439b6bbf91 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -197,6 +197,11 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) dbfile = net_idmap_dbfile(c); + if (dbfile == NULL) { + ret = -1; + goto done; + } + d_fprintf(stderr, _("restoring id mapping to %s\n"), dbfile); if (argc == 1) { -- cgit