|
Lines 559-565
key_load_private_type(int type, const ch
Link Here
|
| 559 |
int fd; |
559 |
int fd; |
| 560 |
|
560 |
|
| 561 |
fd = open(filename, O_RDONLY); |
561 |
fd = open(filename, O_RDONLY); |
| 562 |
if (fd < 0) |
562 |
if (fd < 0) { |
|
|
563 |
debug("could not open key file '%s': %s", filename, |
| 564 |
strerror(errno)); |
| 565 |
if (perm_ok != NULL) |
| 566 |
*perm_ok = 0; |
| 567 |
} |
| 563 |
return NULL; |
568 |
return NULL; |
| 564 |
if (!key_perm_ok(fd, filename)) { |
569 |
if (!key_perm_ok(fd, filename)) { |
| 565 |
if (perm_ok != NULL) |
570 |
if (perm_ok != NULL) |
|
Lines 595-602
key_load_private(const char *filename, c
Link Here
|
| 595 |
int fd; |
600 |
int fd; |
| 596 |
|
601 |
|
| 597 |
fd = open(filename, O_RDONLY); |
602 |
fd = open(filename, O_RDONLY); |
| 598 |
if (fd < 0) |
603 |
if (fd < 0) { |
|
|
604 |
debug("could not open key file '%s': %s", filename, |
| 605 |
strerror(errno)); |
| 599 |
return NULL; |
606 |
return NULL; |
|
|
607 |
} |
| 600 |
if (!key_perm_ok(fd, filename)) { |
608 |
if (!key_perm_ok(fd, filename)) { |
| 601 |
error("bad permissions: ignore key: %s", filename); |
609 |
error("bad permissions: ignore key: %s", filename); |
| 602 |
close(fd); |
610 |
close(fd); |