From: Volker Lendecke Date: Fri, 2 Jun 2017 11:34:39 +0000 (+0200) Subject: password_hash: Fix the build on FreeBSD X-Git-Tag: ldb-1.1.31~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60a8ba4a6b028d516b39de2f55c68a6e8cbbf43f;p=thirdparty%2Fsamba.git password_hash: Fix the build on FreeBSD 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 Reviewed-by: Ralph Boehme Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Jun 13 05:06:49 CEST 2017 on sn-devel-144 --- diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 8e8dc2c3072..68028f0fce4 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -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; }