Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384615 - lxde-base/lxdm-0.4.1-r1 does not use PAM
Summary: lxde-base/lxdm-0.4.1-r1 does not use PAM
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2011-09-27 06:38 UTC by Alexander E. Patrakov
Modified: 2011-11-10 10:48 UTC (History)
2 users (show)

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 Alexander E. Patrakov 2011-09-27 06:38:52 UTC
lxdm-binary dies not link to PAM libraries, even though --with-pam is passed to the configure script

Reproducible: Always

Steps to Reproduce:
1. emerge lxdm

Actual Results:  
See the log nelow - the PAM presence is not even checked for!

Expected Results:  
This is what I get when I remove --with-pam from the ./configure line

checking for pam_open_session in -lpam... yes
...
i686-pc-linux-gnu-gcc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DCONFIG_FILE=\"/etc/lxdm/lxdm.conf\" -DXSESSIONS_DIR=\"/usr/share/xsessions\" -DLXDM_DATA_DIR=/usr/share/lxdm -DLXDM_NUMLOCK_PATH=\"/usr/libexec/lxdm-numlock\" -I/usr/include/ConsoleKit/ck-connector -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -Werror-implicit-function-declaration -Wall  -g -O2 -DENABLE_PASSWORD -DLXDM_DEBUG -DLXDM_XCONN_XCB   -o lxdm-binary lxdm_binary-lxdm.o lxdm_binary-ui.o lxdm_binary-lxcom.o lxdm_binary-xconn.o  -lglib-2.0   -lxcb   -lck-connector -ldbus-1 -lpthread -lrt    -lck-connector -lpam -lcrypt

./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-password --with-pam --with-x --with-xconn=xcb --disable-gtk3 --enable-nls --disable-debug
configure: loading site script /usr/share/config.site
configure: loading site script /usr/share/crossdev/include/site/linux
configure: loading site script /usr/share/crossdev/include/site/i686-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i686-pc-linux-gnu-gcc... gcc3
checking whether i686-pc-linux-gnu-gcc and cc understand -c and -o together... yes
checking for crypt in -lcrypt... yes
checking for ck_connector_open_session in -lck-connector... yes
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking for X... libraries , headers 
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking utmpx.h usability... yes
checking utmpx.h presence... yes
checking for utmpx.h... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for atexit... yes
checking for endpwent... yes
checking for getspnam... yes
checking for getusershell... yes
checking for memset... yes
checking for putenv... yes
checking for strstr... yes
checking whether iso-codes has iso-639 domain... yes
checking whether NLS is requested... yes
checking for intltool >= 0.40.0... 0.41.1 found
checking for intltool-update... /usr/bin/intltool-update
checking for intltool-merge... /usr/bin/intltool-merge
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/gmsgfmt
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.12.3
checking for XML::Parser... ok
checking for i686-pc-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for XLIB... yes
checking for GLIB... yes
checking for GDK... yes
checking for GTK... yes
checking for CONSOLEKIT... yes
checking for XCONN... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lxdm.spec
config.status: creating src/Makefile
config.status: creating po/Makefile.in
config.status: creating pam/Makefile
config.status: creating data/Makefile
config.status: creating data/PostLogin
config.status: creating data/PostLogout
config.status: creating data/PreLogin
config.status: creating data/PreReboot
config.status: creating data/PreShutdown
config.status: creating data/LoginReady
config.status: creating data/lxdm
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing po/stamp-it commands
>>> Source configured.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2011-09-27 10:48:27 UTC
We need some sort of output of the actual crash
Comment 2 Alexander E. Patrakov 2011-09-27 11:07:50 UTC
There is no crash, are you sure that you have added your comment to the correct bug?

I have published some analysis of this bug in my blog: http://patrakov.blogspot.com/2011/09/autoconf-and-defaults.html
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2011-09-27 11:54:09 UTC
you say that lxdm-binary dies? So where is the crash?Where does it die? In compilation? During runtime? and build.log available?
Comment 4 Alexander E. Patrakov 2011-09-27 12:21:10 UTC
I didn't say that it dies. In fact, it works, but disobeys PAM rules. This happens because it is not linked to the PAM library, even though the ebuild tells it to.

Here is the problematic piece of configure.ac:

AC_ARG_WITH(pam,AC_HELP_STRING([--without-pam],[build without pam]),
[],[AC_CHECK_LIB([pam], [pam_open_session])])

It disables PAM if --with-pam (or --without-pam) is passed.
Comment 5 Alexander E. Patrakov 2011-09-27 12:22:25 UTC
Oh, there is a typo in the original description. Sorry for that. s/dies/does/
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2011-09-27 12:32:45 UTC
Right. Could you please prepare a patch and send them to upstream people? I will commit an updated ebuild soon

http://sourceforge.net/tracker/?group_id=316117&atid=1329778
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2011-09-27 12:38:43 UTC
+*lxdm-0.4.1-r2 (27 Sep 2011)
+
+  27 Sep 2011; Markos Chandras <hwoarang@gentoo.org> +lxdm-0.4.1-r2.ebuild:
+  Drop --with-pam since it silently disabled pam support. bug #384615 by
+  Alexander E. Patrakov <patrakov@gmail.com>
+
Comment 8 Oschtan 2011-11-10 10:48:17 UTC
Removing pam in lxdm (0.4.1-r2) leads to the well-known problem: it is impossible to terminate the session (in my case, LXDE) shutdown. A dialog box prompts you to enter the password root. The only option - is the usual end of the session and the transition to lxdm, from which it is possible to turn off or reboot the system. I have confidence that the removal of support for pam is premature, or they work to disable the support has not been fully implemented. Including this bug.