summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/file-getcontrol.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libdiskfs/file-getcontrol.c b/libdiskfs/file-getcontrol.c
index 4ea2ae8e..1d7dfa9b 100644
--- a/libdiskfs/file-getcontrol.c
+++ b/libdiskfs/file-getcontrol.c
@@ -1,5 +1,5 @@
/* libdiskfs implementation of fs.defs:file_getcontrol.c
- Copyright (C) 1992, 1993, 1994 Free Software Foundation
+ Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -24,14 +24,17 @@ diskfs_S_file_getcontrol (struct protid *cred,
mach_port_t *control,
mach_msg_type_name_t *controltype)
{
- int error = 0;;
+ int error = 0;
+ struct userid *id;
if (!cred)
return EOPNOTSUPP;
- if (!diskfs_isuid (0, cred))
- error = EPERM;
- else
+ assert (cred->id);
+ for (id = cred->id; id && !error; id = id->next)
+ if (!diskfs_idhasuid (0, id))
+ error = EPERM;
+ if (!error)
{
spin_lock (&_diskfs_control_lock);
_diskfs_ncontrol_ports++;