summaryrefslogtreecommitdiffstats
path: root/recipes/pam/libpam-1.1.1
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-06-08 17:02:00 -0700
committerKhem Raj <raj.khem@gmail.com>2010-06-08 17:05:08 -0700
commit0298bf1934f6c7d267c6ceaa87b6993489310702 (patch)
treee00daa30a94a944a599655fdd6b5eecd85a1ec6a /recipes/pam/libpam-1.1.1
parent0abf974adf800b52e22d015a42baf3babcb51e43 (diff)
downloadopenembedded-0298bf1934f6c7d267c6ceaa87b6993489310702.tar.gz
libpam-1.1.1: Add recipe.
* Tested build on arm*uclibc Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/pam/libpam-1.1.1')
-rw-r--r--recipes/pam/libpam-1.1.1/Linux-PAM-1.1.0-uclibc.patch82
-rw-r--r--recipes/pam/libpam-1.1.1/define-HAVE_DBM.patch12
-rw-r--r--recipes/pam/libpam-1.1.1/disable_modules_uclibc.patch16
-rw-r--r--recipes/pam/libpam-1.1.1/pam-nodocs.patch35
4 files changed, 145 insertions, 0 deletions
diff --git a/recipes/pam/libpam-1.1.1/Linux-PAM-1.1.0-uclibc.patch b/recipes/pam/libpam-1.1.1/Linux-PAM-1.1.0-uclibc.patch
new file mode 100644
index 0000000000..6b8fa25f8f
--- /dev/null
+++ b/recipes/pam/libpam-1.1.1/Linux-PAM-1.1.0-uclibc.patch
@@ -0,0 +1,82 @@
+Index: Linux-PAM-1.1.0/modules/pam_pwhistory/opasswd.c
+===================================================================
+--- Linux-PAM-1.1.0.orig/modules/pam_pwhistory/opasswd.c
++++ Linux-PAM-1.1.0/modules/pam_pwhistory/opasswd.c
+@@ -94,6 +94,23 @@ parse_entry (char *line, opwd *data)
+ return 0;
+ }
+
++static int
++compare_password(const char *newpass, const char *oldpass)
++{
++ char *outval;
++#ifdef HAVE_CRYPT_R
++ struct crypt_data output;
++
++ output.initialized = 0;
++
++ outval = crypt_r (newpass, oldpass, &output);
++#else
++ outval = crypt (newpass, oldpass);
++#endif
++
++ return strcmp(outval, oldpass) == 0;
++}
++
+ /* Check, if the new password is already in the opasswd file. */
+ int
+ check_old_password (pam_handle_t *pamh, const char *user,
+@@ -167,12 +184,9 @@ check_old_password (pam_handle_t *pamh,
+ if (found)
+ {
+ const char delimiters[] = ",";
+- struct crypt_data output;
+ char *running;
+ char *oldpass;
+
+- memset (&output, 0, sizeof (output));
+-
+ running = strdupa (entry.old_passwords);
+ if (running == NULL)
+ return PAM_BUF_ERR;
+@@ -180,7 +194,7 @@ check_old_password (pam_handle_t *pamh,
+ do {
+ oldpass = strsep (&running, delimiters);
+ if (oldpass && strlen (oldpass) > 0 &&
+- strcmp (crypt_r (newpass, oldpass, &output), oldpass) == 0)
++ compare_password(newpass, oldpass) )
+ {
+ if (debug)
+ pam_syslog (pamh, LOG_DEBUG, "New password already used");
+Index: Linux-PAM-1.1.0/configure.in
+===================================================================
+--- Linux-PAM-1.1.0.orig/configure.in
++++ Linux-PAM-1.1.0/configure.in
+@@ -458,7 +458,7 @@ AC_FUNC_MEMCMP
+ AC_FUNC_VPRINTF
+ AC_CHECK_FUNCS(fseeko gethostname gettimeofday lckpwdf mkdir select)
+ AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname)
+-AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
++AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
+ AC_CHECK_FUNCS(getgrouplist getline getdelim)
+ AC_CHECK_FUNCS(inet_ntop inet_pton ruserok_af)
+
+Index: Linux-PAM-1.1.0/modules/pam_timestamp/pam_timestamp.c
+===================================================================
+--- Linux-PAM-1.1.0.orig/modules/pam_timestamp/pam_timestamp.c
++++ Linux-PAM-1.1.0/modules/pam_timestamp/pam_timestamp.c
+@@ -200,7 +200,13 @@ check_login_time(const char *ruser, time
+ time_t oldest_login = 0;
+
+ setutent();
+- while(!getutent_r(&utbuf, &ut)) {
++ while(
++#ifdef HAVE_GETUTENT_R
++ !getutent_r(&utbuf, &ut)
++#else
++ (ut = getutent()) != NULL
++#endif
++ ) {
+ if (ut->ut_type != USER_PROCESS) {
+ continue;
+ }
diff --git a/recipes/pam/libpam-1.1.1/define-HAVE_DBM.patch b/recipes/pam/libpam-1.1.1/define-HAVE_DBM.patch
new file mode 100644
index 0000000000..eceb67dc3b
--- /dev/null
+++ b/recipes/pam/libpam-1.1.1/define-HAVE_DBM.patch
@@ -0,0 +1,12 @@
+Index: Linux-PAM-1.1.0/modules/pam_userdb/pam_userdb.c
+===================================================================
+--- Linux-PAM-1.1.0.orig/modules/pam_userdb/pam_userdb.c 2010-06-08 14:19:25.147555285 -0700
++++ Linux-PAM-1.1.0/modules/pam_userdb/pam_userdb.c 2010-06-08 14:20:50.707692049 -0700
+@@ -30,6 +30,7 @@
+ #else
+ # ifdef HAVE_DB_H
+ # define DB_DBM_HSEARCH 1 /* use the dbm interface */
++# define HAVE_DBM /* for BerkDB 5.0 and later */
+ # include <db.h>
+ # else
+ # error "failed to find a libdb or equivalent"
diff --git a/recipes/pam/libpam-1.1.1/disable_modules_uclibc.patch b/recipes/pam/libpam-1.1.1/disable_modules_uclibc.patch
new file mode 100644
index 0000000000..14cc60aacd
--- /dev/null
+++ b/recipes/pam/libpam-1.1.1/disable_modules_uclibc.patch
@@ -0,0 +1,16 @@
+Index: Linux-PAM-1.1.0/modules/Makefile.am
+===================================================================
+--- Linux-PAM-1.1.0.orig/modules/Makefile.am 2008-11-28 15:29:12.000000000 +0100
++++ Linux-PAM-1.1.0/modules/Makefile.am 2009-11-24 22:28:13.248314306 +0100
+@@ -7,9 +7,9 @@
+ pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
+ pam_listfile pam_localuser pam_loginuid pam_mail \
+ pam_mkhomedir pam_motd pam_namespace pam_nologin \
+- pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \
++ pam_permit pam_rhosts pam_rootok pam_securetty \
+ pam_selinux pam_sepermit pam_shells pam_stress \
+- pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
++ pam_succeed_if pam_tally pam_tally2 pam_time \
+ pam_tty_audit pam_umask \
+ pam_unix pam_userdb pam_warn pam_wheel pam_xauth
+
diff --git a/recipes/pam/libpam-1.1.1/pam-nodocs.patch b/recipes/pam/libpam-1.1.1/pam-nodocs.patch
new file mode 100644
index 0000000000..895f0e182a
--- /dev/null
+++ b/recipes/pam/libpam-1.1.1/pam-nodocs.patch
@@ -0,0 +1,35 @@
+--- /tmp/Makefile.am 2008-09-05 15:16:21.000000000 +0200
++++ Linux-PAM-1.0.2/Makefile.am 2008-09-05 15:16:56.153198000 +0200
+@@ -5,9 +5,9 @@
+ AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
+
+ if STATIC_MODULES
+-SUBDIRS = modules libpam libpamc libpam_misc tests po conf doc examples xtests
++SUBDIRS = modules libpam libpamc libpam_misc tests po conf examples xtests
+ else
+-SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
++SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
+ endif
+
+ CLEANFILES = *~
+@@ -28,19 +28,7 @@
+
+ ACLOCAL_AMFLAGS = -I m4
+
+-release: dist releasedocs
+-
+-release-docs: releasedocs
+-
+-releasedocs:
+- rm -rf Linux-PAM-$(VERSION)
+- mkdir -p Linux-PAM-$(VERSION)/doc
+- make -C doc releasedocs
+- tar zfc Linux-PAM-$(VERSION)-docs.tar.gz \
+- Linux-PAM-$(VERSION)/doc
+- tar jfc Linux-PAM-$(VERSION)-docs.tar.bz2 \
+- Linux-PAM-$(VERSION)/doc
+- rm -rf Linux-PAM-$(VERSION)
++release: dist
+
+ xtests:
+ make -C xtests xtests