Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264658 - Stabilise sys-auth/pam_mount-2.1
Summary: Stabilise sys-auth/pam_mount-2.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on: 262475 327689 328501
Blocks:
  Show dependency tree
 
Reported: 2009-04-02 17:48 UTC by Jeroen Roovers (RETIRED)
Modified: 2010-08-13 13:33 UTC (History)
3 users (show)

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


Attachments
Patch to fix sys-auth/pam_mount-2.0 handling of mount options with the "regular mount program". (pam_mount-2.0-mount-options.patch,1.12 KB, patch)
2010-05-04 18:45 UTC, Gef
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2009-04-02 17:48:03 UTC
It doesn't look like any version ever went stable before, and now I had a user questioning that. Maybe it's time.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-04-02 17:48:42 UTC
According to bug #262475 it should be 1.21 or higher.
Comment 2 Hanno Böck gentoo-dev 2009-11-17 13:24:04 UTC
We can stabilize 1.32 as soon as udev-147 is stabilized.
Comment 3 Hanno Böck gentoo-dev 2010-04-23 14:35:23 UTC
Should be 2.0 or higher after the 30 day period.
Comment 4 François Valenduc 2010-04-23 16:54:47 UTC
pam_mount-2.0 can't be build on my system. I get the following error:

checking for libcryptsetup... configure: error: Package requirements (libcryptsetup >= 1.0.0) were not met:

No package 'libcryptsetup' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libcryptsetup_CFLAGS
and libcryptsetup_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-auth/pam_mount-2.0/work/pam_mount-2.0/config.log
 * ERROR: sys-auth/pam_mount-2.0 failed:
 *   econf failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_configure
 *   environment, line 958:  Called econf '--with-slibdir=/lib64'
 *     ebuild.sh, line 544:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of 'emerge --info =sys-auth/pam_mount-2.0',
 * the complete build log and the output of 'emerge -pqv =sys-auth/pam_mount-2.0'.
 * The complete build log is located at '/var/tmp/portage/sys-auth/pam_mount-2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-auth/pam_mount-2.0/temp/environment'.
 * S: '/var/tmp/portage/sys-auth/pam_mount-2.0/work/pam_mount-2.0'

>>> Failed to emerge sys-auth/pam_mount-2.0, Log file:


Does anybody knows a solution to this problem ?
Comment 5 Hanno Böck gentoo-dev 2010-04-23 17:04:40 UTC
What version of cryptsetup do you have installed? Maybe it needs an up-to-date version.
Comment 6 François Valenduc 2010-04-23 17:23:48 UTC
I upgraded cryptsetup from 1.0.6 to 1.1.1 and it solved the problem. So, stabilizing a newer version cryptsetup seems to be needed to also stabilise pam_mount-2.0. I am also a bit surprised that there is no request to stablise >=sys-libs/libhx-3.4 which is a dependency for pam_mount.
 
Comment 7 adriancz 2010-04-23 20:34:25 UTC
pam_munt 2.0 does not work for me:

