From: linux-kernel@ton.iguana.be (Ton Hospel)
To: linux-kernel@vger.kernel.org
Subject: Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
Date: Thu, 26 Apr 2001 04:34:28 +0000 (UTC) [thread overview]
Message-ID: <9c88gk$7e0$1@post.home.lunix> (raw)
In-Reply-To: <E14rcVF-0007cJ-00@the-village.bc.nu>
In article <E14rcVF-0007cJ-00@the-village.bc.nu>,
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>> > Did you try nesting more than one "su -"? The first one after a boot
>> > works for me - every other one fails.
>>
>> Same here: the first "su -" works OK, but a second nested one hangs:
>
> It appears to be a bug in PAM. Someone seems to reply on parent/child running
> order and just got caught out
>
I once debugged a very simular sounding problem that I solved with
the following patch to login. It's a wild guess, but you could try if
it happens to solve it. If not it might at least be a hint of what has to
be done to su.
(the problem is that the extra process PAM keeps waiting is process leader)
(I don't have redhat, so I can't check if this is relevant here)
diff -ur util-linux-2.9x/login-utils/login.c util-linux-2.9x-ton/login-utils/login.c
--- util-linux-2.9x/login-utils/login.c Sun Sep 12 23:25:30 1999
+++ util-linux-2.9x-ton/login-utils/login.c Tue Sep 21 03:24:52 1999
@@ -1109,6 +1112,15 @@
exit(0);
}
/* child */
+
+ if (tcsetpgrp(0, getpid()) < 0)
+ fprintf(stderr,
+ _("login: could not become foreground process group: %s\n"),
+ strerror(errno));
+ if (setpgid(0, 0) < 0)
+ fprintf(stderr, _("login: could not become process leader: %s\n"),
+ strerror(errno));
+
#endif
signal(SIGINT, SIG_DFL);
next prev parent reply other threads:[~2001-04-26 4:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-22 17:22 Problem with "su -" and kernels 2.4.3-ac11 and higher Manuel McLure
2001-04-22 21:38 ` Andrzej Krzysztofowicz
2001-04-23 2:25 ` Manuel McLure
2001-04-23 2:42 ` Brett
2001-04-23 3:20 ` Manuel McLure
2001-04-23 2:42 ` Wayne Whitney
2001-04-23 3:21 ` Manuel McLure
2001-04-23 5:05 ` Manuel McLure
2001-04-23 5:17 ` Albert D. Cahalan
2001-04-23 5:27 ` Wayne Whitney
2001-04-23 9:19 ` Alan Cox
2001-04-23 15:53 ` Bill Nottingham
2001-04-26 4:34 ` Ton Hospel [this message]
2001-04-23 3:01 ` John Cavan
2001-04-23 9:56 ` Andrzej Krzysztofowicz
2001-04-23 16:03 ` Lukasz Trabinski
2001-04-23 16:13 ` Lukasz Trabinski
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='9c88gk$7e0$1@post.home.lunix' \
--to=linux-kernel@ton.iguana.be \
--cc=linux-kernel@vger.kernel.org \
/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