diff options
-rw-r--r-- | term/users.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/term/users.c b/term/users.c index 7bbe709c..8794bfb6 100644 --- a/term/users.c +++ b/term/users.c @@ -805,28 +805,29 @@ error_t trivfs_S_io_revoke (struct trivfs_protid *cred) { struct stat st; - - error_t - iterator_function (void *port) + + error_t iterator_function (void *port) { - struct trivfs_proted *user = port; - - if ((user.class == cred.class) && (user != cred)) + struct trivfs_protid *user = port; + + if (user->pi.class == cred->pi.class && user != cred) ports_destroy_right (user); return 0; } if (!cred) return EOPNOTSUPP; - + mutex_lock (&global_lock); if (!cred->isroot) { + error_t err; + /* XXX */ st.st_uid = term_owner; st.st_gid = term_group; - + err = fshelp_isowner (&st, cred->user); if (err) { @@ -834,15 +835,15 @@ trivfs_S_io_revoke (struct trivfs_protid *cred) return err; } } - + ports_bucket_iterate (term_bucket, iterator_function); mutex_unlock (&global_lock); return 0; } - - + + /* TIOCMODG ioctl -- Get modem state */ |