The branch, master has been updated
       via  60d9afa s4:finddcs_cldap: talloc free old memory before allocating 
a new netlogon struct
       via  7e4e4d0 s4:finddcs_cldap: close the socket when it's not used 
anymore
       via  40dc29b s4:finddcs_cldap: finddcs_cldap_recv() returns NTSTATUS
      from  662e9c0 Fix bug #8541 - readlink() on Linux clients fails if the 
symlink target is outside of the share.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 60d9afa806e21bb932336f53842af9a5405ff588
Author: Stefan Metzmacher <[email protected]>
Date:   Sat Oct 22 03:09:59 2011 +0200

    s4:finddcs_cldap: talloc free old memory before allocating a new netlogon 
struct
    
    metze
    
    Autobuild-User: Stefan Metzmacher <[email protected]>
    Autobuild-Date: Sat Oct 22 04:55:54 CEST 2011 on sn-devel-104

commit 7e4e4d09099c5b381a4474dcc94c6a234501b1a9
Author: Stefan Metzmacher <[email protected]>
Date:   Sat Oct 22 03:09:59 2011 +0200

    s4:finddcs_cldap: close the socket when it's not used anymore
    
    The amount of possible fd's might be restricted, so close them early.
    
    metze

commit 40dc29bca749bdacd5631e74a55d74252e87a4fd
Author: Stefan Metzmacher <[email protected]>
Date:   Sat Oct 22 03:09:59 2011 +0200

    s4:finddcs_cldap: finddcs_cldap_recv() returns NTSTATUS
    
    We need to convert the errno based error to NTSTATUS
    before calling tevent_req_error (via tevent_req_nterror).
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source4/libcli/finddcs_cldap.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c
index 6df15a9..8199e37 100644
--- a/source4/libcli/finddcs_cldap.c
+++ b/source4/libcli/finddcs_cldap.c
@@ -213,7 +213,12 @@ static void finddcs_cldap_next_server(struct 
finddcs_cldap_state *state)
                                                
state->srv_addresses[state->srv_address_index],
                                                389,
                                                &dest);
-       if (tevent_req_error(state->req, ret)) {
+       if (ret == 0) {
+               status = NT_STATUS_OK;
+       } else {
+               status = map_nt_error_from_unix_common(errno);
+       }
+       if (tevent_req_nterror(state->req, status)) {
                return;
        }
 
@@ -222,6 +227,7 @@ static void finddcs_cldap_next_server(struct 
finddcs_cldap_state *state)
                return;
        }
 
+       TALLOC_FREE(state->netlogon);
        state->netlogon = talloc_zero(state, struct cldap_netlogon);
        if (tevent_req_nomem(state->netlogon, state->req)) {
                return;
@@ -266,7 +272,8 @@ static void finddcs_cldap_netlogon_replied(struct 
tevent_req *subreq)
        state = tevent_req_callback_data(subreq, struct finddcs_cldap_state);
 
        status = cldap_netlogon_recv(subreq, state->netlogon, state->netlogon);
-       talloc_free(subreq);
+       TALLOC_FREE(subreq);
+       TALLOC_FREE(state->cldap);
        if (!NT_STATUS_IS_OK(status)) {
                state->srv_address_index++;
                finddcs_cldap_next_server(state);


-- 
Samba Shared Repository

Reply via email to