The branch, master has been updated
       via  d493ec1 s4: torture: Fix directory test against a server that 
actually uses index returns.
       via  e224e62 net: fix a crash with net ads keytab create
      from  1b8ea12 witness: fix length calculation in witness_IPaddrInfoList 
IDL.

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


- Log -----------------------------------------------------------------
commit d493ec1f795ffb4642a4ed8481b686056802859d
Author: Jeremy Allison <j...@samba.org>
Date:   Thu Sep 24 11:28:50 2015 -0700

    s4: torture: Fix directory test against a server that actually uses index 
returns.
    
    Who knew ? Finally found one that does this :-).
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Jim McDonough <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Fri Sep 25 08:21:49 CEST 2015 on sn-devel-104

commit e224e622971853bddbe24df717ea5dcddef71b89
Author: Uri Simchoni <urisimch...@gmail.com>
Date:   Wed Sep 23 14:45:47 2015 +0300

    net: fix a crash with net ads keytab create
    
    Fix a crash that happens when executing "net ads keytab create"
    and the machine account in AD does not have setvice principal names
    attached to it.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11528
    
    Signed-off-by: Uri Simchoni <urisimch...@gmail.com>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Stefan Metzmacher <me...@samba.org>

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

Summary of changes:
 source3/libads/ldap.c      |  7 +++++++
 source4/torture/smb2/dir.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index e8ccfa9..1538500 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -2076,6 +2076,13 @@ ADS_STATUS ads_get_service_principal_names(TALLOC_CTX 
*mem_ctx,
                                      res,
                                      "servicePrincipalName",
                                      num_spns);
+       if (*spn_array == NULL) {
+               DEBUG(1, ("Host account for %s does not have service principal "
+                         "names.\n",
+                         machine_name));
+               status = ADS_ERROR(LDAP_NO_SUCH_OBJECT);
+               goto done;
+       }
 
 done:
        ads_msgfree(ads, res);
diff --git a/source4/torture/smb2/dir.c b/source4/torture/smb2/dir.c
index c57ce75..98844b4 100644
--- a/source4/torture/smb2/dir.c
+++ b/source4/torture/smb2/dir.c
@@ -710,6 +710,10 @@ static NTSTATUS multiple_smb2_search(struct smb2_tree 
*tree,
                        return NT_STATUS_UNSUCCESSFUL;
                }
 
+               if (count == 0 || result == NULL || result->count == 0) {
+                       return NT_STATUS_UNSUCCESSFUL;
+               }
+
                /*
                 * After the first iteration is complete set the CONTINUE
                 * FLAGS appropriately
@@ -717,6 +721,30 @@ static NTSTATUS multiple_smb2_search(struct smb2_tree 
*tree,
                switch (cont_type) {
                        case CONT_INDEX:
                                f.in.continue_flags = SMB2_CONTINUE_FLAG_INDEX;
+                               switch (data_level) {
+                                       case 
RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO:
+                                               f.in.file_index =
+                                                       
result->list[result->count-1].both_directory_info.file_index;
+                                               break;
+                                       case RAW_SEARCH_DATA_DIRECTORY_INFO:
+                                               f.in.file_index =
+                                                       
result->list[result->count-1].directory_info.file_index;
+                                               break;
+                                       case 
RAW_SEARCH_DATA_FULL_DIRECTORY_INFO:
+                                               f.in.file_index =
+                                                       
result->list[result->count-1].full_directory_info.file_index;
+                                               break;
+                                       case 
RAW_SEARCH_DATA_ID_FULL_DIRECTORY_INFO:
+                                               f.in.file_index =
+                                                       
result->list[result->count-1].id_full_directory_info.file_index;
+                                               break;
+                                       case 
RAW_SEARCH_DATA_ID_BOTH_DIRECTORY_INFO:
+                                               f.in.file_index =
+                                                       
result->list[result->count-1].id_both_directory_info.file_index;
+                                               break;
+                                       default:
+                                               return 
NT_STATUS_INVALID_PARAMETER;
+                               }
                                break;
                        case CONT_SINGLE:
                                f.in.continue_flags = SMB2_CONTINUE_FLAG_SINGLE;


-- 
Samba Shared Repository

Reply via email to