This is the mail archive of the cygwin-patches mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

Hi Corinna,

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-32-544 (Administrators)
S-1-1-0 (Everyone)
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 <>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]