On Mon, 6 May 2024, openssh at tr.id.au wrote:> Hey Damien, > > > Would something like this help? > > > > Match sessiontype shell > > User foo > > Match remotecommand "none" > > User foo2 > > Match sessiontype exec remotecommand "/rsync" > > User bar > > Match sessiontype subsystem remotecommand "sftp" > > User baz > > > > > > diff --git a/readconf.c b/readconf.c > > <snip> > > Thanks for looking into it, much appreciated. I think it's looking > on the right track, but after applying the patch locally to test it, > openssh-portable ceases to compile:These changes are against openssh HEAD. If you've applied them against another version then you might have conflicts. Did patch complain when you applied the diff? -d
Hey Damien,> These changes are against openssh HEAD. If you've applied them against > another version then you might have conflicts. Did patch complain > when you applied the diff?I did a fresh fetch and rebase on master branch from openssh-portable on GitHub before applying the patch. I've also tested with a fresh clone. The patch applied cleanly except for a missing end-of-file newline due to copy-pasting the diff. This is what I see as the most recent commits, have I missed or misunderstood something? ``` $ git log -5 --pretty=oneline 385ecb31e (HEAD -> master, origin/master, origin/HEAD) upstream: fix home-directory extension implementation, it always 14e2b16bc upstream: flush stdout after writing "sftp>" prompt when not using 2e69a7240 upstream: stricter validation of messaging socket fd number; disallow da757b022 upstream: add missing reserved fields to key constraint protocol 16d0b82fa depend ``` ~ Tim