diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-10-12 06:10:23 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2005-10-12 06:10:23 +0000 |
commit | 1ff8a15849323c3d86606193c2587b93efa38cd3 (patch) | |
tree | e253592d789c33c12692765fcf249b1094126f6e /source/dsdb/samdb/ldb_modules/samba3sam.c | |
parent | 3612d2056fb3eb8bd95801d58f45dfca51e5f5dc (diff) | |
download | samba-1ff8a15849323c3d86606193c2587b93efa38cd3.tar.gz samba-1ff8a15849323c3d86606193c2587b93efa38cd3.tar.xz samba-1ff8a15849323c3d86606193c2587b93efa38cd3.zip |
r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(
I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes
In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.
Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
Diffstat (limited to 'source/dsdb/samdb/ldb_modules/samba3sam.c')
-rw-r--r-- | source/dsdb/samdb/ldb_modules/samba3sam.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/dsdb/samdb/ldb_modules/samba3sam.c b/source/dsdb/samdb/ldb_modules/samba3sam.c index a68f6f06405..5e88cd64699 100644 --- a/source/dsdb/samdb/ldb_modules/samba3sam.c +++ b/source/dsdb/samdb/ldb_modules/samba3sam.c @@ -55,17 +55,17 @@ static void generate_hashes (struct ldb_module *module, const char *local_attr, if (!upwd) return; - ldb_msg_add_string(module->ldb, remote_fb, local_attr, upwd); + ldb_msg_add_string(remote_fb, local_attr, upwd); val.length = 16; val.data = talloc_zero_size(module, val.length); E_md4hash(upwd, val.data); - ldb_msg_add_value(module->ldb, remote_mp, "sambaNTPassword", &val); + ldb_msg_add_value(remote_mp, "sambaNTPassword", &val); val.data = talloc_zero_size(module, val.length); E_deshash(upwd, val.data); - ldb_msg_add_value(module->ldb, remote_mp, "sambaLMPassword", &val); + ldb_msg_add_value(remote_mp, "sambaLMPassword", &val); } @@ -119,7 +119,7 @@ static void generate_sambaPrimaryGroupSID(struct ldb_module *module, const char sidstring = dom_sid_string(remote_mp, sid); talloc_free(sid); - ldb_msg_add_fmt(module->ldb, remote_mp, "sambaPrimaryGroupSID", "%s-%d", sidstring, ldb_msg_find_uint(local, "primaryGroupID", 0)); + ldb_msg_add_fmt(remote_mp, "sambaPrimaryGroupSID", "%s-%d", sidstring, ldb_msg_find_uint(local, "primaryGroupID", 0)); talloc_free(sidstring); } |