[PATCH] Fix the build of recent dsdb changes
Günther Deschner
gd at samba.org
Fri Jun 15 14:12:55 UTC 2018
Hi,
no idea why it was passing autobuild. With that first patch still the
"test_audit_log" binary was failing, with the updated patch it passes now.
Please review and push.
Thanks,
Guenther
On 12/06/18 13:45, Stefan Metzmacher via samba-technical wrote:
> Am 12.06.2018 um 12:56 schrieb Günther Deschner via samba-technical:
>> Hi,
>>
>> dsdb currently does not compile:
>>
>> ../source4/dsdb/samdb/ldb_modules/audit_util.c: In function
>> ‘dsdb_audit_add_ldb_value’:
>> ../source4/dsdb/samdb/ldb_modules/audit_util.c:484:2: error: ISO C90
>> forbids mixed declarations and code [-Werror=declaration-after-statement]
>>
>> Please review and push.
>
> Reviewed, please push.
>
> I'm just wondering why this wasn't catched by autobuild?
>
> metze
>
>
--
Günther Deschner GPG-ID: 8EE11688
Red Hat gdeschner at redhat.com
Samba Team gd at samba.org
-------------- next part --------------
From ef01157745e2f7ac437efa2df538a4715ba32b26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Tue, 12 Jun 2018 12:54:15 +0200
Subject: [PATCH] s4-dsdb: fix the build of audit_util.c
Guenther
Signed-off-by: Guenther Deschner <gd at samba.org>
---
source4/dsdb/samdb/ldb_modules/audit_util.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/source4/dsdb/samdb/ldb_modules/audit_util.c b/source4/dsdb/samdb/ldb_modules/audit_util.c
index e36ddcb90eb..be2c522ace7 100644
--- a/source4/dsdb/samdb/ldb_modules/audit_util.c
+++ b/source4/dsdb/samdb/ldb_modules/audit_util.c
@@ -470,6 +470,9 @@ static void dsdb_audit_add_ldb_value(
struct json_object *array,
const struct ldb_val lv)
{
+ bool base64;
+ int len;
+ struct json_object value;
json_assert_is_array(array);
if (json_is_invalid(array)) {
@@ -481,9 +484,10 @@ static void dsdb_audit_add_ldb_value(
return;
}
- bool base64 = ldb_should_b64_encode(NULL, &lv);
- int len = min(lv.length, MAX_LENGTH);
- struct json_object value = json_new_object();
+ base64 = ldb_should_b64_encode(NULL, &lv);
+ len = min(lv.length, MAX_LENGTH);
+ value = json_new_object();
+
if (lv.length > MAX_LENGTH) {
json_add_bool(&value, "truncated", true);
}
--
2.17.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180615/3733782c/signature.sig>
More information about the samba-technical
mailing list