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

(-)opensshd/openssh-5.1p1/auth2-pubkey.c (+1 lines)
Lines 195-200 Link Here
195
	f = auth_openkeyfile(file, pw, options.strict_modes);
195
	f = auth_openkeyfile(file, pw, options.strict_modes);
196
196
197
	if (!f) {
197
	if (!f) {
198
		debug("unable to open public key file %s", file);
198
		restore_uid();
199
		restore_uid();
199
		return 0;
200
		return 0;
200
	}
201
	}
(-)opensshd/openssh-5.1p1/auth.c (-1 / +9 lines)
Lines 516-523 Link Here
516
	 * Open the file containing the authorized keys
516
	 * Open the file containing the authorized keys
517
	 * Fail quietly if file does not exist
517
	 * Fail quietly if file does not exist
518
	 */
518
	 */
519
	if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1)
519
	if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
520
		int err = errno;
521
		switch(err) {
522
			case ENOENT:   debug("authorized_keys: user %s authorized keys %s file does not exist.", pw->pw_name, file); break;
523
			case EACCES:   logit("authorized_keys ERROR: permission denied for opening user %s authorized keys %s!", pw->pw_name, file); break;
524
			default: logit("authorized_keys ERROR: Can not access user %s authorized keys %s - %s (errno=%d)!", pw->pw_name, file, 
525
				strerror(err), err); break;
526
		}
520
		return NULL;
527
		return NULL;
528
	}
521
529
522
	if (fstat(fd, &st) < 0) {
530
	if (fstat(fd, &st) < 0) {
523
		close(fd);
531
		close(fd);

Return to bug 1694