16923
|
1 |
--- seahorse-2.28.0/pgp/seahorse-ldap-source.c.orig Fri Oct 16 14:25:16 2009
|
|
2 |
+++ seahorse-2.28.0/pgp/seahorse-ldap-source.c Fri Oct 16 14:28:14 2009
|
|
3 |
@@ -647,11 +647,8 @@
|
|
4 |
|
|
5 |
{
|
|
6 |
/* Now that we've resolved our address, connect via IP */
|
|
7 |
- gchar *url;
|
|
8 |
|
|
9 |
- url = g_strdup_printf ("ldap://%s:%u", soup_address_get_physical (lop->addr), port);
|
|
10 |
- ldap_initialize (&(lop->ldap), url);
|
|
11 |
- g_free (url);
|
|
12 |
+ lop->ldap = ldap_init (soup_address_get_physical (lop->addr), port);
|
|
13 |
g_return_if_fail (lop->ldap != NULL);
|
|
14 |
}
|
|
15 |
|
|
16 |
@@ -658,7 +655,7 @@
|
|
17 |
#else /* WITH_SOUP */
|
|
18 |
|
|
19 |
/* No async DNS resolve, let libldap handle resolving synchronously */
|
|
20 |
- ldap_initialize (&(lop->ldap), server);
|
|
21 |
+ lop->ldap = ldap_init (server, port);
|
|
22 |
g_return_if_fail (lop->ldap != NULL);
|
|
23 |
|
|
24 |
#endif /* WITH_SOUP */
|
|
25 |
@@ -1465,7 +1462,7 @@
|
|
26 |
g_return_val_if_fail (uri && *uri, FALSE);
|
|
27 |
|
|
28 |
r = ldap_url_parse (uri, &url);
|
|
29 |
- if (r == LDAP_URL_SUCCESS) {
|
|
30 |
+ if (r == LDAP_SUCCESS) {
|
|
31 |
|
|
32 |
/* Some checks to make sure it's a simple URI */
|
|
33 |
if (!(url->lud_host && url->lud_host[0]) ||
|
|
34 |
@@ -1476,7 +1473,7 @@
|
|
35 |
ldap_free_urldesc (url);
|
|
36 |
}
|
|
37 |
|
|
38 |
- return r == LDAP_URL_SUCCESS;
|
|
39 |
+ return r == LDAP_SUCCESS;
|
|
40 |
}
|
|
41 |
|
|
42 |
#endif /* WITH_LDAP */
|
|
43 |
--- seahorse-2.28.1/pgp/seahorse-ldap-source.c.orig 2009-10-19 14:52:17.965690000 +0800
|
|
44 |
+++ seahorse-2.28.1/pgp/seahorse-ldap-source.c 2009-10-19 14:59:23.734805000 +0800
|
|
45 |
@@ -1460,8 +1460,11 @@
|
|
46 |
int r;
|
|
47 |
|
|
48 |
g_return_val_if_fail (uri && *uri, FALSE);
|
|
49 |
-
|
|
50 |
- r = ldap_url_parse (uri, &url);
|
|
51 |
+
|
|
52 |
+ if (strchr (uri, '\/') != strrchr (uri, '\/'))
|
|
53 |
+ r = ldap_url_parse_nodn (uri, &url);
|
|
54 |
+ else
|
|
55 |
+ r = ldap_url_parse (uri, &url);
|
|
56 |
if (r == LDAP_SUCCESS) {
|
|
57 |
|
|
58 |
/* Some checks to make sure it's a simple URI */
|