diff options
author | Miles Bader <miles@gnu.org> | 1996-10-08 21:43:42 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-10-08 21:43:42 +0000 |
commit | f5d04682e9b524a903525c183dd47ba18827ed8f (patch) | |
tree | 8d92f665e484e8c75fc582d0e0f289b47fc09065 | |
parent | b0d9e94553bfd51030bfd7369f42128d2b118f26 (diff) |
(diskfs_S_file_get_storage_info):
Add security check, and deactivate FILE_STORE if necessary.
-rw-r--r-- | ext2fs/storeinfo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext2fs/storeinfo.c b/ext2fs/storeinfo.c index d63f9a92..6086d97a 100644 --- a/ext2fs/storeinfo.c +++ b/ext2fs/storeinfo.c @@ -102,6 +102,14 @@ diskfs_S_file_get_storage_info (struct protid *cred, if (! err) { err = store_remap (file_store, runs, num_runs, &file_store); + if (!err + && !diskfs_isuid (0, cred) + && !store_is_securely_returnable (file_store, cred->po->openstat)) + { + err = store_set_flags (file_store, STORE_INACTIVE); + if (err == EINVAL) + err = EACCES; + } if (! err) err = store_return (file_store, ports, num_ports, ints, num_ints, offsets, num_offsets, data, data_len); |