[PATCH] a few cleanups
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Sep 8 06:23:46 UTC 2015
Hi!
Review&push appreciated!
Thanks,
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 2e5c3b13b528bdf88f0043546ef7a4f661ecbf40 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 8 Sep 2015 07:46:35 +0200
Subject: [PATCH 1/3] samdb: Fix CID 1034736 Dereference after null check
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source4/dsdb/samdb/ldb_modules/operational.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index 8390230..c5fd8e2 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -462,7 +462,7 @@ static int construct_msds_isrodc_with_dn(struct ldb_module *module,
ldb = ldb_module_get_ctx(module);
if (!ldb) {
DEBUG(4, (__location__ ": Failed to get ldb \n"));
- return ldb_operr(ldb);
+ return LDB_ERR_OPERATIONS_ERROR;
}
dn = ldb_dn_new(msg, ldb, (const char *)object_category->values[0].data);
--
1.9.1
From 3ba2c113fe2a70147aab59ae73943ce6a1e0acfc Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 8 Sep 2015 07:47:55 +0200
Subject: [PATCH 2/3] dsdb: Fix a confusing parameter
LDB_SCOPE_BASE is 0, so this works, but the corresponding parameter
is "struct ldb_control **controls", so I'd say NULL is more appropriate
here. Fixes a warning I just saw pass by.
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source4/dsdb/repl/replicated_objects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c
index 97b8b2a..df880ad 100644
--- a/source4/dsdb/repl/replicated_objects.c
+++ b/source4/dsdb/repl/replicated_objects.c
@@ -902,7 +902,7 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb,
ret = ldb_build_mod_req(&req, ldb, objects,
msg,
- LDB_SCOPE_BASE,
+ NULL,
NULL,
ldb_op_default_callback,
NULL);
--
1.9.1
From 7383cd1080e9f06399996eb4579575a917439387 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 8 Sep 2015 08:18:02 +0200
Subject: [PATCH 3/3] fruit: Fix CID 1323186 Dereference before null check
In all other "goto fail;" paths we had already dereferenced fsp,
so the if-statement checking for fsp!=NULL was unnecessary. This
fix gives us an additional error message in case check_aapl fails.
Signed-off-by: Volker Lendecke <vl at samba.org>
---
source3/modules/vfs_fruit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 21b49f9..c90699f 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -3318,7 +3318,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
status = check_aapl(handle, req, in_context_blobs, out_context_blobs);
if (!NT_STATUS_IS_OK(status)) {
- return status;
+ goto fail;
}
SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data,
--
1.9.1
More information about the samba-technical
mailing list