diff options
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth.c,v 1.93 2011/05/23 03:30:07 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 | * |
@@ -456,7 +456,6 @@ secure_filename(FILE *f, const char *file, struct passwd *pw, | |||
456 | } | 456 | } |
457 | strlcpy(buf, cp, sizeof(buf)); | 457 | strlcpy(buf, cp, sizeof(buf)); |
458 | 458 | ||
459 | debug3("secure_filename: checking '%s'", buf); | ||
460 | if (stat(buf, &st) < 0 || | 459 | if (stat(buf, &st) < 0 || |
461 | (st.st_uid != 0 && st.st_uid != uid) || | 460 | (st.st_uid != 0 && st.st_uid != uid) || |
462 | (st.st_mode & 022) != 0) { | 461 | (st.st_mode & 022) != 0) { |
@@ -466,11 +465,9 @@ secure_filename(FILE *f, const char *file, struct passwd *pw, | |||
466 | } | 465 | } |
467 | 466 | ||
468 | /* If are past the homedir then we can stop */ | 467 | /* If are past the homedir then we can stop */ |
469 | if (comparehome && strcmp(homedir, buf) == 0) { | 468 | if (comparehome && strcmp(homedir, buf) == 0) |
470 | debug3("secure_filename: terminating check at '%s'", | ||
471 | buf); | ||
472 | break; | 469 | break; |
473 | } | 470 | |
474 | /* | 471 | /* |
475 | * dirname should always complete with a "/" path, | 472 | * dirname should always complete with a "/" path, |
476 | * but we can be paranoid and check for "." too | 473 | * but we can be paranoid and check for "." too |