[11/12] fix isofs ignoring noexec and mode mount options

From: William Lee Irwin III
Date: Sun Jun 13 2004 - 19:55:26 EST


* Removed period check for executables in fs/isofs/inode.c
This fixes Debian BTS #162190
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=162190

From: Jan Gregor <gregor_jan@xxxxxxxxx>
To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
Subject: kernel-source-2.4.18: kernel ignores noexec and mode option in cdrom case
Message-ID: <20020924162129.A328@pisidlo>

In /etc/fstab i have following line:
/dev/cdrom /cdrom iso9660 gid=100,noauto,ro,noexec,mode=0444,user 0 0

I found on one CD that some files have exec bit set. From brief view
those files has no extension (filename.ext).

My drive is asus-1610a (ATAPI writer) connected throught scsi-emulation.


Index: linux-2.5/fs/isofs/inode.c
===================================================================
--- linux-2.5.orig/fs/isofs/inode.c 2004-06-13 11:57:34.000000000 -0700
+++ linux-2.5/fs/isofs/inode.c 2004-06-13 12:08:57.000000000 -0700
@@ -1250,14 +1250,6 @@
inode->i_mode = sbi->s_mode;
inode->i_nlink = 1;
inode->i_mode |= S_IFREG;
- /* If there are no periods in the name,
- * then set the execute permission bit
- */
- for(i=0; i< de->name_len[0]; i++)
- if(de->name[i]=='.' || de->name[i]==';')
- break;
- if(i == de->name_len[0] || de->name[i] == ';')
- inode->i_mode |= S_IXUGO; /* execute permission */
}
inode->i_uid = sbi->s_uid;
inode->i_gid = sbi->s_gid;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/