summaryrefslogtreecommitdiff
path: root/ssh-rand-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-rand-helper.c')
-rw-r--r--ssh-rand-helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 3a4a165fa..d88a246eb 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -573,7 +573,8 @@ prng_write_seedfile(void)
573 /* Try to ensure that the parent directory is there */ 573 /* Try to ensure that the parent directory is there */
574 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, 574 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
575 _PATH_SSH_USER_DIR); 575 _PATH_SSH_USER_DIR);
576 mkdir(filename, 0700); 576 if (mkdir(filename, 0700) < 0)
577 fatal("mkdir: %s", strerror(errno));
577 578
578 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, 579 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
579 SSH_PRNG_SEED_FILE); 580 SSH_PRNG_SEED_FILE);
@@ -782,6 +783,7 @@ prng_read_commands(char *cmdfilename)
782 debug("Loaded %d entropy commands from %.100s", cur_cmd, 783 debug("Loaded %d entropy commands from %.100s", cur_cmd,
783 cmdfilename); 784 cmdfilename);
784 785
786 fclose(f);
785 return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0; 787 return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0;
786} 788}
787 789