Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2007 16:45:37 +0400
From:      "Artem Kuchin" <matrix@itlegion.ru>
To:        =?UTF-8?B?6Z+T5a625qiZIEJpbGwgSGFja2Vy?= <askbill@conducive.net>, <freebsd-current@freebsd.org>
Subject:   Re: Broken su in current - trying to fix myself, help needed!
Message-ID:  <010f01c81184$cd375550$0c00a8c0@Artem>
References:  <00bd01c810ec$10371230$0c00a8c0@Artem>	<8cb6106e0710171143m3dff7546o457192ede76e6598@mail.gmail.com>	<012c01c810f3$aafeecf0$0c00a8c0@Artem>	<20071017193615.GO9006@server.vk2pj.dyndns.org>	<471667DB.1010601@conducive.net>	<47170FF1.3050602@moneybookers.com>	<471746C7.20306@conducive.net><47174BE4.6020300@moneybookers.com> <4717523E.1000403@conducive.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> What Artem is seeing is not (yet) a 'bug' in su in my mind.
> 

You missed reply from David Xu in the list on this matter.

To me there is CLEARLY a bug in the source code. It tried
to get group of already dead process.

Here is quote from my and David's letters:

> The weird thing is that if i just comment out those lines like this
> 
> /* child_pgrp = getpgid(child_pid);
>   if (tcgetpgrp(STDERR_FILENO) == child_pgrp) */
>   tcsetpgrp(STDERR_FILENO, getpgrp());
> 
> su starts working again just fine.
> 
> Any idea why getpgid fails and why tcgetpgrp return 100000 (always the same
> number)? What will brak if i leave these lines commented?
> 
> -- 
> Regards,
> Artem

file su.c, line 472 may be incorrect since line 456 is a while loop 
which only
exits if child process is exited. just remove line 472 and 473 to see if 
problem
is fixed.

--
Artem




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?010f01c81184$cd375550$0c00a8c0>