The Samba-Bugzilla – Attachment 6509 Details for
Bug 8200
Add Support for multiple writable ldap idmap domains
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v3-6-test
idmap-ldap-multiple-writable-domains.patch (text/plain), 4.41 KB, created by
Michael Adam
on 2011-06-01 10:46:54 UTC
(
hide
)
Description:
Patch for v3-6-test
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2011-06-01 10:46:54 UTC
Size:
4.41 KB
patch
obsolete
>From 5d23d5198ef5dede0c42f7983665e2b7f2ae8b9f Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Wed, 1 Jun 2011 00:25:23 +0200 >Subject: [PATCH 1/3] s3:idmap_ldap: rename idmap_ldap_allocate_id to idmap_ldap_allocate_id_internal > >This is in preparation of allowing allocating ldap based domain-specific configs. >(cherry picked from commit 2de65b97b98e2c8cc218b60da749ac17195d8413) >--- > source3/winbindd/idmap_ldap.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c >index 7195912..c04ae26 100644 >--- a/source3/winbindd/idmap_ldap.c >+++ b/source3/winbindd/idmap_ldap.c >@@ -232,8 +232,8 @@ done: > Allocate a new uid or gid > ********************************/ > >-static NTSTATUS idmap_ldap_allocate_id(struct idmap_domain *dom, >- struct unixid *xid) >+static NTSTATUS idmap_ldap_allocate_id_internal(struct idmap_domain *dom, >+ struct unixid *xid) > { > TALLOC_CTX *mem_ctx; > NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; >@@ -405,7 +405,7 @@ static NTSTATUS idmap_ldap_get_new_id(struct idmap_domain *dom, > return NT_STATUS_NOT_IMPLEMENTED; > } > >- ret = idmap_ldap_allocate_id(dom, id); >+ ret = idmap_ldap_allocate_id_internal(dom, id); > > return ret; > } >-- >1.7.1 > > >From 5d7fff8584e5b32f4b741a7f157adc9d05c670a3 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Wed, 1 Jun 2011 00:25:23 +0200 >Subject: [PATCH 2/3] s3:idmap_ldap: rename idmap_ldap_get_new_id to idmap_ldap_allocate_id > >This is in preparation of allowing allocating ldap based domain-specific configs. >(cherry picked from commit dea3ef1ab689a3d01846147d2a83377b09335f8f) >--- > source3/winbindd/idmap_ldap.c | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c >index c04ae26..3148f64 100644 >--- a/source3/winbindd/idmap_ldap.c >+++ b/source3/winbindd/idmap_ldap.c >@@ -391,15 +391,15 @@ done: > * For now this is for the default idmap domain only. > * Should be extended later on. > */ >-static NTSTATUS idmap_ldap_get_new_id(struct idmap_domain *dom, >- struct unixid *id) >+static NTSTATUS idmap_ldap_allocate_id(struct idmap_domain *dom, >+ struct unixid *id) > { > NTSTATUS ret; > > if (!strequal(dom->name, "*")) { >- DEBUG(3, ("idmap_ldap_get_new_id: " >+ DEBUG(3, ("idmap_ldap_allocate_id: " > "Refusing allocation of a new unixid for domain'%s'. " >- "Currently only supported for the default " >+ "This is only supported for the default " > "domain \"*\".\n", > dom->name)); > return NT_STATUS_NOT_IMPLEMENTED; >@@ -484,7 +484,7 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom) > ctx->rw_ops = talloc_zero(ctx, struct idmap_rw_ops); > CHECK_ALLOC_DONE(ctx->rw_ops); > >- ctx->rw_ops->get_new_id = idmap_ldap_get_new_id; >+ ctx->rw_ops->get_new_id = idmap_ldap_allocate_id; > ctx->rw_ops->set_mapping = idmap_ldap_set_mapping; > > ret = smbldap_init(ctx, winbind_event_context(), ctx->url, >@@ -1144,7 +1144,7 @@ static struct idmap_methods idmap_ldap_methods = { > .init = idmap_ldap_db_init, > .unixids_to_sids = idmap_ldap_unixids_to_sids, > .sids_to_unixids = idmap_ldap_sids_to_unixids, >- .allocate_id = idmap_ldap_get_new_id, >+ .allocate_id = idmap_ldap_allocate_id, > }; > > NTSTATUS idmap_ldap_init(void); >-- >1.7.1 > > >From 4ffa10901da7010dab99157a0330c5c7587a005f Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Wed, 1 Jun 2011 00:30:11 +0200 >Subject: [PATCH 3/3] s3:idmap_ldap: allow creation of ldap stored mappings for explicitly configured domains. > >After the preparations, this is achieved by using idmap_ldap_allocate_id_internal() >as get_new_id rw method instead of idmap_ldap_allocate_id(). >(cherry picked from commit 74cd06b3dff42bda4dd0a0f3fd250a975d0258ed) >--- > source3/winbindd/idmap_ldap.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c >index 3148f64..a9cb4fc 100644 >--- a/source3/winbindd/idmap_ldap.c >+++ b/source3/winbindd/idmap_ldap.c >@@ -484,7 +484,7 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom) > ctx->rw_ops = talloc_zero(ctx, struct idmap_rw_ops); > CHECK_ALLOC_DONE(ctx->rw_ops); > >- ctx->rw_ops->get_new_id = idmap_ldap_allocate_id; >+ ctx->rw_ops->get_new_id = idmap_ldap_allocate_id_internal; > ctx->rw_ops->set_mapping = idmap_ldap_set_mapping; > > ret = smbldap_init(ctx, winbind_event_context(), ctx->url, >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ambi
:
review+
Actions:
View
Attachments on
bug 8200
: 6509