password_hash: Fix the build on FreeBSD
authorVolker Lendecke <vl@samba.org>
Fri, 2 Jun 2017 11:34:39 +0000 (13:34 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 13 Jun 2017 03:06:49 +0000 (05:06 +0200)
This ditches a particular aspect of thread safety, but I doubt that
ldb is really thread safe. So in practice, I think we should not
see harm from this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jun 13 05:06:49 CEST 2017 on sn-devel-144

source4/dsdb/samdb/ldb_modules/password_hash.c

index 8e8dc2c307255d4e4b2af1b3391f2fe7e39e2ee2..68028f0fce465c3595786a7ff2a25701f8d8ea98 100644 (file)
@@ -1543,13 +1543,12 @@ static int setup_primary_userPassword_hash(
        hash = crypt((char *)io->n.cleartext_utf8->data, cmd);
 #endif
        if (hash == NULL) {
-               char buf[1024];
                ldb_asprintf_errstring(
                        ldb,
                        "setup_primary_userPassword: generation of a %s "
                        "password hash failed: (%s)",
                        scheme,
-                       strerror_r(errno, buf, sizeof(buf)));
+                       strerror(errno));
                TALLOC_FREE(frame);
                return LDB_ERR_OPERATIONS_ERROR;
        }