Messages in this thread | | | Date | Tue, 30 Sep 1997 18:13:16 +0100 (BST) | From | Mark Hemment <> | Subject | Re: Bug in caching of mount options |
| |
On Tue, 30 Sep 1997, Jim Nance wrote: > If I mount a filesystem with the noexec option, then I (of cousre) > cant run any binaries on it. If I remount it with: > > mount -o remount,exec /mnt/zip > > I can still not run binaries which I tried to run before the remount, > but I CAN run new binaries which I copy into the file system. > > I can be more detailed if some one wants me to, but this is pretty > easy to reproduce.
An inode structure caches the superblock flags (which include the noexec mount option), in the member "i_flags". When remounting "exec", only the superblock flags [s_flags] are updated. Any 'cached' inodes still have the original flag value, which causes IS_NOEXEC(inode) to return true.
The solution would be to parse the inode cache, and update "i_flags". This code would belong in fs/inode.c, and would be similar to invalidate_inodes() - although, obviously, there would be differences...
Regards,
markhe
------------------------------------------------------------------ Mark Hemment, Unix/C Software Engineer (Contractor) markhe@nextd.demon.co.uk http://www.nextd.demon.co.uk/ "Success has many fathers, failure is a B**TARD!" - anon ------------------------------------------------------------------
| |