packages/libs/libpam/patches/001-no_nis.patch
acoul 3fd525b482 libs/libpam: update libpam to version 1.1.2, refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/packages@22961 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-06 20:25:42 +00:00

69 lines
2.0 KiB
Diff

--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -44,7 +44,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
-#ifdef HAVE_RPCSVC_YPCLNT_H
+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
#include <rpcsvc/ypclnt.h>
#endif
#ifdef HAVE_LIBAUDIT
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -55,10 +55,10 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <rpc/rpc.h>
-#ifdef HAVE_RPCSVC_YP_PROT_H
+#ifdef HAVE_RPCSVC_YP_PROT_H && USE_NIS
#include <rpcsvc/yp_prot.h>
#endif
-#ifdef HAVE_RPCSVC_YPCLNT_H
+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
#include <rpcsvc/ypclnt.h>
#endif
@@ -104,7 +104,7 @@ extern int getrpcport(const char *host,
static char *getNISserver(pam_handle_t *pamh, unsigned int ctrl)
{
-#if (defined(HAVE_YP_GET_DEFAULT_DOMAIN) || defined(HAVE_GETDOMAINNAME)) && defined(HAVE_YP_MASTER)
+#if (defined(HAVE_YP_GET_DEFAULT_DOMAIN) || defined(HAVE_GETDOMAINNAME)) && defined(HAVE_YP_MASTER) && defined(USE_NIS)
char *master;
char *domainname;
int port, err;
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
@@ -19,7 +19,7 @@
#include <ctype.h>
#include <syslog.h>
#include <sys/resource.h>
-#ifdef HAVE_RPCSVC_YPCLNT_H
+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
#include <rpcsvc/ypclnt.h>
#endif
@@ -285,7 +285,7 @@ int _unix_getpwnam(pam_handle_t *pamh, c
}
}
-#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND)
+#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND) && (USE_NIS)
if (!matched && nis) {
char *userinfo = NULL, *domain = NULL;
int len = 0, i;
--- a/modules/pam_unix/yppasswd_xdr.c
+++ b/modules/pam_unix/yppasswd_xdr.c
@@ -13,6 +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