Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 232586 | Differences between
and this patch

Collapse All | Expand All

(-)shadow-4.1.2.1/configure.in (-6 / +37 lines)
Lines 87-92 if test "$ac_cv_header_utmp_h" = "yes"; Link Here
87
fi
87
fi
88
88
89
if test "$ac_cv_header_lastlog_h" = "yes"; then
89
if test "$ac_cv_header_lastlog_h" = "yes"; then
90
90
	AC_CACHE_CHECK(for ll_host in struct lastlog,
91
	AC_CACHE_CHECK(for ll_host in struct lastlog,
91
		ac_cv_struct_lastlog_ll_host,
92
		ac_cv_struct_lastlog_ll_host,
92
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <lastlog.h>],
93
		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <lastlog.h>],
Lines 331-336 if test "$with_selinux" != "no"; then Link Here
331
	fi
332
	fi
332
fi
333
fi
333
334
335
334
AC_SUBST(LIBPAM)
336
AC_SUBST(LIBPAM)
335
if test "$with_libpam" != "no"; then
337
if test "$with_libpam" != "no"; then
336
	AC_CHECK_LIB(pam, pam_start,
338
	AC_CHECK_LIB(pam, pam_start,
Lines 339-351 if test "$with_libpam" != "no"; then Link Here
339
		AC_MSG_ERROR(libpam not found)
341
		AC_MSG_ERROR(libpam not found)
340
	fi
342
	fi
341
343
342
	AC_CHECK_LIB(pam_misc, main,
344
	LIBPAM="-lpam"
343
	             [pam_misc_lib="yes"], [pam_misc_lib="no"])
345
	pam_conv_function="no"
344
	if test "$pam_misc_lib$with_libpam" = "noyes" ; then
346
345
		AC_MSG_ERROR(libpam_misc not found)
347
	AC_CHECK_LIB(pam, openpam_ttyconv,
348
		[pam_conv_function="openpam_ttyconv"],
349
		AC_CHECK_LIB(pam_misc, misc_conv,
350
			[pam_conv_function="misc_conv"; LIBPAM="$LIBPAM -lpam_misc"])
351
		)
352
353
	if test "$pam_conv_function$with_libpam" = "noyes" ; then
354
		AC_MSG_ERROR(PAM conversation function not found)
346
	fi
355
	fi
347
356
348
	if test "$pam_lib$pam_misc_lib" = "yesyes" ; then
357
	pam_headers_found=no
358
	AC_CHECK_HEADERS( [security/openpam.h security/pam_misc.h],
359
			 [ pam_headers_found=yes ; break ], [],
360
			 [ #include <security/pam_appl.h> ] )
361
        if test "$pam_headers_found$with_libpam" = "noyes" ; then
362
	                AC_MSG_ERROR(PAM headers not found)
363
        fi
364
365
366
	if test "$pam_lib$pam_headers_found" = "yesyes" -a "$pam_conv_function" != "no" ; then
349
		with_libpam="yes"
367
		with_libpam="yes"
350
	else
368
	else
351
		with_libpam="no"
369
		with_libpam="no"
Lines 353-361 if test "$with_libpam" != "no"; then Link Here
353
fi
371
fi
354
dnl Now with_libpam is either yes or no
372
dnl Now with_libpam is either yes or no
355
if test "$with_libpam" = "yes"; then
373
if test "$with_libpam" = "yes"; then
374
	AC_CHECK_DECLS([PAM_ESTABLISH_CRED,
375
		PAM_DELETE_CRED,
376
		PAM_NEW_AUTHTOK_REQD,
377
		PAM_DATA_SILENT],
378
		[], [], [#include <security/pam_appl.h>])
379
380
381
	save_libs=$LIBS
382
        LIBS="$LIBS $LIBPAM"
383
	AC_CHECK_FUNCS([pam_fail_delay])
384
	LIBS=$save_libs
385
356
	AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules])
386
	AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules])
387
	AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM converstation to use])
357
	AM_CONDITIONAL(USE_PAM, [true])
388
	AM_CONDITIONAL(USE_PAM, [true])
358
	LIBPAM="-lpam -lpam_misc"
389
359
	AC_MSG_CHECKING(use login and su access checking if PAM not used)
390
	AC_MSG_CHECKING(use login and su access checking if PAM not used)
360
	AC_MSG_RESULT(no)
391
	AC_MSG_RESULT(no)
361
else
392
else
(-)shadow-4.1.2.1/lib/pam_defs.h (-6 / +13 lines)
Lines 28-51 Link Here
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
29
 */
30
30
31
#include <config.h>
31
#include <security/pam_appl.h>
32
#include <security/pam_appl.h>
32
#include <security/pam_misc.h>
33
#ifdef HAVE_SECURITY_PAM_MISC_H
34
# include <security/pam_misc.h>
35
#endif
36
#ifdef HAVE_SECURITY_OPENPAM_H
37
# include <security/openpam.h>
38
#endif
39
33
40
34
static struct pam_conv conv = {
41
static struct pam_conv conv = {
35
	misc_conv,
42
	SHADOW_PAM_CONVERSATION,
36
	NULL
43
	NULL
37
};
44
};
38
45
39
/* compatibility with different versions of Linux-PAM */
46
/* compatibility with different versions of Linux-PAM */
40
#ifndef PAM_ESTABLISH_CRED
47
#if !HAVE_DECL_PAM_ESTABLISH_CRED
41
#define PAM_ESTABLISH_CRED PAM_CRED_ESTABLISH
48
#define PAM_ESTABLISH_CRED PAM_CRED_ESTABLISH
42
#endif
49
#endif
43
#ifndef PAM_DELETE_CRED
50
#if !HAVE_DECL_PAM_DELETE_CRED
44
#define PAM_DELETE_CRED PAM_CRED_DELETE
51
#define PAM_DELETE_CRED PAM_CRED_DELETE
45
#endif
52
#endif
46
#ifndef PAM_NEW_AUTHTOK_REQD
53
#if !HAVE_DECL_PAM_NEW_AUTHTOK_REQD
47
#define PAM_NEW_AUTHTOK_REQD PAM_AUTHTOKEN_REQD
54
#define PAM_NEW_AUTHTOK_REQD PAM_AUTHTOKEN_REQD
48
#endif
55
#endif
49
#ifndef PAM_DATA_SILENT
56
#if !HAVE_DECL_PAM_DATA_SILENT
50
#define PAM_DATA_SILENT 0
57
#define PAM_DATA_SILENT 0
51
#endif
58
#endif
(-)shadow-4.1.2.1/src/login.c (-2 / +3 lines)
Lines 644-652 int main (int argc, char **argv) Link Here
644
			  failed = 0;
644
			  failed = 0;
645
645
646
			  failcount++;
646
			  failcount++;
647
			  if (delay > 0)
647
#ifdef HAVE_PAM_FAIL_DELAY
648
			if (delay > 0)
648
			    retcode = pam_fail_delay(pamh, 1000000*delay);
649
			    retcode = pam_fail_delay(pamh, 1000000*delay);
649
650
#endif
650
			  retcode = pam_authenticate (pamh, 0);
651
			  retcode = pam_authenticate (pamh, 0);
651
652
652
			  pam_get_item (pamh, PAM_USER,
653
			  pam_get_item (pamh, PAM_USER,

Return to bug 232586