Request for help debugging screen problem

Shaddy Baddah helium@shaddybaddah.name
Mon Feb 8 12:09:00 GMT 2010


Hi,

On 8/02/2010 11:52 AM, Corinna Vinschen wrote:
> On Feb  8 10:53, Shaddy Baddah wrote:
>> On 8/02/2010 9:51 AM, Corinna Vinschen wrote:
>>> It's the same OpenProcess problem in just another shape.
>>
>> Just to clarify. If you mean the same problem as reattaching to
>> screen, I think the new developments reveal that I have no data at
>> all on that. It could well be OpenProcess) as well, but I can't
>> determine because screen -r isn't even being run by strace. strace
>> is failing before it executes the process (evidenced by no ls output
>> when I do a strace ls).
>
> Indeed.
>
>> With regards to the calling OpenProcess() on the master, I'd like to
>> outline a disparity here. In my cygwin scenario, the session sshd
>> process is not owned by the user, but by the same as its parent,
>> cyg_server.
>>
>> In linux, the session ssh is setuid'ed to the authenticated user.
>> I'm wondering why this is not the case with cygwin.
>
> It's the fact that a full privilege separation implementation in sshd
> requires the implementation of descriptor passing via UNIX sockets in
> Cygwin.  That's just not available so far.  If you change your sshd_config
> file on Linux to specify
>
>   UsePrivilegeSeparation no
>
> and restart sshd, you will notice that the process
>
>    sshd: username [priv]
>
> owned by root is not in the process list anymore and the process
>
>    sshd: username@pts/X
>
> process is now owned by root.  That's identical to what happens in
> Cygwin all the time.

Thanks for that. I'll give it a try, but I'm sure I'll see the behaviour 
you described.

>> My next step is to build screen and try to debug it to a point where
>> I can find where in the cygwin dll (if in fact it is the cygwin at
>> fault) that there is an issue. Beyond that, without strace at my
>> disposal, I'm a bit stuck on how I'm going to debug cygwin. Help
>> would be appreciated.
>
> Did you notice the how-to-debug-cygwin.txt file in the winsup/cygwin
> dir?  You should build Cygwin with the -DDEBUGGING flag and then you
> have a couple of options using GDB rather than strace.

No, I didn't notice. I can get a little to eager at times, and miss 
important steps. Plus I can only devote sporadic time to the issues. 
I'll read through it and give it a try.

Thanks,
Shaddy



More information about the Cygwin-developers mailing list