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:
parent
47f499abf6
commit
1f1a165ea9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user