add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / libs / libpam / patches / 001-no_nis.patch
1 --- a/modules/pam_access/pam_access.c
2 +++ b/modules/pam_access/pam_access.c
3 @@ -44,7 +44,7 @@
4  #include <arpa/inet.h>
5  #include <netdb.h>
6  #include <sys/socket.h>
7 -#ifdef HAVE_RPCSVC_YPCLNT_H
8 +#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
9  #include <rpcsvc/ypclnt.h>
10  #endif
11  #ifdef HAVE_LIBAUDIT
12 --- a/modules/pam_unix/pam_unix_passwd.c
13 +++ b/modules/pam_unix/pam_unix_passwd.c
14 @@ -55,10 +55,10 @@
15  #include <sys/time.h>
16  #include <sys/stat.h>
17  #include <rpc/rpc.h>
18 -#ifdef HAVE_RPCSVC_YP_PROT_H
19 +#ifdef HAVE_RPCSVC_YP_PROT_H && USE_NIS
20  #include <rpcsvc/yp_prot.h>
21  #endif
22 -#ifdef HAVE_RPCSVC_YPCLNT_H
23 +#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
24  #include <rpcsvc/ypclnt.h>
25  #endif
26  
27 @@ -104,7 +104,7 @@ extern int getrpcport(const char *host,
28  
29  static char *getNISserver(pam_handle_t *pamh, unsigned int ctrl)
30  {
31 -#if (defined(HAVE_YP_GET_DEFAULT_DOMAIN) || defined(HAVE_GETDOMAINNAME)) && defined(HAVE_YP_MASTER)
32 +#if (defined(HAVE_YP_GET_DEFAULT_DOMAIN) || defined(HAVE_GETDOMAINNAME)) && defined(HAVE_YP_MASTER) && defined(USE_NIS)
33         char *master;
34         char *domainname;
35         int port, err;
36 --- a/modules/pam_unix/support.c
37 +++ b/modules/pam_unix/support.c
38 @@ -19,7 +19,7 @@
39  #include <ctype.h>
40  #include <syslog.h>
41  #include <sys/resource.h>
42 -#ifdef HAVE_RPCSVC_YPCLNT_H
43 +#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
44  #include <rpcsvc/ypclnt.h>
45  #endif
46  
47 @@ -285,7 +285,7 @@ int _unix_getpwnam(pam_handle_t *pamh, c
48                 }
49         }
50  
51 -#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND)
52 +#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND) && (USE_NIS)
53         if (!matched && nis) {
54                 char *userinfo = NULL, *domain = NULL;
55                 int len = 0, i;
56 --- a/modules/pam_unix/yppasswd_xdr.c
57 +++ b/modules/pam_unix/yppasswd_xdr.c
58 @@ -13,6 +13,10 @@
59  #include "config.h"
60  
61  #include <rpc/rpc.h>
62 +#ifdef USE_NIS
63 +#include <rpcsvc/yp_prot.h>
64 +#include <rpcsvc/ypclnt.h>
65 +#endif
66  #include "yppasswd.h"
67  
68  bool_t