Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Copssh OpenSSH session.c patch to avoid messages 'bad ownership or modes for chroot directory' (non-relevant in a Copssh setup)
--- 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
You can’t perform that action at this time.