1 |
robbat2 09/07/28 21:28:25 |
2 |
|
3 |
Modified: openldap-2.4.17-contrib-smbk5pwd.patch slapd-initd |
4 |
Added: openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch |
5 |
Log: |
6 |
Bug #219371: Install C++ libraries and headers as needed. Bug #233633: Fix compile with USE="samba gnutls". Bug #273699: Fix slapd init ordering. Bug #261186: Build plugins with libtool instead of directly. Bug #279461: Update smbk5pwd building. |
7 |
(Portage version: 2.2_rc33/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: openldap-2.4.17-contrib-smbk5pwd.patch |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-nds/openldap/files/openldap-2.4.17-contrib-smbk5pwd.patch,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -p -w -b -B -u -u -r1.1 -r1.2 |
22 |
--- openldap-2.4.17-contrib-smbk5pwd.patch 28 Jul 2009 02:11:25 -0000 1.1 |
23 |
+++ openldap-2.4.17-contrib-smbk5pwd.patch 28 Jul 2009 21:28:25 -0000 1.2 |
24 |
@@ -6,7 +6,7 @@ diff -Nuar --exclude 'openldap-2.4*' --e |
25 |
# <http://www.OpenLDAP.org/license.html>. |
26 |
|
27 |
+#libexecdir=/usr/lib/openldap |
28 |
-+moduledir=$(libexecdir)/openldap |
29 |
++moduledir=$(libexecdir) |
30 |
LIBTOOL=../../../libtool |
31 |
-OPT=-g -O2 |
32 |
+#OPT= |
33 |
@@ -56,6 +56,6 @@ diff -Nuar --exclude 'openldap-2.4*' --e |
34 |
- mkdir -p $(PREFIX)/lib/openldap |
35 |
- $(LIBTOOL) --mode=install cp smbk5pwd.la $(PREFIX)/lib/openldap |
36 |
- $(LIBTOOL) --finish $(PREFIX)/lib |
37 |
-+ mkdir -p $(moduledir) |
38 |
-+ $(LIBTOOL) --mode=install cp smbk5pwd.la $(moduledir) |
39 |
-+ $(LIBTOOL) --finish $(libexecdir) |
40 |
++ mkdir -p $(DESTDIR)$(moduledir) |
41 |
++ $(LIBTOOL) --mode=install cp smbk5pwd.la $(DESTDIR)$(moduledir) |
42 |
++ $(LIBTOOL) --finish $(DESTDIR)$(libexecdir) |
43 |
|
44 |
|
45 |
|
46 |
1.3 net-nds/openldap/files/slapd-initd |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/slapd-initd?rev=1.3&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/slapd-initd?rev=1.3&content-type=text/plain |
50 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/slapd-initd?r1=1.2&r2=1.3 |
51 |
|
52 |
Index: slapd-initd |
53 |
=================================================================== |
54 |
RCS file: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v |
55 |
retrieving revision 1.2 |
56 |
retrieving revision 1.3 |
57 |
diff -p -w -b -B -u -u -r1.2 -r1.3 |
58 |
--- slapd-initd 14 Oct 2008 10:29:44 -0000 1.2 |
59 |
+++ slapd-initd 28 Jul 2009 21:28:25 -0000 1.3 |
60 |
@@ -1,10 +1,11 @@ |
61 |
#!/sbin/runscript |
62 |
# Copyright 1999-2004 Gentoo Foundation |
63 |
# Distributed under the terms of the GNU General Public License v2 |
64 |
-# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v 1.2 2008/10/14 10:29:44 robbat2 Exp $ |
65 |
+# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v 1.3 2009/07/28 21:28:25 robbat2 Exp $ |
66 |
|
67 |
depend() { |
68 |
need net |
69 |
+ before dbus hald avahi-daemon |
70 |
} |
71 |
|
72 |
start() { |
73 |
|
74 |
|
75 |
|
76 |
1.1 net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch |
77 |
|
78 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch?rev=1.1&view=markup |
79 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch?rev=1.1&content-type=text/plain |
80 |
|
81 |
Index: openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch |
82 |
=================================================================== |
83 |
If GnuTLS is used, the lmpasswd module for USE=samba does not compile. |
84 |
Forward-port an old Debian patch that upstream never applied. |
85 |
|
86 |
Signed-off-by: Robin H. Johnson <robbat2@g.o> |
87 |
Signed-off-by: Steffen Hau <steffen@×××××××.de> |
88 |
X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=233633 |
89 |
X-Upstream-Bug: http://www.openldap.org/its/index.cgi/Software%20Enhancements?id=4997 |
90 |
X-Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245341 |
91 |
|
92 |
--- openldap-2.4.17.orig/libraries/liblutil/passwd.c 2009-07-27 18:59:19.635995474 -0700 |
93 |
+++ openldap-2.4.17/libraries/liblutil/passwd.c 2009-07-27 19:01:13.588069010 -0700 |
94 |
@@ -51,6 +51,26 @@ typedef unsigned char des_data_block[8]; |
95 |
typedef PK11Context *des_context[1]; |
96 |
#define DES_ENCRYPT CKA_ENCRYPT |
97 |
|
98 |
+#elif defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) |
99 |
+# include <gcrypt.h> |
100 |
+static int gcrypt_init = 0; |
101 |
+ |
102 |
+typedef const void* des_key; |
103 |
+typedef unsigned char des_cblock[8]; |
104 |
+typedef des_cblock des_data_block; |
105 |
+typedef int des_key_schedule; /* unused */ |
106 |
+typedef des_key_schedule des_context; /* unused */ |
107 |
+#define des_failed(encrypted) 0 |
108 |
+#define des_finish(key, schedule) |
109 |
+ |
110 |
+#define des_set_key_unchecked( key, key_sched ) \ |
111 |
+ gcry_cipher_setkey( hd, key, 8 ) |
112 |
+ |
113 |
+#define des_ecb_encrypt( input, output, key_sched, enc ) \ |
114 |
+ gcry_cipher_encrypt( hd, *output, 8, *input, 8 ) |
115 |
+ |
116 |
+#define des_set_odd_parity( key ) do {} while(0) |
117 |
+ |
118 |
#endif |
119 |
|
120 |
#endif /* SLAPD_LMHASH */ |
121 |
@@ -651,7 +671,7 @@ static int chk_md5( |
122 |
|
123 |
#ifdef SLAPD_LMHASH |
124 |
|
125 |
-#if defined(HAVE_OPENSSL) |
126 |
+#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS_GNUTLS_H) |
127 |
|
128 |
/* |
129 |
* abstract away setting the parity. |
130 |
@@ -841,6 +861,19 @@ static int chk_lanman( |
131 |
des_data_block StdText = "KGS!@#$%"; |
132 |
des_data_block PasswordHash1, PasswordHash2; |
133 |
char PasswordHash[33], storedPasswordHash[33]; |
134 |
+ |
135 |
+#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) |
136 |
+ gcry_cipher_hd_t hd; |
137 |
+ |
138 |
+ if ( !gcrypt_init ) { |
139 |
+ gcry_check_version( GCRYPT_VERSION ); |
140 |
+ gcrypt_init = 1; |
141 |
+ } |
142 |
+ |
143 |
+ schedule = schedule; /* unused - avoid warning */ |
144 |
+ |
145 |
+ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 ); |
146 |
+#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ |
147 |
|
148 |
for( i=0; i<cred->bv_len; i++) { |
149 |
if(cred->bv_val[i] == '\0') { |
150 |
@@ -883,6 +916,10 @@ static int chk_lanman( |
151 |
strncpy( storedPasswordHash, passwd->bv_val, 32 ); |
152 |
storedPasswordHash[32] = '\0'; |
153 |
ldap_pvt_str2lower( storedPasswordHash ); |
154 |
+ |
155 |
+#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) |
156 |
+ gcry_cipher_close( hd ); |
157 |
+#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ |
158 |
|
159 |
return memcmp( PasswordHash, storedPasswordHash, 32) ? LUTIL_PASSWD_ERR : LUTIL_PASSWD_OK; |
160 |
} |
161 |
@@ -1138,6 +1175,19 @@ static int hash_lanman( |
162 |
des_data_block PasswordHash1, PasswordHash2; |
163 |
char PasswordHash[33]; |
164 |
|
165 |
+#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) |
166 |
+ gcry_cipher_hd_t hd; |
167 |
+ |
168 |
+ if ( !gcrypt_init ) { |
169 |
+ gcry_check_version( GCRYPT_VERSION ); |
170 |
+ gcrypt_init = 1; |
171 |
+ } |
172 |
+ |
173 |
+ schedule = schedule; /* unused - avoid warning */ |
174 |
+ |
175 |
+ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 ); |
176 |
+#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ |
177 |
+ |
178 |
for( i=0; i<passwd->bv_len; i++) { |
179 |
if(passwd->bv_val[i] == '\0') { |
180 |
return LUTIL_PASSWD_ERR; /* NUL character in password */ |
181 |
@@ -1168,6 +1218,10 @@ static int hash_lanman( |
182 |
|
183 |
hash->bv_val = PasswordHash; |
184 |
hash->bv_len = 32; |
185 |
+ |
186 |
+#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT) |
187 |
+ gcry_cipher_close( hd ); |
188 |
+#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */ |
189 |
|
190 |
return pw_string( scheme, hash ); |
191 |
} |