Re: noexec-flag does not work in Linux 2.4.10-pre10

Andreas Dilger (adilger@turbolabs.com)
Thu, 20 Sep 2001 15:17:08 -0600


On Sep 20, 2001 20:05 +0200, Peter Bornemann wrote:
> It seems that the noexec in fstab no longer works. Is this
> intentional?
>
> In fstab I have the following line:
>
> /dev/hda1 /dosc vfat codepage=850,umask=000,noexec 0 0
>
> A ls -l in /dosc shows:
>
> -rwxrwxrwx 1 root root 267657216 Jun 28 22:34 win386.swp
>
> The same case with iso9660:
>
> -r-xr-xr-x 1 root root 0 Jan 24 2000 s3cd1.dat
>
> However umask=111 is still working. I don't know exactly when this
> happened, but it was hot there in earlier 2.4 kernels.

Are you sure this is actually a problem? Can you really exec these
files, or is it just a matter of the flag? Some changes were made
to mount flags by Al Viro. If you really want the flags gone, you
should use a different umask (e.g. umask=111). The noexec flag
means (for filesystems that actually have permissions) that _even if_
the "x" bit is set, it cannot be executed.

Cheers, Andreas

--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/