bash failed to initialize on telnet/rsh/rlogin server

2002-03-26 Thread Polley Christopher W

I'm trying to get inetd set up for telnet/rsh/rlogin on my machine and have
everything going up to the point that after login.exe gives the motd to the
telnet client, a dialog window pops up on the server titled "bash.exe -
Application Error" and says "The application failed to initialize properly
(0xc022)."  Acknowledging the dialog closes the connection with the
client.

I have telnetd working on another machine (NT4) but haven't been updating it
to the latest cygwin packages.  The new machine is running W2K, was updated
this afternoon, and although there are 56 differences in the cygcheck -c
outputs, these are the ones that seem relevant to me: (differences
highlighted with *)

  
Cygwin Package Information  Cygwin Package Information
Package Version Package Version
*   bash2.05a-3 bash2.05a-2
*   cygwin  1.3.10-1cygwin  1.3.6-6
inetutils   1.3.2-17inetutils   1.3.2-17
login   1.4-3   login   1.4-3

Both are running with ntsec, and have identical passwd and group files (both
from the domain server, passwd trimmed to a couple users plus the usual
system accounts)

Even though I thought I recalled seeing something about this in the last
couple months, I've searched the mailing list for all kinds of combinations
of keywords, including 'bash "failed to initialize"', and got no relevant
hits.

Before I try to debug this on my own, I wanted to check to see if there was
some obvious answer (aside from "cygwin 1.3.10-1 broke this...because we're
mean" :-) )  that I'm overlooking.  And if I do need to debug this, where
would I put the strace?   in inetd.conf?  if so, how?


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/




bash failed to initialize on telnet/rsh/rlogin server

2002-03-27 Thread David Starks-Browning

On Tuesday 26 Mar 02, Polley Christopher W writes:
> I'm trying to get inetd set up for telnet/rsh/rlogin on my machine and have
> everything going up to the point that after login.exe gives the motd to the
> telnet client, a dialog window pops up on the server titled "bash.exe -
> Application Error" and says "The application failed to initialize properly
> (0xc022)."  Acknowledging the dialog closes the connection with the
> client.
> 
> I have telnetd working on another machine (NT4) but haven't been updating it
> to the latest cygwin packages.  The new machine is running W2K, was updated
> this afternoon, and although there are 56 differences in the cygcheck -c
> outputs, these are the ones that seem relevant to me: (differences
> highlighted with *)
> 
>   
> Cygwin Package Information  Cygwin Package Information
> Package Version Package Version
> *   bash2.05a-3 bash2.05a-2
> *   cygwin  1.3.10-1cygwin  1.3.6-6
> inetutils   1.3.2-17inetutils   1.3.2-17
> login   1.4-3   login   1.4-3
> 
> Both are running with ntsec, and have identical passwd and group files (both
> from the domain server, passwd trimmed to a couple users plus the usual
> system accounts)

This happened to me on NT4 when I upgraded to cygwin-1.3.10, and was
*not* using ntsec.  Using ntsec fixed it.  Is ntsec set early enough
for inetd?  (And are you rebooting when making changes?)  Does the
inetd service have sufficient user rights?  Is everything
readable/executable that needs to be?  Double check your passwd/group
entries with latest mkpasswd & mkgroup, possibly even from the latest
inst snapshot.  Make sure the user's groups are all in /etc/group.

These have all been suggested in the past as possibly causing this
error.

Why I get the error with nontsec and not with ntsec, is still mystery,
but Corinna has been on holiday. :-)

Regards,
David


--
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/




RE: bash failed to initialize on telnet/rsh/rlogin server

2002-03-27 Thread Polley Christopher W

Thanks, David,

>This happened to me on NT4 when I upgraded to cygwin-1.3.10, and
was
>*not* using ntsec.  Using ntsec fixed it.  Is ntsec set early
enough
>for inetd?  (And are you rebooting when making changes?)  Does the
>inetd service have sufficient user rights?  Is everything

I had ntsec set... but had not rebooted since setting it.  Rebooted,
and 
now all is well :-) (closing all cygwin processes including 'net
stop 
inetd' wasn't enough)


So now that I know how to isolate the problem, is there a way to
strace a daemon?


Warm regards,

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/




Re: bash failed to initialize on telnet/rsh/rlogin server

2002-03-27 Thread Christopher Faylor

