mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
- djm@cvs.openbsd.org 2011/05/23 03:33:38
[auth.c] make secure_filename() spam debug logs less
This commit is contained in:
parent
d8478b6a9b
commit
1dd66e5f74
@ -10,6 +10,9 @@
|
|||||||
entierly :)
|
entierly :)
|
||||||
|
|
||||||
feedback and ok markus@ dtucker@
|
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
|
20110520
|
||||||
- (djm) [session.c] call setexeccon() before executing passwd for pw
|
- (djm) [session.c] call setexeccon() before executing passwd for pw
|
||||||
|
9
auth.c
9
auth.c
@ -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.
|
* 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));
|
strlcpy(buf, cp, sizeof(buf));
|
||||||
|
|
||||||
debug3("secure_filename: checking '%s'", buf);
|
|
||||||
if (stat(buf, &st) < 0 ||
|
if (stat(buf, &st) < 0 ||
|
||||||
(st.st_uid != 0 && st.st_uid != uid) ||
|
(st.st_uid != 0 && st.st_uid != uid) ||
|
||||||
(st.st_mode & 022) != 0) {
|
(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 are past the homedir then we can stop */
|
||||||
if (comparehome && strcmp(homedir, buf) == 0) {
|
if (comparehome && strcmp(homedir, buf) == 0)
|
||||||
debug3("secure_filename: terminating check at '%s'",
|
|
||||||
buf);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* dirname should always complete with a "/" path,
|
* dirname should always complete with a "/" path,
|
||||||
* but we can be paranoid and check for "." too
|
* but we can be paranoid and check for "." too
|
||||||
|
Loading…
x
Reference in New Issue
Block a user