Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103628 - /bin/mount incorrectly sets "noexec" option
Summary: /bin/mount incorrectly sets "noexec" option
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-24 14:45 UTC by Maciej Pietka
Modified: 2005-08-24 15:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pietka 2005-08-24 14:45:57 UTC
/bin/mount incorrectly sets "noexec" flag on mounted filesystem (e.g. cdrom),
when the "user" option is given after "exec" in fstab.

When both options are given in different order ("user" before "exec"),
filesystem is mounted without "noexec" flag (as expected).


Reproducible: Always
Steps to Reproduce:
One line from /etc/fstab:
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,exec,user 0 0

1. mount /mnt/cdrom (as root)

Actual Results:  
the result of `grep cdrom /etc/mtab' is:

/dev/cdroms/cdrom0 /mnt/cdrom iso9660 ro,noexec,nosuid,nodev 0 0

Expected Results:  
Mount cdrom without "noexec" flag.

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.5-r0, 2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="pl es"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa arts avi berkdb bitmap-fonts bzlib cdr crypt cups curl dvd
eds emacs emboss encode f77 fam fftw foomaticdb fortran gdbm gif gpm gstreamer
gtk gtk2 imlib ipv6 jpeg kde kerberos ldap leim libg++ libwww mad mikmod motif
mozilla mp3 mpeg mpi mule ncurses netcdf nls ogg oggvorbis opengl oss pam pdflib
perl png posix ppds python qt quicktime readline sasl sdl shared sockets spell
sse ssl tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis xine xml2
xmms xv zlib linguas_pl linguas_es userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-08-24 15:05:15 UTC
man mount

<snip>
user 

Allow an ordinary user to mount the file system.  The name of the mounting user
is  written to mtab so that he can unmount the file system again. This option
*implies* the options noexec, nosuid, and nodev (unless overridden by
*subsequent* options, as in the option line user,exec,dev,suid).
</snip>

Emphasis on *implies* and *subsequent* added by me. Not a bug, marking INVALID.