diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-03-17 18:57:29 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-03-17 18:57:29 +0000 |
commit | 9d0d90c6aab0a7763e0a8576b964601042e33270 (patch) | |
tree | 600c56701dd37ec11b477f9e2d59eb4b95c05789 /libdiskfs/file-getcontrol.c | |
parent | 3cf17d30fac99853c5324167d35ba4db667cd819 (diff) | |
download | hurd-9d0d90c6aab0a7763e0a8576b964601042e33270.tar.gz hurd-9d0d90c6aab0a7763e0a8576b964601042e33270.tar.bz2 hurd-9d0d90c6aab0a7763e0a8576b964601042e33270.zip |
Back out previous change.
Diffstat (limited to 'libdiskfs/file-getcontrol.c')
-rw-r--r-- | libdiskfs/file-getcontrol.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libdiskfs/file-getcontrol.c b/libdiskfs/file-getcontrol.c index 1d7dfa9b..4ea2ae8e 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, 1995 Free Software Foundation + Copyright (C) 1992, 1993, 1994 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,17 +24,14 @@ diskfs_S_file_getcontrol (struct protid *cred, mach_port_t *control, mach_msg_type_name_t *controltype) { - int error = 0; - struct userid *id; + int error = 0;; if (!cred) return EOPNOTSUPP; - assert (cred->id); - for (id = cred->id; id && !error; id = id->next) - if (!diskfs_idhasuid (0, id)) - error = EPERM; - if (!error) + if (!diskfs_isuid (0, cred)) + error = EPERM; + else { spin_lock (&_diskfs_control_lock); _diskfs_ncontrol_ports++; |