*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_private.h"
-#include "ldb/include/ldb_errors.h"
+#include "ldb_module.h"
#include "ldb/ldb_map/ldb_map.h"
#include "system/passwd.h"
* sambaTrustPassword
* sambaUnixIdPool
* sambaIdmapEntry
- * sambaAccountPolicy
* sambaSidEntry
* sambaAcctFlags -> systemFlags ?
* sambaPasswordHistory -> ntPwdHistory*/
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);
}
{
struct passwd *pwd;
struct ldb_val retval;
-
+
pwd = getpwnam((char *)val->data);
if (!pwd) {
.type = MAP_IGNORE,
},
- /* sambaPassword */
+ /* userPassword */
{
- .local_name = "sambaPassword",
+ .local_name = "userPassword",
.type = MAP_IGNORE,
},
return ldb_next_init(module);
}
-const struct ldb_module_ops ldb_samba3sam_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_samba3sam_module_ops = {
LDB_MAP_OPS
.name = "samba3sam",
.init_context = samba3sam_init,