summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/ChangeLog6
-rw-r--r--utils/frobauth-mod.c6
-rw-r--r--utils/msgport.c20
3 files changed, 19 insertions, 13 deletions
diff --git a/utils/ChangeLog b/utils/ChangeLog
index 411a5664..91b890e2 100644
--- a/utils/ChangeLog
+++ b/utils/ChangeLog
@@ -1,3 +1,9 @@
+2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * frobauth-mod.c (frobauth_modify): Don't use MOVE_SEND in Hurd RPC.
+ * msgport.c (do_setfd, cmd_chcwdir, cmd_cdroot, cmd_chcrdir):
+ Likewise.
+
2000-02-08 Roland McGrath <roland@baalperazim.frob.com>
Remove the su utility, which is incompatible with traditional su
diff --git a/utils/frobauth-mod.c b/utils/frobauth-mod.c
index 06ccdbfa..4464c18c 100644
--- a/utils/frobauth-mod.c
+++ b/utils/frobauth-mod.c
@@ -1,6 +1,6 @@
/* Modify the current authentication selected processes
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
This file is part of the GNU Hurd.
@@ -126,7 +126,9 @@ frobauth_modify (struct frobauth *frobauth,
msg_set_init_port (msgport, task,
INIT_PORT_AUTH,
new_auth,
- MACH_MSG_TYPE_MOVE_SEND);
+ MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (),
+ new_auth);
if (err)
error (0, err, "%d", pid);
}
diff --git a/utils/msgport.c b/utils/msgport.c
index 59362d87..5e942d48 100644
--- a/utils/msgport.c
+++ b/utils/msgport.c
@@ -1,6 +1,6 @@
/* Send messages to selected processes
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Jose M. Moya <josem@gnu.org>
@@ -197,7 +197,8 @@ do_setfd (pid_t pid, mach_port_t msgport, size_t fd, file_t file)
err = proc_pid2task (proc, pid, &task);
if (err)
return err;
- err = msg_set_fd (msgport, task, fd, file, MACH_MSG_TYPE_MOVE_SEND);
+ err = msg_set_fd (msgport, task, fd, file, MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (), file);
mach_port_deallocate (mach_task_self (), task);
return err;
}
@@ -302,9 +303,8 @@ cmd_chcwdir (pid_t pid, mach_port_t msgport, int argc, char *argv[])
return err;
}
err = msg_set_init_port (msgport, task, INIT_PORT_CWDIR, dir,
- MACH_MSG_TYPE_MOVE_SEND);
- if (err)
- mach_port_deallocate (mach_task_self (), dir);
+ MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (), dir);
mach_port_deallocate (mach_task_self (), task);
return err;
}
@@ -328,9 +328,8 @@ cmd_cdroot (pid_t pid, mach_port_t msgport, int argc, char *argv[])
return err;
}
err = msg_set_init_port (msgport, task, INIT_PORT_CWDIR, dir,
- MACH_MSG_TYPE_MOVE_SEND);
- if (err)
- mach_port_deallocate (mach_task_self (), dir);
+ MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (), dir);
mach_port_deallocate (mach_task_self (), task);
return err;
}
@@ -354,9 +353,8 @@ cmd_chcrdir (pid_t pid, mach_port_t msgport, int argc, char *argv[])
return err;
}
err = msg_set_init_port (msgport, task, INIT_PORT_CRDIR, dir,
- MACH_MSG_TYPE_MOVE_SEND);
- if (err)
- mach_port_deallocate (mach_task_self (), dir);
+ MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (), dir);
mach_port_deallocate (mach_task_self (), task);
return err;
}