diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-11-02 03:47:48 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-11-02 03:47:48 +0000 |
commit | 6d7195d1d79c43f5ccc8dc4a9215c02177d5fa89 (patch) | |
tree | bd5e6a9c83f8fa55c98750ce555c66f0c109f569 /source3/lib | |
parent | aea57af3e38873e808afc3c742ba46527f686f6f (diff) | |
download | samba-6d7195d1d79c43f5ccc8dc4a9215c02177d5fa89.tar.gz samba-6d7195d1d79c43f5ccc8dc4a9215c02177d5fa89.tar.bz2 samba-6d7195d1d79c43f5ccc8dc4a9215c02177d5fa89.zip |
Merge passdb from HEAD -> 3.0
The work here includes:
- metze' set/changed patch, which avoids making changes to ldap on unmodified
attributes.
- volker's group mapping in passdb patch
- volker's samsync stuff
- volkers SAMR changes.
- mezte's connection caching patch
- my recent changes (fix magic root check, ldap ssl)
Andrew Bartlett
(This used to be commit 2044d60bbe0043cdbb9aba931115672bde975d2f)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/bitmap.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/lib/bitmap.c b/source3/lib/bitmap.c index 8121c38bd5..26d21d085f 100644 --- a/source3/lib/bitmap.c +++ b/source3/lib/bitmap.c @@ -60,6 +60,30 @@ void bitmap_free(struct bitmap *bm) } /**************************************************************************** +talloc a bitmap +****************************************************************************/ +struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n) +{ + struct bitmap *bm; + + if (!mem_ctx) return NULL; + + bm = (struct bitmap *)talloc(mem_ctx, sizeof(*bm)); + + if (!bm) return NULL; + + bm->n = n; + bm->b = (uint32 *)talloc(mem_ctx, sizeof(bm->b[0])*(n+31)/32); + if (!bm->b) { + return NULL; + } + + memset(bm->b, 0, sizeof(bm->b[0])*(n+31)/32); + + return bm; +} + +/**************************************************************************** set a bit in a bitmap ****************************************************************************/ BOOL bitmap_set(struct bitmap *bm, unsigned i) |