diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/isofs/inode.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index c348d6d88624..e5d408a7ea4a 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -117,8 +117,8 @@ static void destroy_inodecache(void) | |||
117 | 117 | ||
118 | static int isofs_remount(struct super_block *sb, int *flags, char *data) | 118 | static int isofs_remount(struct super_block *sb, int *flags, char *data) |
119 | { | 119 | { |
120 | /* we probably want a lot more here */ | 120 | if (!(*flags & MS_RDONLY)) |
121 | *flags |= MS_RDONLY; | 121 | return -EROFS; |
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
@@ -763,15 +763,6 @@ root_found: | |||
763 | */ | 763 | */ |
764 | s->s_maxbytes = 0x80000000000LL; | 764 | s->s_maxbytes = 0x80000000000LL; |
765 | 765 | ||
766 | /* | ||
767 | * The CDROM is read-only, has no nodes (devices) on it, and since | ||
768 | * all of the files appear to be owned by root, we really do not want | ||
769 | * to allow suid. (suid or devices will not show up unless we have | ||
770 | * Rock Ridge extensions) | ||
771 | */ | ||
772 | |||
773 | s->s_flags |= MS_RDONLY /* | MS_NODEV | MS_NOSUID */; | ||
774 | |||
775 | /* Set this for reference. Its not currently used except on write | 766 | /* Set this for reference. Its not currently used except on write |
776 | which we don't have .. */ | 767 | which we don't have .. */ |
777 | 768 | ||
@@ -1530,6 +1521,9 @@ struct inode *isofs_iget(struct super_block *sb, | |||
1530 | static struct dentry *isofs_mount(struct file_system_type *fs_type, | 1521 | static struct dentry *isofs_mount(struct file_system_type *fs_type, |
1531 | int flags, const char *dev_name, void *data) | 1522 | int flags, const char *dev_name, void *data) |
1532 | { | 1523 | { |
1524 | /* We don't support read-write mounts */ | ||
1525 | if (!(flags & MS_RDONLY)) | ||
1526 | return ERR_PTR(-EACCES); | ||
1533 | return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super); | 1527 | return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super); |
1534 | } | 1528 | } |
1535 | 1529 | ||