summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2011-09-06 14:56:29 +0100
committerColin Watson <cjwatson@debian.org>2011-09-06 14:56:29 +0100
commit978e62d6f14c60747bddef2cc72d66a9c8b83b54 (patch)
tree89400a44e42d84937deba7864e4964d6c7734da5 /auth.c
parent87c685b8c6a49814fd782288097b3093f975aa72 (diff)
parent3a7e89697ca363de0f64e0d5704c57219294e41c (diff)
* New upstream release (http://www.openssh.org/txt/release-5.9).
- Introduce sandboxing of the pre-auth privsep child using an optional sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables mandatory restrictions on the syscalls the privsep child can perform. - Add new SHA256-based HMAC transport integrity modes from http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt. - The pre-authentication sshd(8) privilege separation slave process now logs via a socket shared with the master process, avoiding the need to maintain /dev/log inside the chroot (closes: #75043, #429243, #599240). - ssh(1) now warns when a server refuses X11 forwarding (closes: #504757). - sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths, separated by whitespace (closes: #76312). The authorized_keys2 fallback is deprecated but documented (closes: #560156). - ssh(1) and sshd(8): set IPv6 traffic class from IPQoS, as well as IPv4 ToS/DSCP (closes: #498297). - ssh-add(1) now accepts keys piped from standard input. E.g. "ssh-add - < /path/to/key" (closes: #229124). - Clean up lost-passphrase text in ssh-keygen(1) (closes: #444691). - Say "required" rather than "recommended" in unprotected-private-key warning (LP: #663455).
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/auth.c b/auth.c
index 4f9b75334..3e8fe57b2 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.91 2010/11/29 23:45:51 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -332,7 +332,7 @@ auth_root_allowed(char *method)
332 * 332 *
333 * This returns a buffer allocated by xmalloc. 333 * This returns a buffer allocated by xmalloc.
334 */ 334 */
335static char * 335char *
336expand_authorized_keys(const char *filename, struct passwd *pw) 336expand_authorized_keys(const char *filename, struct passwd *pw)
337{ 337{
338 char *file, ret[MAXPATHLEN]; 338 char *file, ret[MAXPATHLEN];
@@ -356,18 +356,6 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
356} 356}
357 357
358char * 358char *
359authorized_keys_file(struct passwd *pw)
360{
361 return expand_authorized_keys(options.authorized_keys_file, pw);
362}
363
364char *
365authorized_keys_file2(struct passwd *pw)
366{
367 return expand_authorized_keys(options.authorized_keys_file2, pw);
368}
369
370char *
371authorized_principals_file(struct passwd *pw) 359authorized_principals_file(struct passwd *pw)
372{ 360{
373 if (options.authorized_principals_file == NULL) 361 if (options.authorized_principals_file == NULL)
@@ -467,7 +455,6 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
467 } 455 }
468 strlcpy(buf, cp, sizeof(buf)); 456 strlcpy(buf, cp, sizeof(buf));
469 457
470 debug3("secure_filename: checking '%s'", buf);
471 if (stat(buf, &st) < 0 || 458 if (stat(buf, &st) < 0 ||
472 !secure_permissions(&st, uid)) { 459 !secure_permissions(&st, uid)) {
473 snprintf(err, errlen, 460 snprintf(err, errlen,
@@ -476,11 +463,9 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
476 } 463 }
477 464
478 /* If are past the homedir then we can stop */ 465 /* If are past the homedir then we can stop */
479 if (comparehome && strcmp(homedir, buf) == 0) { 466 if (comparehome && strcmp(homedir, buf) == 0)
480 debug3("secure_filename: terminating check at '%s'",
481 buf);
482 break; 467 break;
483 } 468
484 /* 469 /*
485 * dirname should always complete with a "/" path, 470 * dirname should always complete with a "/" path,
486 * but we can be paranoid and check for "." too 471 * but we can be paranoid and check for "." too