summaryrefslogtreecommitdiff
path: root/term/users.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-17 01:30:39 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-17 01:30:39 +0000
commitf3170cdd316387d2318b9e63229b28155f6b7c61 (patch)
treeeb69d0518d76ce6cb787451ef3703bdc96efa561 /term/users.c
parenta4a7a26b9db2f22c646402a8c174d64fceee01ad (diff)
(trivfs_S_file_chmod): Bother to return a value.
Diffstat (limited to 'term/users.c')
-rw-r--r--term/users.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/term/users.c b/term/users.c
index 62314303..dd0c7cdb 100644
--- a/term/users.c
+++ b/term/users.c
@@ -484,6 +484,7 @@ trivfs_S_file_chmod (struct trivfs_protid *cred,
if (!cred)
return EOPNOTSUPP;
+ mutex_lock (&global_lock);
for (i = 0; i < cred->nuids; i++)
if (cred->isroot || cred->uids[i] == term_owner)
{
@@ -505,7 +506,11 @@ trivfs_S_file_chmod (struct trivfs_protid *cred,
}
term_mode = (mode | S_IFCHR);
+ mutex_unlock (&global_lock);
+ return 0;
}
+ mutex_unlock (&global_lock);
+ return EPERM;
}