diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-01 15:33:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:36:21 -0500 |
commit | e2e2508b586a112e612bf3660f80d25c9bf8bc90 (patch) | |
tree | 7dabda32e3e7cd3779460eca08816df449bb29c1 /source4/dsdb/samdb | |
parent | 6ff97621fa744404ec3da6a4d38031eeec4741b3 (diff) | |
download | samba-e2e2508b586a112e612bf3660f80d25c9bf8bc90.tar.gz samba-e2e2508b586a112e612bf3660f80d25c9bf8bc90.tar.bz2 samba-e2e2508b586a112e612bf3660f80d25c9bf8bc90.zip |
r9899: Be more conservative about what is sent to the remote server in ldb_map.
(This used to be commit 76e943d4416e38ce4cce27d5403bc3e133d0025b)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samba3sam.c | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sam.c b/source4/dsdb/samdb/ldb_modules/samba3sam.c index 9337b612ba..9730363e92 100644 --- a/source4/dsdb/samdb/ldb_modules/samba3sam.c +++ b/source4/dsdb/samdb/ldb_modules/samba3sam.c @@ -85,7 +85,7 @@ static struct ldb_val convert_unix_name2id(struct ldb_module *module, TALLOC_CTX static struct ldb_val encode_sid(struct ldb_module *module, TALLOC_CTX *ctx, const struct ldb_val *val) { struct dom_sid *sid = dom_sid_parse_talloc(ctx, (char *)val->data); - struct ldb_val *out = talloc_zero(out, struct ldb_val); + struct ldb_val *out = talloc_zero(ctx, struct ldb_val); NTSTATUS status; if (sid == NULL) { @@ -128,9 +128,34 @@ static struct ldb_val decode_sid(struct ldb_module *module, TALLOC_CTX *ctx, con } const struct ldb_map_objectclass samba3_objectclasses[] = { - { "group", "sambaGroupMapping" }, - { "user", "sambaSAMAccount" }, - { "domain", "sambaDomain" }, + { + .local_name = "group", + .remote_name = "sambaGroupMapping", + .musts = { "gidNumber", "sambaSID", "sambaGroupType", NULL }, + .mays = { "displayName", "description", "sambaSIDList", NULL }, + }, + { + .local_name = "user", + .remote_name = "sambaSAMAccount", + .base_classes = { "top", NULL }, + .musts = { "uid", "sambaSID", NULL }, + .mays = { "cn", "sambaLMPassword", "sambaNTPassword", + "sambaPwdLastSet", "sambaLogonTime", "sambaLogoffTime", + "sambaKickoffTime", "sambaPwdCanChange", "sambaPwdMustChange", + "sambaAcctFlags", "displayName", "sambaHomePath", "sambaHomeDrive", + "sambaLogonScript", "sambaProfilePath", "description", "sambaUserWorkstations", + "sambaPrimaryGroupSID", "sambaDomainName", "sambaMungedDial", + "sambaBadPasswordCount", "sambaBadPasswordTime", + "sambaPasswordHistory", "sambaLogonHours", NULL } + + }, + { + .local_name = "domain", + .remote_name = "sambaDomain", + .base_classes = { "top", NULL }, + .musts = { "sambaDomainName", "sambaSID", NULL }, + .mays = { "sambaNextRid", "sambaNextGroupRid", "sambaNextUserRid", "sambaAlgorithmicRidBase", NULL }, + }, { NULL, NULL } }; @@ -237,17 +262,6 @@ const struct ldb_map_attribute samba3_attributes[] = }, }, - /* gidNumber -> unixName */ - { - .local_name = "unixName", - .type = MAP_CONVERT, - .u = { - .convert = { - .remote_name = "gidNumber", - }, - }, - }, - /* uid -> unixName */ { .local_name = "unixName", |