Created
August 27, 2019 23:41
-
-
Save tevkar/4d65d17fa0de7dc395b15ddc2792c785 to your computer and use it in GitHub Desktop.
Copssh OpenSSH session.c patch to avoid messages 'bad ownership or modes for chroot directory' (non-relevant in a Copssh setup)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- session-old.c 2019-04-18 00:52:57.000000000 +0200 | |
+++ session.c 2019-08-26 01:09:26.880631000 +0200 | |
@@ -1333,10 +1333,12 @@ | |
if (stat(component, &st) != 0) | |
fatal("%s: stat(\"%s\"): %s", __func__, | |
component, strerror(errno)); | |
+/* | |
if (st.st_uid != 0 || (st.st_mode & 022) != 0) | |
fatal("bad ownership or modes for chroot " | |
"directory %s\"%s\"", | |
cp == NULL ? "" : "component ", component); | |
+*/ | |
if (!S_ISDIR(st.st_mode)) | |
fatal("chroot path %s\"%s\" is not a directory", | |
cp == NULL ? "" : "component ", component); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment