mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
hurd: Use the new __proc_reauthenticate_complete protocol
This commit is contained in:
committed by
Samuel Thibault
parent
96429bcc91
commit
a7aad6e2b7
@@ -679,11 +679,29 @@ retry:
|
||||
ref, MACH_MSG_TYPE_MAKE_SEND,
|
||||
&newproc);
|
||||
__mach_port_destroy (__mach_task_self (), ref);
|
||||
if (!err)
|
||||
{
|
||||
__mach_port_deallocate (__mach_task_self (), proc);
|
||||
proc = newproc;
|
||||
}
|
||||
if (err)
|
||||
goto out;
|
||||
if (newproc == MACH_PORT_NULL)
|
||||
{
|
||||
/* Old versions of the proc server did not recreate the process
|
||||
port when reauthenticating, and passed MACH_PORT_NULL through
|
||||
the auth server. That must be what we're dealing with. Just
|
||||
keep the existing proc port in this case. */
|
||||
}
|
||||
else
|
||||
{
|
||||
err = __proc_reauthenticate_complete (newproc);
|
||||
if (err)
|
||||
{
|
||||
__mach_port_deallocate (__mach_task_self (), newproc);
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
{
|
||||
__mach_port_deallocate (__mach_task_self (), proc);
|
||||
proc = newproc;
|
||||
}
|
||||
}
|
||||
|
||||
if (!err)
|
||||
err = reauthenticate (INIT_PORT_CRDIR, &rcrdir);
|
||||
|
Reference in New Issue
Block a user