From: Michael Adam Date: Tue, 8 Feb 2011 22:24:57 +0000 (+0100) Subject: s3:net idmap restore: correctly abort operation if dbfile could not be determined X-Git-Tag: tevent-0.9.11~843 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79307cf0068e719cda9105b2faa018d337632834;p=thirdparty%2Fsamba.git s3:net idmap restore: correctly abort operation if dbfile could not be determined --- diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 42f1172ad29..439b6bbf919 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) {