Change dn handling.

Previously we would construct the dn as follows:

    field = get field class for key
    dn = "%s=%s, %s" % (key, field.to_db(value), base_dn)

This made sense, as we want to be sure that the value stored in the dn
is the same as the value stored in the LDAP entry.

However, after the Python 3 changes, this beaks, as to_db returns a byte
value, and the dn needs to be a (unicode) string.

    dn = u"%s=%s, %s" % (key, field.to_db(value), base_dn)

We don't want to decode the output of to_db to a string, as this would
require assumming it is binary, which may not be the case.

Instead, we now assume that the following will be sufficient:

    dn = u"%s=%s, %s" % (key, value, base_dn)

i.e. that value.encode() is the same as the value that will be stored
for this attribute. This should be the case for most applications.

With this change, all tests pass under Python2 and Python3.

Change-Id: I97b35d5b6c4738cb9249f932a87a386ef9ea58fa
Use passlib instead of smbpasswd.

Change-Id: I479501d00b56acac594f8f69e29eab47089d4667
Copy escape_bytes function from ldap3.

This is temporary only, required until new release of ldap3 that
includes this fixed function.

Change-Id: Iabca596cce873298579dc5771414255c723c1e67
Fix broken import.

Change-Id: Ia45beba49b7779c0505559fb0ae6b3c2f8fb2cf2
Explicitly close sockets.

Change-Id: Ic3c91c6549a59ddf34eb92a8dcda912ac3d6af0c
Remove the temp directory after stopping daemon.

Every time the daemon is restarted we will get a new directory. Which is
probably highly desirable anyway.

Change-Id: I7f3f994b6f8e0fa02de1121e58914e05770033a4
More unicode string's fixed.

Change-Id: Id056329dbf372e5ce5b64f1ee011af5a1895d2b3
Even more unicode strings fixed.

Change-Id: Iee340583795d7e88248fdf5e63bff2c59cae608a
Fix inconsistant documentation.

Copy and paste error.

Change-Id: Iba2ae10a698374dc72bdfdcbbb5cafd631a0f44c
Python3 Debian package.

Change-Id: I395018f8bc41352cee593b778a26ef1012d1de9e
Add link to homepage.

Change-Id: I81e0444af4d07a1d57dbf514c2997b10137dfd2c
Remove unneeded file.

Change-Id: I18d3cbb7c1da48b9888eb8017582e7ca760c1690
New release for Debian.

Change-Id: Ic395bbd83123d8efe3a15b85c89ee91de6884838
Add Vcs headers.

Change-Id: I93b42bd066c748d3de3e59e6352d17f13938fdc3
Declare Python 3 compatible.

Change-Id: I4ee50530f512b3cd3cd51cb0984ad9a8e054cd06
Fix __unicode__ string methods for Python 3.

Change-Id: I0c92993645e309ef44ec996b8622714c441e989f
Don't connect to LDAP until we need to.

Preserve compatability with previous versions of TLDAP.

Change-Id: I09de5044a9f9a2fde864f362efdb28b439fc3fc2
Python 3 tests.

Change-Id: I10f2b5edb50bd2d7a8ab888b4b097a09bdb3ba8d
PEP8 fixes.

Change-Id: I58418e12da19c65e22a117d1aef6a4b40a1b5247
Run flake8 tests during build.

Change-Id: I4e5e8fd6bcf903b69d05662a560c6046499750cc