On 8/29/05, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:After a user shell is promoted to root, its prompt is still $ instead of #. But why do we care?
Fixing it might be useful in some obscure cases anyway - POSIX threads
might benefit from it too, providing the functionality of changing all
thread uids at once isnt triggered for sensible threaded app behaviour.
I would very much like to see that fixed. Currently we have to change
the UIDs/GIDs at userlevel with cross-thread calls implemented via
signals. This is user observable which is not correct. This is
probably the last area where we're not 100% POSIX compliant.
As for adding this proposed syscall: it can only lead to chaos. All
kinds of user code correctly so assumes the IDs don't change over the
lifetime of a process. The solution for the problem has been
mentioned as well: re-exec. This will require some code rewrite on
the side of the applications but any decent daemon is hopefully soon
support re-exec anyway for another reason: re-randomization of the
address space. What good does address space randomization do if the
machines and programs are so damn stable that they keep running for
months at a time? nscd supports this now and I think openssh as well.