[SCM] Samba Shared Repository - branch v3-5-test updated
Karolin Seeger
kseeger at samba.org
Wed Jan 4 13:17:38 MST 2012
The branch, v3-5-test has been updated
via 76137cb s3-winbind: Move finding the domain to it's own function.
via b16104d s3-winbind: Fix segfault if we can't map the last user.
from c4e0462 Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can fail to add inheritable entries on a directory with no stored ACL.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit 76137cbcfa6f8ecae2417b034e3f08d43242f5fa
Author: Andreas Schneider <asn at samba.org>
Date: Tue Jan 3 16:54:39 2012 +0100
s3-winbind: Move finding the domain to it's own function.
This the first part to fix bug #8678.
(cherry picked from commit 5075e565684627dfbd23f715da344b4365351ccb)
(cherry picked from commit 2fca06a63d47619f2b6902b1c8601021843c4b95)
commit b16104ddf431d81f673bc3cf5e998c0f9421f2e9
Author: Andreas Schneider <asn at samba.org>
Date: Tue Jan 3 16:55:25 2012 +0100
s3-winbind: Fix segfault if we can't map the last user.
This fixes bug #8678.
The issue is caused by bug #8608.
Autobuild-User: Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date: Wed Jan 4 18:30:53 CET 2012 on sn-devel-104
(cherry picked from commit b9d208bdaa9da2a5ae534481865efc881b851b01)
(cherry picked from commit 23db6e7cf65bdd3974a4857dda0be6ad7d758b9a)
-----------------------------------------------------------------------
Summary of changes:
source3/winbindd/wb_next_pwent.c | 50 +++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c
index e5b5e29..8a7b006 100644
--- a/source3/winbindd/wb_next_pwent.c
+++ b/source3/winbindd/wb_next_pwent.c
@@ -30,6 +30,26 @@ struct wb_next_pwent_state {
static void wb_next_pwent_fetch_done(struct tevent_req *subreq);
static void wb_next_pwent_fill_done(struct tevent_req *subreq);
+static struct winbindd_domain *wb_next_find_domain(struct winbindd_domain *domain)
+{
+ if (domain == NULL) {
+ domain = domain_list();
+ } else {
+ domain = domain->next;
+ }
+
+ if ((domain != NULL)
+ && sid_check_is_domain(&domain->sid)) {
+ domain = domain->next;
+ }
+
+ if (domain == NULL) {
+ return NULL;
+ }
+
+ return domain;
+}
+
struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct getpwent_state *gstate,
@@ -49,17 +69,7 @@ struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
if (state->gstate->next_user >= state->gstate->num_users) {
TALLOC_FREE(state->gstate->users);
- if (state->gstate->domain == NULL) {
- state->gstate->domain = domain_list();
- } else {
- state->gstate->domain = state->gstate->domain->next;
- }
-
- if ((state->gstate->domain != NULL)
- && sid_check_is_domain(&state->gstate->domain->sid)) {
- state->gstate->domain = state->gstate->domain->next;
- }
-
+ state->gstate->domain = wb_next_find_domain(state->gstate->domain);
if (state->gstate->domain == NULL) {
tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
return tevent_req_post(req, ev);
@@ -154,6 +164,24 @@ static void wb_next_pwent_fill_done(struct tevent_req *subreq)
if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
state->gstate->next_user += 1;
+ if (state->gstate->next_user >= state->gstate->num_users) {
+ TALLOC_FREE(state->gstate->users);
+
+ state->gstate->domain = wb_next_find_domain(state->gstate->domain);
+ if (state->gstate->domain == NULL) {
+ tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
+ return;
+ }
+
+ subreq = wb_query_user_list_send(state, state->ev,
+ state->gstate->domain);
+ if (tevent_req_nomem(subreq, req)) {
+ return;
+ }
+ tevent_req_set_callback(subreq, wb_next_pwent_fetch_done, req);
+ return;
+ }
+
subreq = wb_fill_pwent_send(state,
state->ev,
&state->gstate->users[state->gstate->next_user],
--
Samba Shared Repository
More information about the samba-cvs
mailing list