[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.
Thu Oct 24 01:01:00 GMT 2019
On Wed, 23 Oct 2019 14:05:42 +0200
Corinna Vinschen wrote:
> In my limited testing it seems to work nicely.
Isn't the screen contents before opening pty cleared when cmd.exe is
Also Michael's test case probably does not work.
> > +static bool
> > +is_running_as_service (void)
> This function should probably use check_token_membership(PSID).
> I'm also not quite sure if checking for mandatory_system_integrity_sid
> makes sense. Are there examples where the service SID is missing
> but the integrity is set to system integrity level?
If sshd or inetd is executed as cyg_server, S-1-5-6 (Service) is set.
However, when they are executed as Local System Account, only SIDs
set are as follows.
S-1-5-11 (Authenticated Users)
S-1-16-16384 (Mandatory System Integrity)
In this case, S-1-16-16384 does not have SE_GROUP_ENABLED flag, so
check_token_membership() can not be used.
Takashi Yano <firstname.lastname@example.org>
More information about the Cygwin-patches