diff options
-rw-r--r-- | libtrivfs/io-restrict-auth.c | 10 |
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; |