fixes compile for ldap module in php5
[packages.git] / libs / libpam / patches / 01-no_nis.patch
1 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
2 --- Linux-PAM-0.99.6.3/modules/pam_access/pam_access.c  2006-08-31 12:20:37.000000000 +0200
3 +++ Linux-PAM-0.99.6.3.new/modules/pam_access/pam_access.c      2007-01-10 22:36:57.000000000 +0100
4 @@ -41,7 +41,9 @@
5  #include <errno.h>
6  #include <ctype.h>
7  #include <sys/utsname.h>
8 +#ifdef USE_NIS
9  #include <rpcsvc/ypclnt.h>
10 +#endif
11  #include <arpa/inet.h>
12  #include <netdb.h>
13  #include <sys/socket.h>
14 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
15 --- Linux-PAM-0.99.6.3/modules/pam_unix/pam_unix_passwd.c       2006-06-27 10:38:14.000000000 +0200
16 +++ Linux-PAM-0.99.6.3.new/modules/pam_unix/pam_unix_passwd.c   2007-01-10 23:06:20.000000000 +0100
17 @@ -54,8 +54,10 @@
18  #include <sys/time.h>
19  #include <sys/stat.h>
20  #include <rpc/rpc.h>
21 +#ifdef USE_NIS
22  #include <rpcsvc/yp_prot.h>
23  #include <rpcsvc/ypclnt.h>
24 +#endif
25  
26  #include <signal.h>
27  #include <errno.h>
28 @@ -187,6 +189,7 @@
29  
30  static char *getNISserver(pam_handle_t *pamh)
31  {
32 +#ifdef USE_NIS
33         char *master;
34         char *domainname;
35         int port, err;
36 @@ -213,6 +216,9 @@
37                 return NULL;
38         }
39         return master;
40 +#else
41 +       return NULL;
42 +#endif
43  }
44  
45  #ifdef WITH_SELINUX
46 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
47 --- Linux-PAM-0.99.6.3/modules/pam_unix/support.c       2006-06-27 10:38:14.000000000 +0200
48 +++ Linux-PAM-0.99.6.3.new/modules/pam_unix/support.c   2007-01-10 23:10:16.000000000 +0100
49 @@ -19,7 +19,9 @@
50  #include <ctype.h>
51  #include <syslog.h>
52  #include <sys/resource.h>
53 +#ifdef USE_NIS
54  #include <rpcsvc/ypclnt.h>
55 +#endif
56  
57  #include <security/_pam_macros.h>
58  #include <security/pam_modules.h>
59 @@ -253,7 +255,7 @@
60                         fclose(passwd);
61                 }
62         }
63 -
64 +#ifdef USE_NIS
65         if (!matched && nis) {
66                 char *userinfo = NULL, *domain = NULL;
67                 int len = 0, i;
68 @@ -272,6 +274,7 @@
69                         }
70                 }
71         }
72 +#endif
73  
74         if (matched && (ret != NULL)) {
75                 *ret = NULL;
76 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
77 --- Linux-PAM-0.99.6.3/modules/pam_unix/yppasswd_xdr.c  2005-07-20 11:46:19.000000000 +0200
78 +++ Linux-PAM-0.99.6.3.new/modules/pam_unix/yppasswd_xdr.c      2007-01-10 23:12:04.000000000 +0100
79 @@ -13,8 +13,10 @@
80  #include "config.h"
81  
82  #include <rpc/rpc.h>
83 +#ifdef USE_NIS
84  #include <rpcsvc/yp_prot.h>
85  #include <rpcsvc/ypclnt.h>
86 +#endif
87  #include "yppasswd.h"
88  
89  bool_t