On Wed, Mar 27, 2002 at 09:05:20AM -0600, Polley Christopher W wrote:
>So now that I know how to isolate the problem, is there a way to strace
>a daemon?

strace -p pid

cgf

--
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/




Re: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)

2002-03-27 Thread Christopher Faylor

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?

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.

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.

cgf
--
Please do not send me personal email with cygwin questions.
Use the resources at http://cygwin.com/ .

--
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/




Re: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)

2002-03-27 Thread Matt Seitz


"Christopher Faylor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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'm sure Cygwin tries to include the best possible documentation.  But if
someone can't find an answer in the official docs, it seems to me that
asking for other sources is the right thing to do.  For any number of
reasons, there may be other sources of information that are not yet included
in the official Cygwin documentation.

> The best documentation is the source code.

That depends on one's definition of "best".  Source is certainly the most
accurate documentation, but it is probably not the easiest to use.

I'm sure the Cygwin developers are very busy and don't have a lot of time to
offer free end-user support, especially since Cygwin does offer paid support
options.  And I do see a number of helpful articles posted by Cygwin
developers.  But occasionally I'm surprised at how hostile some answers are
to what seem to be reasonable questions and requests.








--
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/




RE: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)

2002-03-27 Thread Robert Collins



> -Original Message-
> From: Matt Seitz [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, March 28, 2002 12:32 PM

> > If we had better documentation why would it be hidden?
> 
> I'm sure Cygwin tries to include the best possible 
> documentation.  But if someone can't find an answer in the 
> official docs, it seems to me that asking for other sources 
> is the right thing to do.  For any number of reasons, there 
> may be other sources of information that are not yet included 
> in the official Cygwin documentation.

If Cygwin was a corporate project, then that would be true. However,
it's not -IMO- a corporate project. Few, if any resources are allotted
to Cygwin by RedHat. Of the folk who commit code to cygwin, only Corinna
and Chris are RedHat employees, and AFAIK neither are
paid-to-develop-cygwin.

For a community project, there are few-if-any reasons for doco to be
pending. It usually gets posted immediately, as that is the only way we
get recognition.
 
> > The best documentation is the source code.
> 
> That depends on one's definition of "best".  Source is 
> certainly the most accurate documentation, but it is probably 
> not the easiest to use.

That's a very valid comment. However, IIRC you didn't define the metric
of 'betterness' that you meant, so I think that Chris assuming
better==accurate is quite reasonable.
 
> I'm sure the Cygwin developers are very busy and don't have a 
> lot of time to offer free end-user support, especially since 
> Cygwin does offer paid support options.  

As I mention above... what Cygwin developers :}. Seriously though, while
busy with other things, I usually still spend time on support, offering
insights to new contributors, offering sarcasm to newbies ,
contributing bits of code... 

> And I do see a 
> number of helpful articles posted by Cygwin developers.  But 
> occasionally I'm surprised at how hostile some answers are to 
> what seem to be reasonable questions and requests.

I can't really comment on the other developers, but I find some
behaviours (net shown by you AFAICT) very frustrating.
* evidence of a lack of self-start-capability. (i.e. where do I find x,
for some x documented on the web pages or high up on google searches)
* 'it would be nice'. Particularly 'why doesn't x get improved'.
* 'cygwin is broken'... when it passes the ltp test suite for that
feature.

Rob

--
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/




Re: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)

2002-03-27 Thread Chris Polley

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

>On Wed, Mar 27, 2002@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/




Re: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)

2002-03-28 Thread Larry Hall (RFK Partners, Inc)

At 02:09 AM 3/28/2002, Chris Polley wrote:
>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? 


No.  Look at inetutils-1.3.2.README.




Larry Hall  [EMAIL PROTECTED]
RFK Partners, Inc.  http://www.rfk.com
838 Washington Street   (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX


--
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/




Re: strace on inetd (was RE: bash failed to initialize on telnet/rsh/ rlogin server)

2002-03-28 Thread Christopher Faylor

On Thu, Mar 28, 2002 at 01:09:29AM -0600, Chris Polley wrote:
>On Wed, 27 Mar 2002 19:20:19 -0500, you wrote:
>>On Wed, Mar 27, 2002@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.

Give me a break.  I was making a simple statement.

>>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?

Don't know.

>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?

Possibly.  strace is not a cygwin program, though.  You'd have to use
MS-DOS paths and putting a non-cygwin program in there might cause
different behavior.

cgf

--
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/