summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/modules/ldb_map.c25
-rw-r--r--source4/lib/samba3/PLAN4
-rw-r--r--source4/lib/samba3/samba3.h1
-rw-r--r--source4/lib/samba3/smbpasswd.c5
4 files changed, 19 insertions, 16 deletions
diff --git a/source4/lib/ldb/modules/ldb_map.c b/source4/lib/ldb/modules/ldb_map.c
index 513e065f2e..de7a00ef60 100644
--- a/source4/lib/ldb/modules/ldb_map.c
+++ b/source4/lib/ldb/modules/ldb_map.c
@@ -27,11 +27,15 @@
#include "ldb/include/ldb_private.h"
#include "ldb/modules/ldb_map.h"
-/* TODO:
- * - objectclass hint in ldb_map_attribute
- * for use when multiple remote attributes (independant of each other)
- * map to one local attribute. E.g.: (uid, gidNumber) -> unixName
- * (use MAP_GENERATE instead ?)
+/*
+ * - map_message_outgoing() should:
+ * - modify: not worry about anything simply map and hope everything
+ * will be ok.
+ * - make a list of remote objectclasses that will be used
+ * given the attributes that are available
+ * - only add attribute to the remote message if
+ * it is allowed by the objectclass
+ *
*/
/*
@@ -701,10 +705,6 @@ static int ldb_map_message_outgoing(struct ldb_module *module, const struct ldb_
}
if ((*fb)->num_elements == 0) {
- /* No elements, discard.. */
- talloc_free(*fb);
- *fb = NULL;
- } else {
ldb_msg_add_string(module->ldb, *fb, "isMapped", "TRUE");
}
@@ -727,8 +727,8 @@ static int map_rename(struct ldb_module *module, const struct ldb_dn *olddn, con
struct ldb_dn *n_olddn, *n_newdn;
int ret;
- ret = ldb_next_rename_record(module, olddn, newdn);
-
+ ret = ldb_next_rename_record(module, n_olddn, n_newdn);
+
n_olddn = map_local_dn(module, module, olddn);
n_newdn = map_local_dn(module, module, newdn);
@@ -753,7 +753,7 @@ static int map_delete(struct ldb_module *module, const struct ldb_dn *dn)
newdn = map_local_dn(module, module, dn);
- ret = ldb_delete(privdat->mapped_ldb, newdn);
+ ldb_delete(privdat->mapped_ldb, newdn);
talloc_free(newdn);
@@ -996,7 +996,6 @@ static int map_modify(struct ldb_module *module, const struct ldb_message *msg)
if (!map_is_mappable(privdat, msg))
return ldb_next_modify_record(module, msg);
-
if (ldb_map_message_outgoing(module, msg, &fb, &mp) == -1)
return -1;
diff --git a/source4/lib/samba3/PLAN b/source4/lib/samba3/PLAN
index 47b5edd408..80885a4ec7 100644
--- a/source4/lib/samba3/PLAN
+++ b/source4/lib/samba3/PLAN
@@ -1,2 +1,4 @@
TODO (SoC project):
- - finish ldb_map testsuite
+ - [ldb_map] some more strict checking when sending data to an LDAP server
+ - [ldb_map] fix rename
+ - fix ntPwdHash / lmPwdHash bug
diff --git a/source4/lib/samba3/samba3.h b/source4/lib/samba3/samba3.h
index f0f4c99513..a5f60bf1c2 100644
--- a/source4/lib/samba3/samba3.h
+++ b/source4/lib/samba3/samba3.h
@@ -45,7 +45,6 @@ struct samba3_samaccount {
char *profile_path;
char *acct_desc;
char *workstations;
- uid_t uid;
uint32_t user_rid, group_rid, hours_len, unknown_6;
uint16_t acct_ctrl, logon_divs;
uint16_t bad_password_count, logon_count;
diff --git a/source4/lib/samba3/smbpasswd.c b/source4/lib/samba3/smbpasswd.c
index fe0780c8d3..baddb82545 100644
--- a/source4/lib/samba3/smbpasswd.c
+++ b/source4/lib/samba3/smbpasswd.c
@@ -228,6 +228,7 @@ NTSTATUS samba3_read_smbpasswd(const char *filename, TALLOC_CTX *ctx, struct sam
for (i = 0; i < numlines; i++) {
char *p = lines[i], *q;
+ uid_t uid;
struct samba3_samaccount *acc = &((*accounts)[*count]);
if (p[0] == '\0' || p[0] == '#')
@@ -244,7 +245,9 @@ NTSTATUS samba3_read_smbpasswd(const char *filename, TALLOC_CTX *ctx, struct sam
acc->username = talloc_strndup(ctx, p, PTR_DIFF(q, p));
p = q+1;
- acc->uid = atoi(p);
+ uid = atoi(p);
+
+ /* uid is ignored here.. */
q = strchr(p, ':');
if (!q) {