summaryrefslogtreecommitdiff
path: root/utils/su.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-04-05 00:24:50 +0000
committerMiles Bader <miles@gnu.org>1995-04-05 00:24:50 +0000
commit7da428fcd5865e6ce6c45ac8b168d7021008b0d3 (patch)
tree4dda80a24caff5efa92fc6c1c2dd3a6ddaecb75a /utils/su.c
parent414b25aee66c6295a8489c6ec5792c494f93fdad (diff)
(apply_auth): Use msg_add_auth & msg_del_auth instead of add_auth & del_auth.
(apply_auth_to_pids, apply_auth_to_loginid, apply_auth_to_pgrp): Don't use the IDS variable, it's no longer around; I think AUTH is the right thing to replace it with.
Diffstat (limited to 'utils/su.c')
-rw-r--r--utils/su.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/utils/su.c b/utils/su.c
index 416cfb7b..4efc7bd3 100644
--- a/utils/su.c
+++ b/utils/su.c
@@ -358,19 +358,18 @@ int
apply_auth (struct auth *auth, pid_t pid, int ignore_bad_pid)
{
error_t err;
- auth_t auth;
if (! auth->ids)
return 0;
err = HURD_MSGPORT_RPC (proc_getmsgport (proc, pid, &msgport),
- proc_pid2task (proc, pid, &refport),
+ proc_pid2task (proc, pid, &refport), 1,
remove_ids ?
- del_auth (msgport, refport,
- &auth->ids[1], auth->ids[0],
- &idsauth->[1 + auth->ids[0] + 1],
- auth->ids[1 + auth->ids[0]]) :
- add_auth (msgport, auth->authport));
+ msg_del_auth (msgport, refport,
+ &auth->ids[1], auth->ids[0],
+ &auth->ids[1 + auth->ids[0] + 1],
+ auth->ids[1 + auth->ids[0]]) :
+ msg_add_auth (msgport, auth->authport));
if (err &&
(!ignore_bad_pid || (err != ESRCH && err != MIG_SERVER_DIED)))
{
@@ -391,7 +390,7 @@ apply_auth_to_pids (struct auth *auth, unsigned int npids, pid_t pids[],
unsigned int i;
for (i = 0; i < npids; ++i)
- status |= apply_auth (ids, pids[i], ignore_bad_pid);
+ status |= apply_auth (auth, pids[i], ignore_bad_pid);
return status;
}
@@ -411,7 +410,7 @@ apply_auth_to_loginid (struct auth *auth, int loginid)
return 1;
}
- status = apply_auth_to_pids (ids, npids, pids, 1);
+ status = apply_auth_to_pids (auth, npids, pids, 1);
if (pids != pidbuf)
vm_deallocate (mach_task_self (),
@@ -435,7 +434,7 @@ apply_auth_to_pgrp (struct auth *auth, pid_t pgrp)
return 1;
}
- status = apply_auth_to_pids (ids, npids, pids, 1);
+ status = apply_auth_to_pids (auth, npids, pids, 1);
if (pids != pidbuf)
vm_deallocate (mach_task_self (),