[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Wed Oct 1 05:48:03 MDT 2014
The branch, master has been updated
via 0fbce14 loadparm//init_copymap: Add braces around if/for blocks to match coding style
via 122fdf5 loadparm: Allocate service->copymap in service memory context
from 3419a20 WHATSNEW: Start release notes for Samba 4.3.0pre1.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0fbce1457dadbd5ae1307989f2699196161a37df
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Wed Sep 10 03:16:11 2014 +0200
loadparm//init_copymap: Add braces around if/for blocks to match coding style
Signed-off-by: Kamen Mazdrashki <kamenim at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Wed Oct 1 13:47:22 CEST 2014 on sn-devel-104
commit 122fdf5ea4fc5b9518404b5149a0bfc88dde2768
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Wed Sep 10 03:14:42 2014 +0200
loadparm: Allocate service->copymap in service memory context
This patch adds a restriction that target service structure
must be a valid TALLOC_CTX memory context.
I have traced all call paths and at the moment this is the case,
pservice parameter layways gets allocated on TALLOC_CTX.
Signed-off-by: Kamen Mazdrashki <kamenim at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/param/loadparm.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 9953053..5543f79 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -1376,20 +1376,26 @@ bool handle_smb_ports(struct loadparm_context *lp_ctx, struct loadparm_service *
Initialise a copymap.
***************************************************************************/
+/**
+ * Initializes service copymap
+ * Note: pservice *must* be valid TALLOC_CTX
+ */
void init_copymap(struct loadparm_service *pservice)
{
int i;
TALLOC_FREE(pservice->copymap);
- pservice->copymap = bitmap_talloc(NULL, num_parameters());
- if (!pservice->copymap)
+ pservice->copymap = bitmap_talloc(pservice, num_parameters());
+ if (!pservice->copymap) {
DEBUG(0,
("Couldn't allocate copymap!! (size %d)\n",
(int)num_parameters()));
- else
- for (i = 0; i < num_parameters(); i++)
+ } else {
+ for (i = 0; i < num_parameters(); i++) {
bitmap_set(pservice->copymap, i);
+ }
+ }
}
/**
--
Samba Shared Repository
More information about the samba-cvs
mailing list