lkml.org 
[lkml]   [1998]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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;
\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.024 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site