Skip to content

Commit 397162a

Browse files
authored
Remove library version from libldap and liblber (#149)
* Remove library version from libldap and liblber * Add notes about OpenLDAP library finding on Linux
1 parent a126279 commit 397162a

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

LdapForNet/Native/NativeMethodsLinux.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ namespace LdapForNet.Native
66
{
77
internal static class NativeMethodsLinux
88
{
9-
private const string LIB_LDAP_PATH = "ldap-2.4.so.2";
10-
private const string LIB_LBER_PATH = "lber-2.4.so.2";
9+
private const string LIB_LDAP_PATH = "ldap.so.2";
10+
private const string LIB_LBER_PATH = "lber.so.2";
1111
private const string LIB_GNUTLS = "libgnutls.so.30";
1212

1313
internal delegate int LDAP_SASL_INTERACT_PROC(IntPtr ld, uint flags, IntPtr defaults, IntPtr interact);

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Help support the project:
1414

1515
For Linux\OSX you must ensure you have the latest OpenLDAP client libraries installed from http://www.openldap.org
1616

17-
17+
For Linux you must also ensure that the appropriate [symlinks for `libldap.so.2` and `liblber.so.2`](linux.md) exist.
18+
1819
It works with any LDAP protocol compatible directory server (including Microsoft Active Directory).
1920

2021
Supported paswordless authentication (Kerberos) on all platforms (on Linux\OSX supported SASL GSSAPI (Kerberos) authentication!).

linux.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Linux: Symlinks for `libldap.so.2` and `liblber.so.2`
2+
3+
After installing the OpenLDAP client libraries for Linux, you must ensure that the appropriate symlinks `libldap.so.2` and `liblber.so.2` exist in your library directory, which is usually `/lib` or `/usr/lib`.
4+
5+
They're usually created by default when installing the OpenLDAP client libraries package and refer directly or indirectly to the latest version of the corresponding library located in the same directory, for example:
6+
7+
```sh
8+
root@linux ~ % ls -l /usr/lib/libldap.so.2
9+
lrwxrwxrwx 1 root root 10 Jul 18 2021 /usr/lib/libldap.so.2 -> libldap.so
10+
root@linux ~ % ls -l /usr/lib/libldap.so
11+
lrwxrwxrwx 1 root root 21 Jul 18 2021 /usr/lib/libldap.so -> libldap-2.4.so.2.11.7
12+
root@linux ~ % ls -l /usr/lib/liblber.so.2
13+
lrwxrwxrwx 1 root root 10 Jul 18 2021 /usr/lib/liblber.so.2 -> liblber.so
14+
root@linux ~ % ls -l /usr/lib/liblber.so
15+
lrwxrwxrwx 1 root root 21 Jul 18 2021 /usr/lib/liblber.so -> liblber-2.4.so.2.11.7
16+
```
17+
18+
If these symlinks do not exist, you can create direct links to the corresponding library using the following commands:
19+
20+
```sh
21+
root@linux ~ % ln -s /usr/lib/libldap-2.X.so.2.Y.Z /usr/lib/libldap.so.2
22+
root@linux ~ % ln -s /usr/lib/liblber-2.X.so.2.Y.Z /usr/lib/liblber.so.2
23+
```

0 commit comments

Comments
 (0)