Add libpam
authorFlorian Fainelli <florian@openwrt.org>
Wed, 10 Jan 2007 22:42:31 +0000 (22:42 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 10 Jan 2007 22:42:31 +0000 (22:42 +0000)
SVN-Revision: 6072

libs/libpam/Makefile [new file with mode: 0644]
libs/libpam/patches/01-no_nis.patch [new file with mode: 0644]
libs/libpam/patches/02-no_yywrap.patch [new file with mode: 0644]
libs/libpam/patches/03-no_doc.patch [new file with mode: 0644]

diff --git a/libs/libpam/Makefile b/libs/libpam/Makefile
new file mode 100644 (file)
index 0000000..8978e2c
--- /dev/null
@@ -0,0 +1,76 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpam
+PKG_VERSION:=0.99.6.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/libs/pam/pre/library/
+PKG_MD5SUM:=0f17f7105faa82a51dfbeb6b08a1ca29
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Linux-PAM-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpam
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Linux-PAM is a free implementation of the following DCE-RFC from Sunsoft.
+  DESCRIPTION:=\
+       Linux-PAM is a free implementation of the following DCE-RFC from Sunsoft. \\\
+  URL:=http://www.kernel.org/pub/linux/libs/pam
+endef
+
+define Build/Configure
+       $(call Build/Configure/Default, \
+               --enable-shared \
+               --enable-static \
+               --enable-pamlocking \
+               --disable-prelude \
+               --disable-lckpwdf \
+               --disable-selinux \
+               --disable-nls \
+               --disable-rpath \
+       )
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+define Build/InstallDev
+       mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib
+       mkdir -p $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/lib/* $(STAGING_DIR)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include
+endef
+
+define Build/UninstallDev
+       rm -rf \
+               $(STAGING_DIR)/usr/include/security \
+               $(STAGING_DIR)/lib/libpam.* \
+               $(STAGING_DIR)/lib/security 
+endef
+
+define Package/libpam/install
+       $(INSTALL_DIR) $(1)/lib
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(CP) $(PKG_INSTALL_DIR)/* $(1)/lib/
+       $(CP) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,libpam))
diff --git a/libs/libpam/patches/01-no_nis.patch b/libs/libpam/patches/01-no_nis.patch
new file mode 100644 (file)
index 0000000..5caebac
--- /dev/null
@@ -0,0 +1,89 @@
+diff -urN Linux-PAM-0.99.6.3/modules/pam_access/pam_access.c Linux-PAM-0.99.6.3.new/modules/pam_access/pam_access.c
+--- Linux-PAM-0.99.6.3/modules/pam_access/pam_access.c 2006-08-31 12:20:37.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/modules/pam_access/pam_access.c     2007-01-10 22:36:57.000000000 +0100
+@@ -41,7 +41,9 @@
+ #include <errno.h>
+ #include <ctype.h>
+ #include <sys/utsname.h>
++#ifdef USE_NIS
+ #include <rpcsvc/ypclnt.h>
++#endif
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <sys/socket.h>
+diff -urN Linux-PAM-0.99.6.3/modules/pam_unix/pam_unix_passwd.c Linux-PAM-0.99.6.3.new/modules/pam_unix/pam_unix_passwd.c
+--- Linux-PAM-0.99.6.3/modules/pam_unix/pam_unix_passwd.c      2006-06-27 10:38:14.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/modules/pam_unix/pam_unix_passwd.c  2007-01-10 23:06:20.000000000 +0100
+@@ -54,8 +54,10 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <rpc/rpc.h>
++#ifdef USE_NIS
+ #include <rpcsvc/yp_prot.h>
+ #include <rpcsvc/ypclnt.h>
++#endif
+ #include <signal.h>
+ #include <errno.h>
+@@ -187,6 +189,7 @@
+ static char *getNISserver(pam_handle_t *pamh)
+ {
++#ifdef USE_NIS
+       char *master;
+       char *domainname;
+       int port, err;
+@@ -213,6 +216,9 @@
+               return NULL;
+       }
+       return master;
++#else
++      return NULL;
++#endif
+ }
+ #ifdef WITH_SELINUX
+diff -urN Linux-PAM-0.99.6.3/modules/pam_unix/support.c Linux-PAM-0.99.6.3.new/modules/pam_unix/support.c
+--- Linux-PAM-0.99.6.3/modules/pam_unix/support.c      2006-06-27 10:38:14.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/modules/pam_unix/support.c  2007-01-10 23:10:16.000000000 +0100
+@@ -19,7 +19,9 @@
+ #include <ctype.h>
+ #include <syslog.h>
+ #include <sys/resource.h>
++#ifdef USE_NIS
+ #include <rpcsvc/ypclnt.h>
++#endif
+ #include <security/_pam_macros.h>
+ #include <security/pam_modules.h>
+@@ -253,7 +255,7 @@
+                       fclose(passwd);
+               }
+       }
+-
++#ifdef USE_NIS
+       if (!matched && nis) {
+               char *userinfo = NULL, *domain = NULL;
+               int len = 0, i;
+@@ -272,6 +274,7 @@
+                       }
+               }
+       }
++#endif
+       if (matched && (ret != NULL)) {
+               *ret = NULL;
+diff -urN Linux-PAM-0.99.6.3/modules/pam_unix/yppasswd_xdr.c Linux-PAM-0.99.6.3.new/modules/pam_unix/yppasswd_xdr.c
+--- Linux-PAM-0.99.6.3/modules/pam_unix/yppasswd_xdr.c 2005-07-20 11:46:19.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/modules/pam_unix/yppasswd_xdr.c     2007-01-10 23:12:04.000000000 +0100
+@@ -13,8 +13,10 @@
+ #include "config.h"
+ #include <rpc/rpc.h>
++#ifdef USE_NIS
+ #include <rpcsvc/yp_prot.h>
+ #include <rpcsvc/ypclnt.h>
++#endif
+ #include "yppasswd.h"
+ bool_t
diff --git a/libs/libpam/patches/02-no_yywrap.patch b/libs/libpam/patches/02-no_yywrap.patch
new file mode 100644 (file)
index 0000000..62a4851
--- /dev/null
@@ -0,0 +1,28 @@
+diff -urN Linux-PAM-0.99.6.3/conf/pam_conv1/pam_conv_l.c Linux-PAM-0.99.6.3.new/conf/pam_conv1/pam_conv_l.c
+--- Linux-PAM-0.99.6.3/conf/pam_conv1/pam_conv_l.c     2006-09-06 11:29:19.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/conf/pam_conv1/pam_conv_l.c 2007-01-10 23:19:05.000000000 +0100
+@@ -494,7 +494,9 @@
+ #ifdef __cplusplus
+ extern "C" int yywrap (void );
+ #else
+-extern int yywrap (void );
++int yywrap (void ) {
++      return 1;
++}
+ #endif
+ #endif
+diff -urN Linux-PAM-0.99.6.3/doc/specs/parse_l.c Linux-PAM-0.99.6.3.new/doc/specs/parse_l.c
+--- Linux-PAM-0.99.6.3/doc/specs/parse_l.c     2006-09-06 11:29:19.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/doc/specs/parse_l.c 2007-01-10 23:21:55.000000000 +0100
+@@ -480,7 +480,9 @@
+ #ifdef __cplusplus
+ extern "C" int yywrap (void );
+ #else
+-extern int yywrap (void );
++int yywrap (void ) {
++      return 1;
++}
+ #endif
+ #endif
diff --git a/libs/libpam/patches/03-no_doc.patch b/libs/libpam/patches/03-no_doc.patch
new file mode 100644 (file)
index 0000000..df2cc30
--- /dev/null
@@ -0,0 +1,36 @@
+--- Linux-PAM-0.99.6.3/Makefile.am     2006-08-05 11:06:20.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/Makefile.am 2007-01-10 23:24:06.000000000 +0100
+@@ -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 = *~
+--- Linux-PAM-0.99.6.3/Makefile.in     2006-09-06 13:31:39.000000000 +0200
++++ Linux-PAM-0.99.6.3.new/Makefile.in 2007-01-10 23:24:20.000000000 +0100
+@@ -72,7 +72,7 @@
+       uninstall-recursive
+ ETAGS = etags
+ CTAGS = ctags
+-DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc \
++DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf \
+       examples xtests
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ distdir = $(PACKAGE)-$(VERSION)
+@@ -257,8 +257,8 @@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
+-@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
+-@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf doc examples xtests
++@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
++@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf examples xtests
+ CLEANFILES = *~
+ M4_FILES = $(shell ls $(srcdir)/m4/*.m4)
+ EXTRA_DIST = config.rpath mkinstalldirs pgp.keys.asc CHANGELOG \