LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 05-16-2008, 01:59 PM   #1
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Rep: Reputation: 30
fedora 8 vs fedora 9 - does pam_mount disallow 'exec' mount flag?


Hello all,

Wiped Fedora 8 last night and installed Fedora 9 fresh. I use pam_mount to mount my encrypted home directory image through a loop device upon login, and now in Fedora 9 it always mounts with the 'noexec' mount flag, even though /etc/security/pam_mount.conf.xml has <mntoptions allow="exec,nosuid,nodev,loop,encryption,fsck" /> and my definition for my home mount includes the exec flag.

Any pointers?

Thanks!
 
Old 05-17-2008, 12:42 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,813
Blog Entries: 54

Rep: Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987
Is there any indication in syslog it denies you the "noexec"?
And with PAM "debug" flags added?
Can you at least remount the loop device as "exec" manually?
 
Old 05-19-2008, 09:29 AM   #3
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Original Poster
Rep: Reputation: 30
After logging in and getting root, I can run "mount -o remount,exec /home/ebowser" and all is well.

It looks like the exec flag is passed, according to debug output.

Here is relevant login output from /var/log/secure:
Code:
May 19 09:16:27 localhost login: pam_mount(pam_mount.c:202) enter read_password
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:311) saving authtok for session code
May 19 09:16:43 localhost login: pam_unix(login:session): session opened for user ebowser by ebowser(uid=0)
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:460) Entered pam_mount session stage
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:481) back from global readconfig
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:483) per-user configurations not allowed by pam_mount.conf.xml
May 19 09:16:43 localhost login: pam_mount(misc.c:56) Session open: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(rdconf2.c:209) checking sanity of volume record (/home/ebowser.img)
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:535) about to perform mount operations
May 19 09:16:43 localhost login: pam_mount(mount.c:409) information for mount:
May 19 09:16:43 localhost login: pam_mount(mount.c:410) ----------------------
May 19 09:16:43 localhost login: pam_mount(mount.c:411) (defined by globalconf)
May 19 09:16:43 localhost login: pam_mount(mount.c:412) user:          ebowser
May 19 09:16:43 localhost login: pam_mount(mount.c:413) server:
May 19 09:16:43 localhost login: pam_mount(mount.c:414) volume:        /home/ebowser.img
May 19 09:16:43 localhost login: pam_mount(mount.c:415) mountpoint:    /home/ebowser
May 19 09:16:43 localhost login: pam_mount(mount.c:416) options:       encryption=aes,exec,loop,user,
May 19 09:16:43 localhost login: pam_mount(mount.c:417) fs_key_cipher: bf-cbc
May 19 09:16:43 localhost login: pam_mount(mount.c:418) fs_key_path:   /home/ebowser.key
May 19 09:16:43 localhost login: pam_mount(mount.c:419) use_fstab:     0
May 19 09:16:43 localhost login: pam_mount(mount.c:420) ----------------------
May 19 09:16:43 localhost login: pam_mount(mount.c:182) realpath of volume "/home/ebowser" is "/home/ebowser"
May 19 09:16:43 localhost login: pam_mount(mount.c:186) checking to see if /home/ebowser.img is already mounted at /home/ebowser
May 19 09:16:43 localhost login: pam_mount(mount.c:873) checking for encrypted filesystem key configuration
May 19 09:16:43 localhost login: pam_mount(mount.c:882) decrypting FS key using system auth. token and bf-cbc
May 19 09:16:43 localhost login: pam_mount(mount.c:899) about to start building mount command
May 19 09:16:43 localhost login: pam_mount(misc.c:285) command: /sbin/losetup [-p0] [-eaes] [%(KEYBITS)] [/dev/loop7] [/home/ebowser.img]
May 19 09:16:43 localhost login: pam_mount(misc.c:56) set_myuid<pre>: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(misc.c:56) set_myuid<post>: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(mount.c:691) error sending password to losetup
May 19 09:16:43 localhost login: pam_mount(mount.c:104) losetup errors:
May 19 09:16:43 localhost login: pam_mount(mount.c:107)
May 19 09:16:43 localhost login: pam_mount(mount.c:107) Usage:
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  losetup loop_device                                  # give info
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  losetup -a | --all                                   # list all used
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  losetup -d | --detach loop_device                    # delete
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  losetup -f | --find                                  # find unused
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  losetup [ options ] {-f|--find|loop_device} file     # setup
May 19 09:16:43 localhost login: pam_mount(mount.c:107)
May 19 09:16:43 localhost login: pam_mount(mount.c:107) Options:
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -e | --encryption <type> enable data encryption with specified <name/num>
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -h | --help              this help
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -o | --offset <num>      start at offset <num> into file
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -p | --pass-fd <num>     read passphrase from file descriptor <num>
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -r | --read-only         setup read-only loop device
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -s | --show              print device name (with -f <file>)
May 19 09:16:43 localhost login: pam_mount(mount.c:107)  -v | --verbose           verbose mode
May 19 09:16:43 localhost login: pam_mount(mount.c:107)
May 19 09:16:43 localhost login: pam_mount(mount.c:697) waiting for losetup
May 19 09:16:43 localhost login: pam_mount(mount.c:911) error checking filesystem but will continue
May 19 09:16:43 localhost login: pam_mount(misc.c:285) command: /bin/mount [-p0] [-t] [ext3] [/home/ebowser.img] [/home/ebowser] [-oencryption=aes,exec,loop,user,]
May 19 09:16:43 localhost login: pam_mount(misc.c:56) set_myuid<pre>: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(misc.c:56) set_myuid<post>: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(mount.c:107)
May 19 09:16:43 localhost login: pam_mount(mount.c:933) waiting for mount
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:134) clean system authtok (0)
May 19 09:16:43 localhost login: pam_mount(misc.c:285) command: /usr/sbin/pmvarrun [-u] [ebowser] [-o] [1]
May 19 09:16:43 localhost login: pam_mount(misc.c:56) set_myuid<pre>: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(misc.c:56) set_myuid<post>: (uid=0, euid=0, gid=0, egid=0)
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:425) pmvarrun says login count is 1
May 19 09:16:43 localhost login: pam_mount(pam_mount.c:548) done opening session (ret=0)
May 19 09:16:43 localhost login: LOGIN ON tty2 BY ebowser
 
