View | Details | Raw Unified | Return to bug 1693 | Differences between
and this patch

Collapse All | Expand All

(-)authfile.c (-2 / +10 lines)
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);
(-)sshconnect2.c (-1 / +1 lines)
Lines 1250-1256 load_identity_file(char *filename) Link Here
1250
{
1250
{
1251
	Key *private;
1251
	Key *private;
1252
	char prompt[300], *passphrase;
1252
	char prompt[300], *passphrase;
1253
	int perm_ok, quit, i;
1253
	int perm_ok = 0, quit, i;
1254
	struct stat st;
1254
	struct stat st;
1255
1255
1256
	if (stat(filename, &st) < 0) {
1256
	if (stat(filename, &st) < 0) {

Return to bug 1693