Apr 23 22:31:37 ab login[1756]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/tty2 ruser= rhost=  user=xxx
Apr 23 22:31:40 ab login[1756]: FAILED LOGIN (1) on '/dev/tty2' FOR 'xxx', Authentication failure
Apr 23 22:31:41 ab login[1756]: pam_mount(rdconf1.c:1325): Volume /dev/sda6: consider specifying the fskeyhash
Apr 23 22:31:46 ab login[1756]: pam_unix(login:session): session opened for user xxx by LOGIN(uid=0)
Apr 23 22:31:46 ab login[1756]: pam_mount(rdconf1.c:1325): Volume /dev/sda6: consider specifying the fskeyhash
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:64): Errors from underlying mount program:
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): Usage: mount -V                 : print version
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount -h                 : print this help
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount                    : list mounted filesystems
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount -l                 : idem, including volume labels
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): So far the informational part. Next the mounting.
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): The command is `mount [-t fstype] something somewhere'.
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): Details found in /etc/fstab may be omitted.
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount device             : mount device at the known place
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount directory          : mount known device here
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount -t type dev dir    : ordinary mount command
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): Note that one does not really mount a device, one mounts
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): a filesystem (of the given type) found on the device.
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): One can also mount an already visible directory tree elsewhere:
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --bind olddir newdir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): or move a subtree:
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --move olddir newdir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): One can change the type of mount containing the directory dir:
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-shared dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-slave dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-private dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-unbindable dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): One can change the type of all the mounts in a mount subtree
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): containing the directory dir:
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-rshared dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-rslave dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-rprivate dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68):        mount --make-runbindable dir
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): A device can be given by name, say /dev/hda1 or /dev/cdrom,
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): or by label, using  -L label  or by uuid, using  -U uuid .
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): Other options: [-nfFrsvw] [-o options] [-p passwdfd].
Apr 23 22:31:46 ab login[1756]: pam_mount(mount.c:68): For many more details, say  man 8 mount .
Apr 23 22:31:46 ab login[1756]: pam_mount(pam_mount.c:520): mount of /dev/sda6 failed
Comment 8 Hanno Böck gentoo-dev 2010-05-02 00:22:44 UTC
adriancz: can you open a new bug for that issue and attach your pam_mount config file?
Comment 9 Andrew Savchenko gentoo-dev 2010-05-04 16:37:28 UTC
(In reply to comment #7)
> pam_munt 2.0 does not work for me:

Same issue here. I found the reason.
If you run pam_mount with debug=2, it shows how it calls mount:
command: 'mount' '-p0' '-o noatime,nosuid,barrier=1' 'noatime,nosuid,barrier=1' '-tauto' '/dev/sda2' '/home/user'

As you can see, it passes mount options twice and the second time without -o argument. This is a critical bug.

If you remove mount option from your config, this will work. However in my case nosuid is critical. So I modified <lclmount> to always pass it, but this has will fail if you mount both ext3/4 and non-ext partitions with incompatible flags.
Comment 10 Gef 2010-05-04 18:45:03 UTC
Created attachment 230341 [details, diff]
Patch to fix sys-auth/pam_mount-2.0 handling of mount options with the "regular mount program".

(In reply to comment #9)
> (In reply to comment #7)
> > pam_munt 2.0 does not work for me:
> 
> Same issue here. I found the reason.
> 
Same conclusions here. Here is quick a patch (I'll check if this has already been reported upstream).

(this patch will probably eat your data).
Comment 12 Andrew Savchenko gentoo-dev 2010-05-04 19:47:07 UTC
(In reply to comment #11)
> This problem has been fixed upstream. See
> http://pam-mount.git.sourceforge.net/git/gitweb.cgi?p=pam-mount/pam-mount;a=commit;h=b4dbbfe5de2f70f5fccd20e22d4bd2cb3b7f25dd
> 

Yes. v2.1 is out and claims to fix this.
Comment 13 Hanno Böck gentoo-dev 2010-05-04 20:21:48 UTC
2.1 is now in the tree, I hope no further issues appear.
Comment 14 Stefan G. Weichinger 2010-05-07 08:58:08 UTC
(In reply to comment #13)
> 2.1 is now in the tree, I hope no further issues appear.

I do have an issue, see this thread:

http://archives.gentoo.org/gentoo-user/msg_28dde19a7051f21e9fec8c4124d88b76.xml

I'll be happy to open a new bug for this if necessary.

In short: pam_mount-2.1 and -2.0 fail to mount.crypt my encrypted device while pam_mount-1.33 succeeds.

Please let me know if you want a separate bug opened for this. Thanks. 

Comment 15 Hanno Böck gentoo-dev 2010-05-07 10:28:09 UTC
Yes, please open another bug with all relevant information (logs, config files).
Comment 16 Stefan G. Weichinger 2010-05-07 14:20:59 UTC
(In reply to comment #15)
> Yes, please open another bug with all relevant information (logs, config
> files).
> 

Did so, see:
http://bugs.gentoo.org/show_bug.cgi?id=318865
Comment 17 Hanno Böck gentoo-dev 2010-07-23 17:36:41 UTC
Archs, please go ahead.
Comment 18 David Abbott (RETIRED) gentoo-dev 2010-07-24 23:24:47 UTC
Unmasked sys-libs/libhx and on x86 installed fine.
No other testing done.
Comment 19 Christian Faulhammer (RETIRED) gentoo-dev 2010-07-25 10:14:15 UTC
stable x86, thanks David
Comment 20 Pacho Ramos gentoo-dev 2010-07-27 18:50:54 UTC
amd64 stable
Comment 21 Joe Jezak (RETIRED) gentoo-dev 2010-08-13 13:33:13 UTC
Marked ppc stable.