diff -uprk.orig vsftpd-1.2.1.orig/Makefile vsftpd-1.2.1/Makefile --- vsftpd-1.2.1.orig/Makefile 2004-01-17 20:03:37 +0300 +++ vsftpd-1.2.1/Makefile 2004-01-17 20:05:34 +0300 @@ -5,7 +5,7 @@ IFLAGS = -idirafter dummyinc #CFLAGS = -g CFLAGS = $(RPM_OPT_FLAGS) -W -Werror -Wshadow #-pedantic -Werror -Wconversion -LIBS = -lcap -lpam +LIBS = -lcap -lpam -lpam_userpass LINK = OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff -uprk.orig vsftpd-1.2.1.orig/sysdeputil.c vsftpd-1.2.1/sysdeputil.c --- vsftpd-1.2.1.orig/sysdeputil.c 2003-06-11 01:42:33 +0400 +++ vsftpd-1.2.1/sysdeputil.c 2004-01-17 20:05:14 +0300 @@ -131,7 +131,7 @@ /* END config */ /* PAM support - we include our own dummy version if the system lacks this */ -#include +#include /* No PAM? Try getspnam() with a getpwnam() fallback */ #ifndef VSF_SYSDEP_HAVE_PAM @@ -264,9 +264,7 @@ vsf_sysdep_check_auth(const struct mystr #else /* VSF_SYSDEP_HAVE_PAM */ static pam_handle_t* s_pamh; -static struct mystr s_pword_str; -static int pam_conv_func(int nmsg, const struct pam_message** p_msg, - struct pam_response** p_reply, void* p_addata); +static pam_userpass_t userpass; static void vsf_auth_shutdown(void); int @@ -277,14 +275,15 @@ vsf_sysdep_check_auth(const struct mystr int retval; struct pam_conv the_conv = { - &pam_conv_func, - 0 + pam_userpass_conv, + &userpass }; if (s_pamh != 0) { bug("vsf_sysdep_check_auth"); } - str_copy(&s_pword_str, p_pass_str); + userpass.user = str_getbuf(p_user_str); + userpass.pass = str_getbuf(p_pass_str); retval = pam_start(tunable_pam_service_name, str_getbuf(p_user_str), &the_conv, &s_pamh); if (retval != PAM_SUCCESS) @@ -362,6 +361,7 @@ vsf_auth_shutdown(void) vsf_remove_uwtmp(); } +#if 0 static int pam_conv_func(int nmsg, const struct pam_message** p_msg, struct pam_response** p_reply, void* p_addata) @@ -397,6 +397,7 @@ pam_conv_func(int nmsg, const struct pam *p_reply = p_resps; return PAM_SUCCESS; } +#endif #endif /* VSF_SYSDEP_HAVE_PAM */