git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47f499a
)
s3:net idmap restore: fix segfault on missing input file
author
Gregor Beck
<gbeck@sernet.de>
Tue, 8 Feb 2011 11:03:08 +0000
(12:03 +0100)
committer
Michael Adam
<obnox@samba.org>
Wed, 9 Feb 2011 13:00:34 +0000
(14:00 +0100)
source3/utils/net_idmap.c
patch
|
blob
|
history
diff --git
a/source3/utils/net_idmap.c
b/source3/utils/net_idmap.c
index 7551354cef0c719b67b8f5c1446f5ac2cb736c3d..3f9fa80059222507d14f04ff1bce61b8524f1a50 100644
(file)
--- a/
source3/utils/net_idmap.c
+++ b/
source3/utils/net_idmap.c
@@
-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;
}