diff options
author | djm <djm> | 2011-05-29 11:40:42 +0000 |
---|---|---|
committer | djm <djm> | 2011-05-29 11:40:42 +0000 |
commit | d9ad9cbc8a00b42e2d1a2c399c18a1148c5b6b22 (patch) | |
tree | bbb51936187f6a676d5a82afb47013ee08eb44a6 | |
parent | bff4889c8f19b2d3d3390e7d1db690e1a55f0f5f (diff) | |
download | openssh-d9ad9cbc8a00b42e2d1a2c399c18a1148c5b6b22.tar.gz |
- djm@cvs.openbsd.org 2011/05/23 03:33:38
[auth.c]
make secure_filename() spam debug logs less
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | auth.c | 9 |
2 files changed, 6 insertions, 6 deletions
@@ -10,6 +10,9 @@ entierly :) feedback and ok markus@ dtucker@ + - djm@cvs.openbsd.org 2011/05/23 03:33:38 + [auth.c] + make secure_filename() spam debug logs less 20110520 - (djm) [session.c] call setexeccon() before executing passwd for pw @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.93 2011/05/23 03:30:07 djm Exp $ */ +/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -456,7 +456,6 @@ secure_filename(FILE *f, const char *file, struct passwd *pw, } strlcpy(buf, cp, sizeof(buf)); - debug3("secure_filename: checking '%s'", buf); if (stat(buf, &st) < 0 || (st.st_uid != 0 && st.st_uid != uid) || (st.st_mode & 022) != 0) { @@ -466,11 +465,9 @@ secure_filename(FILE *f, const char *file, struct passwd *pw, } /* If are past the homedir then we can stop */ - if (comparehome && strcmp(homedir, buf) == 0) { - debug3("secure_filename: terminating check at '%s'", - buf); + if (comparehome && strcmp(homedir, buf) == 0) break; - } + /* * dirname should always complete with a "/" path, * but we can be paranoid and check for "." too |