-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
ctty_new_pgrp (void)
{
int i;
-
+
HURD_CRITICAL_BEGIN;
__mutex_lock (&_hurd_dtable_lock);
{
struct hurd_fd *const d = _hurd_dtable[i];
mach_port_t new, newctty, ref;
-
+
if (d == NULL)
/* Nothing to do for an unused descriptor cell. */
continue;
/* Take the descriptor cell's lock. */
__spin_lock (&d->port.lock);
-
+
/* Reauthenticate the descriptor's port. */
if (d->port.port != MACH_PORT_NULL &&
! __io_reauthenticate (d->port.port,
ref, MACH_MSG_TYPE_MAKE_SEND) &&
! __USEPORT (AUTH, __auth_user_authenticate
(port,
- d->port.port,
ref, MACH_MSG_TYPE_MAKE_SEND,
&new)))
{
ref, MACH_MSG_TYPE_MAKE_SEND) &&
! __USEPORT (AUTH, __auth_user_authenticate
(port,
- d->ctty.port,
ref, MACH_MSG_TYPE_MAKE_SEND,
&newctty)))
_hurd_port_set (&d->ctty, newctty);
mach_port_t ref = __mach_reply_port ();
error_t reauth (auth_t auth)
{
- return __auth_user_authenticate (auth, unauth, ref,
+ return __auth_user_authenticate (auth, ref,
MACH_MSG_TYPE_MAKE_SEND,
result);
}
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
! HURD_PORT_USE (&_hurd_ports[INIT_PORT_AUTH],
__auth_user_authenticate
(port,
- _hurd_init_dtable[d],
ref, MACH_MSG_TYPE_MAKE_SEND,
&new)))
{
if (__USEPORT (CRDIR,
! __io_reauthenticate (port,
ref, MACH_MSG_TYPE_MAKE_SEND) &&
- ! __auth_user_authenticate (new, port,
+ ! __auth_user_authenticate (new,
ref, MACH_MSG_TYPE_MAKE_SEND,
&newport)))
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], newport);
if (__USEPORT (CWDIR,
! __io_reauthenticate (port,
ref, MACH_MSG_TYPE_MAKE_SEND) &&
- ! __auth_user_authenticate (new, port,
+ ! __auth_user_authenticate (new,
ref, MACH_MSG_TYPE_MAKE_SEND,
&newport)))
_hurd_port_set (&_hurd_ports[INIT_PORT_CWDIR], newport);