diff options
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 23 |
1 files changed, 4 insertions, 19 deletions
@@ -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 | */ |
335 | static char * | 335 | char * |
336 | expand_authorized_keys(const char *filename, struct passwd *pw) | 336 | expand_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 | ||
358 | char * | 358 | char * |
359 | authorized_keys_file(struct passwd *pw) | ||
360 | { | ||
361 | return expand_authorized_keys(options.authorized_keys_file, pw); | ||
362 | } | ||
363 | |||
364 | char * | ||
365 | authorized_keys_file2(struct passwd *pw) | ||
366 | { | ||
367 | return expand_authorized_keys(options.authorized_keys_file2, pw); | ||
368 | } | ||
369 | |||
370 | char * | ||
371 | authorized_principals_file(struct passwd *pw) | 359 | authorized_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 |