summaryrefslogtreecommitdiff
path: root/source3/lib/popt_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/popt_common.c')
-rw-r--r--source3/lib/popt_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index 7f7d23fa00..8f0f7c62bb 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -327,6 +327,11 @@ static void get_password_file(void)
close_it = True;
}
+ if (fd < 0) {
+ fprintf(stderr, "fd = %d, < 0\n", fd);
+ exit(1);
+ }
+
for(p = pass, *p = '\0'; /* ensure that pass is null-terminated */
p && p - pass < sizeof(pass);) {
switch (read(fd, p, 1)) {