Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130550 - mod_auth_pam doesn't work with Apache 2.2
Summary: mod_auth_pam doesn't work with Apache 2.2
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 21:28 UTC by Craig Andrews
Modified: 2006-04-25 15:03 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 Craig Andrews gentoo-dev 2006-04-19 21:28:49 UTC
mod_auth_pam does not seem to work with Apache 2.2. I have not yet tried downgrading to Apache 2.0 to see if it also affects that version.

My vhosts.d config files looks like this (for mythweb):

And when I try to access /mythweb, I get prompted for crudentials, then an HTTP 500 is returned.

The error_log contains these lines:
[Thu Apr 20 00:18:09 2006] [error] Internal error: pcfg_openfile() called with NULL filename
[Thu Apr 20 00:18:09 2006] [error] [client 192.168.0.100] (9)Bad file descriptor: Could not open password file: (null)

Here's the version information:
net-www/apache-2.2.0-r2  USE="ldap ssl static-modules threads -debug -doc -mpm-event -mpm-peruser -mpm-prefork -mpm-worker -no-suexec"
net-www/mod_auth_pam-1.1.1-r1  USE="apache2"

And my emerge --info:
Portage 2.1_pre7-r5 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.4-r1, 2.6.16-beyond-git9 i686)
=================================================================
System uname: 2.6.16-beyond-git9 i686 Intel(R) Celeron(R) CPU 3.06GHz
Gentoo Base System version 1.12.0_pre17
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O3 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks gpg metadata-transfer sandbox sfperms strict usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1,--enable-new-dtags,--sort-common"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-overlays/beyond"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa animation apache2 artworkextra asf avi bash-completion beagle berkdb bitmap-fonts bluetooth bzip2 cairo cdda cdparanoia cdr chm cli crypt ctype cups curl daap dba dbus dga divx4linux dlloader dpms dri dts dv dvd dvdr dvdread emboss encode exif expat fam fame fastbuild fat fbsplash ffmpeg fftw firefox flac foomaticdb force-cgi-redirect fortran freetype ftp gaim gd gdbm geoip gif gimpprint glibc-omitfp glitz glut gnome gnutls gphoto2 gpm gstreamer gstreamer10 gtk gtk2 hal hardened hardenedphp imagemagick imlib innodb ipv6 isdnlog java joystick jpeg jpeg2k junit lcms ldap libfame libg++ libnotify libusb libwww lirc live lm_sensors lzo mad memlimit mikmod mjpeg mmap mmx mmxext mng mono motif mozilla mozsvg mp3 mpeg mpeg2 mplayer mysql mythtv nautilus ncurses network nls nptl nptlonly ntfs nvidia offensive ogg oggvorbis openexr opengl pam pango pcre pdf pdflib perl pic pie png pnp posix ppd ppds pppd python quicktime rar readline real rtc samba scanner screensaver sdl session sharedmem shout simplexml soap sockets sox speex spell spl sse sse2 ssl suspend2 svg tcpd theora threads tiff tokenizer transcode truetype truetype-fonts type-fonts type1-fonts udev unicode usb v4l v4l2 vcd videos vorbis webdav webservices wifi win32codecs wmf wv xine xinerama xml xml2 xpm xprint xrandr xscreensaver xsl xv xvid xvmc zeroconf zlib elibc_glibc input_devices_evdev input_devices_joystick input_devices_keyboard input_devices_mouse kernel_linux linguas_en userland_GNU video_cards_nv video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-04-21 17:34:31 UTC
The module is working fine for me, it just takes a bit more tweaking, so that  mod_auth_basic will let modules that use the old auth API work.

Here is my working mod_auth_pam config fomr my .htaccess:

AuthBasicAuthoritative Off
AuthType Basic
AuthName WikiWiki
Require group users
Comment 2 Craig Andrews gentoo-dev 2006-04-23 20:51:58 UTC
(In reply to comment #1)
> The module is working fine for me, it just takes a bit more tweaking, so that 
> mod_auth_basic will let modules that use the old auth API work.
> 
> Here is my working mod_auth_pam config fomr my .htaccess:
> 
> AuthBasicAuthoritative Off
> AuthType Basic
> AuthName WikiWiki
> Require group users
> 

I am aware of how to use mod_auth_pam, and I am using a similar configuration to what you pointed out. I actually bit the bullet and downgraded to Apache 2.1, and mod_auth_pam works perfectly with an identical configuration as I tried under 2.2. Are you sure you tested under Apache 2.2?
Comment 3 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-04-25 15:03:21 UTC
Yes, I am sure I am using Apache 2.2. If I was under Apache 2.0, the AuthBasicAuthoritative Off directive would cause a 500 Internal Server Error.

Note that it is this specific directive that lets mod_auth_pam work. I was getting the *same* error you were in my error log until I added that directive. Please check your configuration to make sure you included that directive. If it is still not working after including that directive, then attach your configuration.