summaryrefslogtreecommitdiff
path: root/libtrivfs/io-restrict-auth.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-27 17:28:59 +0000
committerMiles Bader <miles@gnu.org>1996-01-27 17:28:59 +0000
commitc1335b38f470aa2acc5adfa5dca48c7a373d39de (patch)
tree2d79a0b2f185fd8ad80fef9dcfb5001f6aee39be /libtrivfs/io-restrict-auth.c
parent8643a801890b884c59bf0ac2259579f2311139c6 (diff)
(trivfs_S_io_restrict_auth): Use ports_create_port instead of
ports_allocate_port, and return any error.
Diffstat (limited to 'libtrivfs/io-restrict-auth.c')
-rw-r--r--libtrivfs/io-restrict-auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libtrivfs/io-restrict-auth.c b/libtrivfs/io-restrict-auth.c
index 256c05f1..ac915896 100644
--- a/libtrivfs/io-restrict-auth.c
+++ b/libtrivfs/io-restrict-auth.c
@@ -61,9 +61,13 @@ trivfs_S_io_restrict_auth (struct trivfs_protid *cred,
if (listmember (gids, cred->gids[i], ngids))
newgids[newngids++] = cred->gids[i];
- newcred = ports_allocate_port (cred->po->cntl->protid_bucket,
- sizeof (struct trivfs_protid),
- cred->po->cntl->protid_class);
+ err = ports_create_port (cred->po->cntl->protid_class,
+ cred->po->cntl->protid_bucket,
+ sizeof (struct trivfs_protid),
+ &newcred);
+ if (err)
+ return err;
+
newcred->isroot = 0;
mutex_lock (&cred->po->cntl->lock);
newcred->po = cred->po;