1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3:net idmap restore: fix segfault on missing input file

This commit is contained in:
Gregor Beck 2011-02-08 12:03:08 +01:00 committed by Michael Adam
parent 47f499abf6
commit 1f1a165ea9

View File

@ -190,6 +190,12 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv)
if (argc == 1) {
input = fopen(argv[0], "r");
if (input == NULL) {
d_fprintf(stderr, _("Could not open input file (%s): %s\n"),
argv[0], strerror(errno));
ret = -1;
goto done;
}
} else {
input = stdin;
}