From f8ca8f795afb9be814a4740fbf272f38f1245c5f Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 2 Jul 1999 00:24:41 +0000 Subject: 1999-07-01 Mark Kettenis * 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. --- utils/ChangeLog | 9 +++++++++ utils/Makefile | 3 --- utils/frobauth-mod.c | 37 +++---------------------------------- 3 files changed, 12 insertions(+), 37 deletions(-) diff --git a/utils/ChangeLog b/utils/ChangeLog index aa1178d6..ba41cfb5 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,12 @@ +1999-07-01 Mark Kettenis + + * 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. + 1999-06-21 Roland McGrath * login.c (main): For no-uids shell, default SH_ARG0 to informative diff --git a/utils/Makefile b/utils/Makefile index 0e4adae1..a2a1a3b1 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -40,9 +40,6 @@ su-LDLIBS = $(LIBCRYPT) ping-CPPFLAGS = -I$(srcdir)/../pfinet/ INSTALL-login-ops = -o root -m 4755 -INSTALL-addauth-ops = -o root -m 4755 -INSTALL-setauth-ops = -o root -m 4755 -INSTALL-su-ops = -o root -m 4755 INSTALL-ids-ops = -o root -m 4755 INSTALL-ps-ops = -o root -m 4755 INSTALL-w-ops = -o root -m 4755 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 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); - } - } } } -- cgit v1.2.3