summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samba3sam.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-30 16:31:19 -0500
committerSimo Sorce <idra@samba.org>2009-01-30 17:07:25 -0500
commitd4aeed879b21db41643250a23b1009b543e6c99f (patch)
tree8b9d26d91beb4846f443c1298649487c0461bf62 /source4/dsdb/samdb/ldb_modules/samba3sam.c
parent4519eae158e7821dcd2f818eea830cfcdd4a0105 (diff)
downloadsamba-d4aeed879b21db41643250a23b1009b543e6c99f.tar.gz
samba-d4aeed879b21db41643250a23b1009b543e6c99f.tar.bz2
samba-d4aeed879b21db41643250a23b1009b543e6c99f.zip
Fix all other modules to use ldb_module.h instead of ldb_private.h
The only 2 modules escaping the rule so far are rootdse and partitions
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samba3sam.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sam.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sam.c b/source4/dsdb/samdb/ldb_modules/samba3sam.c
index 7a123c818f..3f10748085 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sam.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sam.c
@@ -6,9 +6,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-#include "ldb/include/ldb_errors.h"
+#include "ldb/include/ldb_module.h"
#include "ldb/ldb_map/ldb_map.h"
#include "system/passwd.h"
@@ -118,20 +116,23 @@ static void generate_sambaPrimaryGroupSID(struct ldb_module *module, const char
static struct ldb_val convert_uid_samaccount(struct ldb_module *module, TALLOC_CTX *ctx, const struct ldb_val *val)
{
struct ldb_val out = data_blob(NULL, 0);
- ldb_handler_copy(module->ldb, ctx, val, &out);
+ out = ldb_val_dup(ctx, val);
return out;
}
static struct ldb_val lookup_homedir(struct ldb_module *module, TALLOC_CTX *ctx, const struct ldb_val *val)
{
+ struct ldb_context *ldb;
struct passwd *pwd;
struct ldb_val retval;
-
+
+ ldb = ldb_module_get_ctx(module);
+
pwd = getpwnam((char *)val->data);
if (!pwd) {
- ldb_debug(module->ldb, LDB_DEBUG_WARNING, "Unable to lookup '%s' in passwd", (char *)val->data);
+ ldb_debug(ldb, LDB_DEBUG_WARNING, "Unable to lookup '%s' in passwd", (char *)val->data);
return *talloc_zero(ctx, struct ldb_val);
}
@@ -145,7 +146,7 @@ static struct ldb_val lookup_gid(struct ldb_module *module, TALLOC_CTX *ctx, con
{
struct passwd *pwd;
struct ldb_val retval;
-
+
pwd = getpwnam((char *)val->data);
if (!pwd) {