lkml.org 
[lkml]   [2001]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Problem with "su -" and kernels 2.4.3-ac11 and higher
Date
From
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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.065 / U:0.340 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site