summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-07-09 19:00:23 +0000
committerThomas Bushnell <thomas@gnu.org>1997-07-09 19:00:23 +0000
commit7b8da3145eed258c1bd43e0e9fc2e087fcf3c7ea (patch)
tree02b1086d7b1d8a0c409a03bec8e29c21955c072e
parent32809d801f41b98f3455af5f91790257d8b38222 (diff)
Tue Jul 1 16:45:27 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* exec-reauth.c (fshelp_exec_reauth): If the new set of eff_uids is empty, then still do proc_setowner, but this time to set it to "unowned" status.
-rw-r--r--libfshelp/ChangeLog6
-rw-r--r--libfshelp/exec-reauth.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/libfshelp/ChangeLog b/libfshelp/ChangeLog
index c016f54d..60d59e07 100644
--- a/libfshelp/ChangeLog
+++ b/libfshelp/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jul 1 16:45:27 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * exec-reauth.c (fshelp_exec_reauth): If the new set of eff_uids
+ is empty, then still do proc_setowner, but this time to set it to
+ "unowned" status.
+
1997-06-12 Miles Bader <miles@gnu.ai.mit.edu>
* fshelp.h (fshelp_touch): New function.
diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c
index e6009827..f0600a1c 100644
--- a/libfshelp/exec-reauth.c
+++ b/libfshelp/exec-reauth.c
@@ -1,6 +1,6 @@
/* Setuid reauthentication for exec
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>,
from the original by Michael I. Bushnell p/BSG <mib@gnu.ai.mit.edu>
@@ -130,8 +130,9 @@ fshelp_exec_reauth (int suid, uid_t uid, int sgid, gid_t gid,
/* Re-authenticate the exec parameters. */
exec_reauth (newauth, _secure, 0, ports, num_ports, fds, num_fds);
- if (eff_uids->num > 0)
- proc_setowner (ports[INIT_PORT_PROC], eff_uids->ids[0], 0);
+ proc_setowner (ports[INIT_PORT_PROC],
+ eff_uids->num > 0 ? eff_uids->ids[0] : 0,
+ !eff_uids->num);
abandon_suid:
if (eff_uids)