summaryrefslogtreecommitdiff
path: root/utils/frobauth-mod.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-02 00:24:41 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-02 00:24:41 +0000
commitf8ca8f795afb9be814a4740fbf272f38f1245c5f (patch)
tree3d34c986f0ede8350e501fe71852a1e5b3ca65af /utils/frobauth-mod.c
parenta04fff2fd645fb817f1058d4982911b83cd735ef (diff)
1999-07-01 Mark Kettenis <kettenis@gnu.org>
* Makefile (INSTALL-addauth-ops, INSTALL-setauth-ops, INSTALL-su-ops): Removed. These programs don't have to be installed suid-root anymore. * frobauth-mod.c (frobauth_modify): Do not try to set the owner of the processes we're frobbing. The process set their owner themselves when we pass them their new authentication.
Diffstat (limited to 'utils/frobauth-mod.c')
-rw-r--r--utils/frobauth-mod.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/utils/frobauth-mod.c b/utils/frobauth-mod.c
index 140a74d8..06ccdbfa 100644
--- a/utils/frobauth-mod.c
+++ b/utils/frobauth-mod.c
@@ -1,6 +1,6 @@
/* Modify the current authentication selected processes
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
This file is part of the GNU Hurd.
@@ -114,7 +114,8 @@ frobauth_modify (struct frobauth *frobauth,
all_auths[num_all_auths - 1] = old_auth;
err = ugids_make_auth (&new,
- all_auths, num_all_auths,
+ all_auths,
+ num_all_auths,
&new_auth);
if (err)
error (0, err,
@@ -128,38 +129,6 @@ frobauth_modify (struct frobauth *frobauth,
MACH_MSG_TYPE_MOVE_SEND);
if (err)
error (0, err, "%d", pid);
- else if (new.eff_uids.num == 0
- ? old.eff_uids.num > 0
- : (old.eff_uids.num == 0
- || (new.eff_uids.ids[0]
- != old.eff_uids.ids[0])))
- /* Now change the process's owner. */
- {
- process_t proc;
- err =
- proc_pid2proc (proc_server, pid,
- &proc);
- if (err)
- error (0, err,
- "%d: Cannot get proc port",
- pid);
- else
- {
- if (new.eff_uids.num == 0)
- err =
- proc_setowner (proc, 0, 1);
- else
- err = proc_setowner
- (proc, new.eff_uids.ids[0], 0);
- if (err)
- error
- (0, err,
- "%d: Cannot set process owner",
- pid);
- mach_port_deallocate
- (mach_task_self (), proc);
- }
- }
}
}