From: Len Giambrone <frodo@mit.edu>
To: cygwin@cygwin.com
Cc: frodo@MIT.EDU
Subject: Re: 1.3.12-2: weird problem with /etc/passwd and sshd
Date: Fri, 26 Jul 2002 13:04:00 -0000 [thread overview]
Message-ID: <tml7kji5whu.fsf@small-gods.mit.edu> (raw)
Corinna Vinschen <corinna-cygwin@cygwin.com> writes:
> On Thu, Jul 25, 2002 at 08:00:46PM -0400, Len Giambrone wrote:
> >
> > More info:
> >
> > The problem doesn't exist in 1.3.10-1
> > The problem does exist in 1.3.11-3
> > The problem does exist in cygwin1-20020725
>
> It would be interesting to learn what your actual problem is...
>
> Corinna
Corinna, this was in regard to the mail I sent earlier describing the problem.
Any insight you might have would be greatly appreciated. Did you see the
previous mail? Here's the text of the mail repeated for convenience. I also
submitted cygcheck -r -v -s as an attachment; let me know if you need that as
well.
-Len
----Begin forward---
Win2k Server, Service Pack 2.
OpenSSH 3.4p1-4.
I setup sshd running as a service:
$ cygrunsrv -I sshd -p /usr/sbin/sshd.exe -a "-D -e"
and everything is happy.
Now, I create a user "foobar"
$ net user foobar foo /add
And add it to /etc/passwd
$ mkpasswd -l | grep foobar >> /etc/passwd
Now when I try to ssh in the client tells me :
$ ssh root@172.24.8.41 -v
...
debug1: Entering interactive session.
debug3: Trying to reverse map address 172.24.8.23.
Connection to 172.24.8.41 closed.
debug1: Transferred: stdin 0, stdout 53, stderr 35 bytes in 4.5 seconds
debug1: Bytes per second: stdin 0.0, stdout 11.7, stderr 7.7
debug1: Exit status -1
And the Server tells me:
...
debug1: Entering interactive session.
debug1: fd 3 setting O_NONBLOCK
debug1: fd 5 setting O_NONBLOCK
debug1: fd 7 setting O_NONBLOCK
debug1: fd 8 setting O_NONBLOCK
debug1: server_init_dispatch_13
debug1: server_init_dispatch_15
debug1: Received SIGCHLD.
Read error from remote host: Cannot send after transport endpoint shutdown
debug1: Calling cleanup 0x415dc8(0x449ab4)
debug1: session_pty_cleanup: session 0 release /dev/tty2
debug1: Calling cleanup 0x41c9c4(0x0)
I've run sshd through gdb and found the child that sshd forks to handle the
session calls this code in uidswap.c
void
permanently_set_uid(struct passwd *pw)
{
if (temporarily_use_uid_effective)
fatal("permanently_set_uid: temporarily_use_uid effective");
if (setgid(pw->pw_gid) < 0)
fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
if (setuid(pw->pw_uid) < 0)
fatal("setuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
}
For some strange reason, The setuid call is failing.
If I now remove "foobar" from /etc/passwd, everything works again.
I have not been able to reproduce this by running the server from the command
line, only when it's running as a service.
Anyone have a clue as to what might be going on here?
-Len
----End forward---
--
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/
next reply other threads:[~2002-07-26 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-26 13:04 Len Giambrone [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-26 1:22 Len Giambrone
2002-07-26 6:00 ` Corinna Vinschen
2002-07-25 20:42 Len Giambrone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tml7kji5whu.fsf@small-gods.mit.edu \
--to=frodo@mit.edu \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).