View | Details | Raw Unified | Return to bug 2042
Collapse All | Expand All

(-)a/auth2-pubkeyfile.c (-4 / +8 lines)
Lines 448-456 auth_openfile(const char *file, struct passwd *pw, int strict_modes, Link Here
448
	FILE *f;
448
	FILE *f;
449
449
450
	if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
450
	if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
451
		if (log_missing || errno != ENOENT)
451
		if (errno != ENOENT) {
452
			debug("Could not open %s '%s': %s", file_type, file,
452
			logit("Could not open user '%s' %s '%s': %s",
453
			    strerror(errno));
453
			    pw->pw_name, file_type, file, strerror(errno));
454
		} else if (log_missing) {
455
			debug("Could not open user '%s' %s '%s': %s",
456
			    pw->pw_name, file_type, file, strerror(errno));
457
		}
454
		return NULL;
458
		return NULL;
455
	}
459
	}
456
460
Lines 459-465 auth_openfile(const char *file, struct passwd *pw, int strict_modes, Link Here
459
		return NULL;
463
		return NULL;
460
	}
464
	}
461
	if (!S_ISREG(st.st_mode)) {
465
	if (!S_ISREG(st.st_mode)) {
462
		logit("User %s %s %s is not a regular file",
466
		logit("User '%s' %s '%s' is not a regular file",
463
		    pw->pw_name, file_type, file);
467
		    pw->pw_name, file_type, file);
464
		close(fd);
468
		close(fd);
465
		return NULL;
469
		return NULL;

Return to bug 2042