Bug 76587 - changes to system-auth pam config not processed by vsftpd
Summary: changes to system-auth pam config not processed by vsftpd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vsftpd
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Radek Vokál
QA Contact: Mike McLean
URL:
Whiteboard:
: 85613 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-23 18:56 UTC by Jason Corley
Modified: 2007-04-18 16:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-23 07:58:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Jason Corley 2002-10-23 18:56:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
If I add the following to /etc/pam.d/system-auth:
session required /lib/security/pam_mkhomedir.so
Services such as ssh (and all subsets like sftp and scp) and login, etc. will
create the home directory of a user when they first log in.  However vsftpd does
not create the home directory ever and displays the following error when a user
tries to log in who doesn't have a home directory:
Unexpected response: OOPS: chdir
OOPS: chdir
OOPS: child died

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Add "session required /lib/security/pam_mkhomedir.so" to /etc/pam.d/system-auth
2. Attempt to log in as a valid user without a home directory
3. View error
	

Expected Results:  vsftpd should process the pam_mkhomedir module and create a
home directory if one doesn't exist.

Additional info:

Comment 1 Bill Nottingham 2002-12-14 00:29:48 UTC
This *may* be fixed with 1.1.3-1, FWIW.

Comment 2 Jason Corley 2002-12-16 15:44:12 UTC
No, sadly it doesn't fix the pam problem.  I rebuilt the srpm from rawhide,
version 1.1.3-2.  I found two errors in the 1.1.3-2 spec and the init script. 
The first is that /etc/rc.d/init.d/vsftpd is mode 644.  The second is a missing
bracket calling an array in the init script.  Here are patches to fix both in
case you haven't already done so:

--- vsftpd.init Fri Dec 13 19:28:27 2002
+++ vsftpd.init.new     Mon Dec 16 10:43:55 2002
@@ -34,7 +34,7 @@
                 index=0

                 while [ "${index}" -lt "${site_count}" ] ; do
-                        site=`basename $sites[${index}]} .conf`
+                        site=`basename ${sites[${index}]} .conf`
                         echo -n $"Starting $prog for $site: "
                                 ( /usr/sbin/vsftpd ${sites[${index}]} &)
                                 daemon true

--- vsftpd.spec Fri Dec 13 19:41:14 2002
+++ vsftpd.spec.new     Mon Dec 16 10:17:28 2002
@@ -46,7 +46,7 @@
 install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/vsftpd
 install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd.ftpusers
 install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd.user_list
-install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd
+install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd

 %clean
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

Comment 3 Jason Corley 2002-12-16 15:50:46 UTC
Since the init script looks for *.conf in /etc/vsftpd, would there be any reason
to not move vsftpd.user_list and vsftpd.ftpusers into /etc/vsftpd?  Just seems
more System V-ish IMHO.
Jason


Comment 4 Jason Corley 2002-12-16 16:03:13 UTC
Since I was adding patches to this anyway, here's one to put all the config
files into /etc/vsftpd (also includes the mode fix for /etc/rc.d/init.d/vsftpd).

--- vsftpd.spec Fri Dec 13 19:41:14 2002
+++ vsftpd.spec.new     Mon Dec 16 11:03:59 2002
@@ -44,9 +44,9 @@
 install -m 644 vsftpd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
 install -m 644 RedHat/vsftpd.log $RPM_BUILD_ROOT/etc/logrotate.d/vsftpd.log
 install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/vsftpd
-install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd.ftpusers
-install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd.user_list
-install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd
+install -m 600 %{SOURCE3} $RPM_BUILD_ROOT/etc/vsftpd/vsftpd.ftpusers
+install -m 600 %{SOURCE4} $RPM_BUILD_ROOT/etc/vsftpd/vsftpd.user_list
+install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/init.d/vsftpd

 %clean
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -65,7 +65,6 @@
 %defattr(-,root,root)
 /usr/sbin/vsftpd
 /etc/init.d/vsftpd
-%config(noreplace) /etc/vsftpd.*
 %dir /etc/vsftpd
 %config(noreplace) /etc/vsftpd/*
 %config(noreplace) /etc/pam.d/vsftpd

Comment 5 Bill Nottingham 2003-08-08 04:43:42 UTC
Initial issues are fixed now.

Comment 6 Bill Nottingham 2003-08-08 04:44:02 UTC
*** Bug 85613 has been marked as a duplicate of this bug. ***

Comment 7 Radek Vokál 2004-08-23 07:58:47 UTC
Should be fixed with vsftpd-2.0.1


Note You need to log in before you can comment on or make changes to this bug.