Messages in this thread Patch in this message |  | | | Date | Sat, 21 Mar 1998 18:54:50 +0100 (MET) | | From | Ragnar Hojland Espinosa <> | | Subject | [PATCH] isofs noexec (2.1.90) | |
Found quite strange that you had to do a
mount /cdrom -o mode=0444
instead of just like other fs
mount /cdrom -o noexec
This little patch `fixes' it.
____/| Ragnar Hojland (tech.support@redestb.es) Fingerprint 94C4B
\ o.O| 2F0D27DE025BE2302C
=(_)= "Thou shalt not follow the NULL pointer for 104B78C56 B72F0822
U chaos and madness await thee at its end." hkp://keys.pgp.com--- linux-2.1.90/fs/isofs/inode.c.ORIG Sat Mar 21 18:50:37 1998
+++ linux-2.1.90/fs/isofs/inode.c Sat Mar 21 18:52:41 1998
@@ -858,8 +858,11 @@ void isofs_read_inode(struct inode * ino
for(i=0; i< raw_inode->name_len[0]; i++)
if(raw_inode->name[i]=='.' || raw_inode->name[i]==';')
break;
- if(i == raw_inode->name_len[0] || raw_inode->name[i] == ';')
+ if (IS_NOEXEC(inode)) {
+ inode->i_mode &= ~S_IXUGO;
+ } else if(i == raw_inode->name_len[0] || raw_inode->name[i] == ';') {
inode->i_mode |= S_IXUGO; /* execute permission */
+ }
}
inode->i_uid = inode->i_sb->u.isofs_sb.s_uid;
inode->i_gid = inode->i_sb->u.isofs_sb.s_gid;
|  |