summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-02-08 23:24:57 +0100
committerMichael Adam <obnox@samba.org>2011-02-09 14:00:34 +0100
commit79307cf0068e719cda9105b2faa018d337632834 (patch)
tree095af0c047f69abb7ec72ab1e8229ab221d41e33 /source3
parent92f856c51380b67ecd2e175a6ad0237d34b0eaff (diff)
downloadsamba-79307cf0068e719cda9105b2faa018d337632834.tar.gz
samba-79307cf0068e719cda9105b2faa018d337632834.tar.bz2
samba-79307cf0068e719cda9105b2faa018d337632834.zip
s3:net idmap restore: correctly abort operation if dbfile could not be determined
Diffstat (limited to 'source3')
-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) {