Old 05-21-2008, 09:59 AM   #4
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Original Poster
Rep: Reputation: 30
Anybody?

Right now I have to log in as my user in a text screen to get the mount, remount as exec, stay logged in, and switch to GUI to log in there or else all of my Autostart stuff fails. Really annoying.

Thanks!
 
Old 05-21-2008, 07:49 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,813
Blog Entries: 54

Rep: Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987
I see the the exec flag getting passed, I'd file a bug report.
 
Old 06-02-2008, 09:58 AM   #6
whysyn
Member
 
Registered: Jun 2003
Location: Cleveburg, OH
Distribution: mostly Fedora
Posts: 154

Original Poster
Rep: Reputation: 30
Bug report filed, here's the answer:

pam_mount arranges the mount flags in alphabetic order, and the 'user' flag (which is applied last) forces 'noexec.'

In the past this does not seem to be the case, but removing the 'user' flag from my mount options fixed the problem.

https://bugzilla.redhat.com/show_bug.cgi?id=447962
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount LVM partition of Fedora 4 in Fedora 6 sahi10 Linux - Newbie 2 05-04-2008 02:15 AM
DVD (auto)mount problem, gnome-mount, hal, Fedora C 5 lazarion Linux - Hardware 5 01-10-2007 05:45 AM
Using pam_mount to mount /home on login hamish Linux - Software 1 05-13-2006 09:58 AM
What is Exec Shield in Fedora??? neosap Fedora 1 06-20-2004 12:34 AM
quiet mount flag? veritas Slackware 0 09-18-2003 06:19 PM


All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration