delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/28/02:13:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: Chris Polley <chris DOT polley AT ieee DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)
Date: Thu, 28 Mar 2002 01:09:29 -0600
Reply-To: cygwin AT cygwin DOT com
Message-ID: <m0b5auku91air9nitp4ci4ncj0imtopi9s@4ax.com>
References: <718198F862F1D411B10F0002A50A4DB1059FE8E7 AT e90wwce3 DOT dx DOT deere DOT com> <20020328002019 DOT GA1617 AT redhat DOT com>
In-Reply-To: <20020328002019.GA1617@redhat.com>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g2S7DBR31904

On Wed, 27 Mar 2002 19:20:19 -0500, you wrote:

>On Wed, Mar 27, 2002 AT 02:20:35PM -0600, Polley Christopher W wrote:
>>Are there more complete instructions to strace besides --help, the Cygwin
>>user guide, or winsup/utils/utils.sgml (all essentially the same thing)?
>
>If we had better documentation why would it be hidden?
I didn't think it was "hidden", I only humbly thought there might be a
more detailed document that the more clueful users on this list had
awareness of.  I'm sorry if I've offended you by my query. 
>
>The best documentation is the source code.  In this case, the use of
>strace -p would require that you do your debugging from an account which
>had the ability to access the executing pid.  If you are running inetd
>from a privileged account and stracing from a user account that won't
>work for hopefully obvious reasons.
Well, inetd is running from the system account (18).  The user account
I was using to run strace has local (machine) administrator privileges
(i.e. is in the machine's "Administrators" group.)  Is this
sufficiently privileged? 

Is the silent failure (immediate exit from strace) I observed a result
of this lack of privilege?

Could I instead put 
telnet stream tcp nowait root /usr/bin/strace strace -o
/strace_telnetd.log all /usr/bin/in.telnetd 
in inetd.conf?  Or will this cause problems?
>
>Also, due to limitations in the Windows API, there is no way to strace a
>forked process via strace -p.  strace -p uses the DebugActiveProcess
>function and there is no way to tell the process being debugged that you
>need to follow CreateProcess calls.

I'm interpreting your statement to mean that the -p and -f options of
strace are incompatible.  I see now from reviewing the code how this
is so.

I am confused by the lack of "couldn't attach to pid %d<%d> for
debugging" that I would expect if DebugActiveProcess were to fail due
to lack of permission, and the lack of "Attached to pid %d (windows
pid %u)\n" that I would expect if it were to succeed (in the first 5
cases of my previous email) and the lack of strace output from inetd
handling a telnet request (in the last case) (granted, it wouldn't
output anything from any of inetd's children).   I guess I'll need to
attach gdb to strace attaching to a pid...


Thanks,

Chris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019