summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/net_idmap.c5
1 files changed, 5 insertions, 0 deletions
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) {