LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   fedora 8 vs fedora 9 - does pam_mount disallow 'exec' mount flag? (https://www.linuxquestions.org/questions/fedora-35/fedora-8-vs-fedora-9-does-pam_mount-disallow-exec-mount-flag-642705/)

whysyn 05-16-2008 12:59 PM

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!

unSpawn 05-17-2008 11:42 AM

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?

whysyn 05-19-2008 08:29 AM

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


whysyn 05-21-2008 08:59 AM

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!

unSpawn 05-21-2008 06:49 PM

I see the the exec flag getting passed, I'd file a bug report.

whysyn 06-02-2008 08:58 AM

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


All times are GMT -5. The time now is 06:26 AM.