Changeset 919 for vendor/current/source4


Ignore:
Timestamp:
Jun 9, 2016, 2:17:22 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: apply latest security patches to vendor

Location:
vendor/current/source4
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/heimdal/cf/make-proto.pl

    r917 r919  
    22# $Id$
    33
    4 ##use Getopt::Std;
    5 require 'getopts.pl';
     4use Getopt::Std;
     5#require 'getopts.pl';
    66
    77my $comment = 0;
     
    1313my $private_func_re = "^_";
    1414
    15 Getopts('x:m:o:p:dqE:R:P:') || die "foo";
     15getopts('x:m:o:p:dqE:R:P:') || die "foo";
    1616
    1717if($opt_d) {
  • vendor/current/source4/lib/ldb/wscript

    r917 r919  
    136136                          vnum=VERSION,
    137137                          private_library=private_library,
    138                           manpages='man/ldb.3',
    139                           abi_directory = 'ABI',
    140                           abi_match = abi_match)
     138                          manpages='man/ldb.3')
    141139
    142140        # generate a include/ldb_version.h
  • vendor/current/source4/librpc/rpc/dcerpc.c

    r860 r919  
    700700        default:
    701701                return NT_STATUS_INVALID_LEVEL;
     702        }
     703
     704        if (pkt->auth_length == 0) {
     705                return NT_STATUS_INVALID_NETWORK_RESPONSE;
     706        }
     707
     708        if (c->security_state.generic_state == NULL) {
     709                return NT_STATUS_INTERNAL_ERROR;
    702710        }
    703711
     
    10751083
    10761084        /* the bind_ack might contain a reply set of credentials */
    1077         if (conn->security_state.auth_info && pkt->u.bind_ack.auth_info.length) {
     1085        if (conn->security_state.auth_info && pkt->auth_length) {
    10781086                NTSTATUS status;
    10791087                uint32_t auth_length;
     
    18481856
    18491857        /* the alter_resp might contain a reply set of credentials */
    1850         if (recv_pipe->conn->security_state.auth_info &&
    1851             pkt->u.alter_resp.auth_info.length) {
     1858        if (recv_pipe->conn->security_state.auth_info && pkt->auth_length) {
    18521859                struct dcecli_connection *conn = recv_pipe->conn;
    18531860                NTSTATUS status;
  • vendor/current/source4/librpc/rpc/dcerpc_util.c

    r917 r919  
    594594        /* Perform an authenticated DCE-RPC bind
    595595         */
    596         if (!(conn->flags & (DCERPC_SIGN|DCERPC_SEAL))) {
     596        if (!(conn->flags & (DCERPC_CONNECT|DCERPC_SEAL))) {
    597597                /*
    598598                  we are doing an authenticated connection,
    599                   but not using sign or seal. We must force
    600                   the CONNECT dcerpc auth type as a NONE auth
    601                   type doesn't allow authentication
    602                   information to be passed.
     599                  which needs to use [connect], [sign] or [seal].
     600                  If nothing is specified, we default to [sign] now.
     601                  This give roughly the same protection as
     602                  ncacn_np with smb signing.
    603603                */
    604                 conn->flags |= DCERPC_CONNECT;
     604                conn->flags |= DCERPC_SIGN;
    605605        }
    606606
  • vendor/current/source4/rpc_server/dcesrv_auth.c

    r740 r919  
    4747        uint32_t auth_length;
    4848
    49         if (pkt->u.bind.auth_info.length == 0) {
     49        if (pkt->auth_length == 0) {
    5050                dce_conn->auth_state.auth_info = NULL;
    5151                return true;
     
    109109        NTSTATUS status;
    110110
    111         if (!call->conn->auth_state.gensec_security) {
     111        if (call->pkt.auth_length == 0) {
    112112                return NT_STATUS_OK;
    113113        }
     
    156156        uint32_t auth_length;
    157157
    158         /* We can't work without an existing gensec state, and an new blob to feed it */
    159         if (!dce_conn->auth_state.auth_info ||
    160             !dce_conn->auth_state.gensec_security ||
    161             pkt->u.auth3.auth_info.length == 0) {
     158        if (pkt->auth_length == 0) {
     159                return false;
     160        }
     161
     162        if (!dce_conn->auth_state.auth_info) {
     163                return false;
     164        }
     165
     166        /* We can't work without an existing gensec state */
     167        if (!dce_conn->auth_state.gensec_security) {
    162168                return false;
    163169        }
     
    204210
    205211        /* on a pure interface change there is no auth blob */
    206         if (pkt->u.alter.auth_info.length == 0) {
     212        if (pkt->auth_length == 0) {
    207213                return true;
    208214        }
     
    239245        /* on a pure interface change there is no auth_info structure
    240246           setup */
    241         if (!call->conn->auth_state.auth_info ||
    242             dce_conn->auth_state.auth_info->credentials.length == 0) {
     247        if (call->pkt.auth_length == 0) {
    243248                return NT_STATUS_OK;
    244249        }
     
    313318
    314319        default:
     320                return false;
     321        }
     322
     323        if (pkt->auth_length == 0) {
     324                DEBUG(1,("dcesrv_auth_request: unexpected auth_length of 0\n"));
    315325                return false;
    316326        }
  • vendor/current/source4/torture/basic/base.c

    r917 r919  
    14771477{
    14781478        bool nt_status_support;
     1479        bool client_ntlmv2_auth;
    14791480        struct smbcli_state *cli_nt = NULL, *cli_dos = NULL;
    14801481        bool result = false;
     
    14861487
    14871488        nt_status_support = lpcfg_nt_status_support(tctx->lp_ctx);
     1489        client_ntlmv2_auth = lpcfg_client_ntlmv2_auth(tctx->lp_ctx);
    14881490
    14891491        if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) {
     
    14911493                goto fail;
    14921494        }
     1495        if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", "yes")) {
     1496                torture_result(tctx, TORTURE_FAIL, "Could not set 'client ntlmv2 auth = yes'\n");
     1497                goto fail;
     1498        }
    14931499
    14941500        if (!torture_open_connection(&cli_nt, tctx, 0)) {
     
    14971503
    14981504        if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support", "no")) {
    1499                 torture_comment(tctx, "Could not set 'nt status support = yes'\n");
     1505                torture_result(tctx, TORTURE_FAIL, "Could not set 'nt status support = no'\n");
     1506                goto fail;
     1507        }
     1508        if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth", "no")) {
     1509                torture_result(tctx, TORTURE_FAIL, "Could not set 'client ntlmv2 auth = no'\n");
    15001510                goto fail;
    15011511        }
     
    15071517        if (!lpcfg_set_cmdline(tctx->lp_ctx, "nt status support",
    15081518                            nt_status_support ? "yes":"no")) {
    1509                 torture_comment(tctx, "Could not reset 'nt status support = yes'");
     1519                torture_result(tctx, TORTURE_FAIL, "Could not reset 'nt status support'");
     1520                goto fail;
     1521        }
     1522        if (!lpcfg_set_cmdline(tctx->lp_ctx, "client ntlmv2 auth",
     1523                               client_ntlmv2_auth ? "yes":"no")) {
     1524                torture_result(tctx, TORTURE_FAIL, "Could not reset 'client ntlmv2 auth'");
    15101525                goto fail;
    15111526        }
  • vendor/current/source4/torture/ndr/dfsblob.c

    r917 r919  
    7575        struct torture_suite *suite = torture_suite_create(ctx, "dfsblob");
    7676
    77         torture_suite_add_ndr_pull_fn_test(suite, dfs_GetDFSReferral_in, dfs_get_ref_in, NDR_IN, NULL);
     77        torture_suite_add_ndr_pull_test(suite, dfs_GetDFSReferral_in, dfs_get_ref_in, NULL);
    7878
    79         torture_suite_add_ndr_pull_fn_test(suite, dfs_referral_resp, dfs_get_ref_out2, NDR_BUFFERS|NDR_SCALARS, NULL);
     79        torture_suite_add_ndr_pull_test(suite, dfs_referral_resp, dfs_get_ref_out2, NULL);
    8080
    81         torture_suite_add_ndr_pull_fn_test(suite, dfs_referral_resp, dfs_get_ref_out, NDR_BUFFERS|NDR_SCALARS,dfs_referral_out_check);
     81        torture_suite_add_ndr_pull_test(suite, dfs_referral_resp, dfs_get_ref_out,dfs_referral_out_check);
    8282
    8383        return suite;
  • vendor/current/source4/torture/ndr/drsblobs.c

    r917 r919  
    116116};
    117117
     118/* these are taken from the trust objects of a w2k8r2 forest, with a
     119 * trust relationship between the forest parent and a child domain
     120 */
     121static const char *trustAuthIncoming =
     122"AQAAAAwAAAAcAQAASuQ+RXJdzAECAAAAAAEAAMOWL6UVfVKiJOUsGcT03H"
     123"jHxr2ACsMMOV5ynM617Tp7idNC+c4egdqk4S9YEpvR2YvHmdZdymL6F7QKm8OkXazYZF2r/gZ/bI+"
     124"jkWbsn4O8qyAc3OUKQRZwBbf+lxBW+vM4O3ZpUjz5BSKCcFQgM+MY91yVU8Nji3HNnvGnDquobFAZ"
     125"hxjL+S1l5+QZgkfyfv5mQScGRbU1Lar1xg9G3JznUb7S6pvrBO2nwK8g+KZBfJy5UeULigDH4IWo/"
     126"JmtaEGkKE2uiKIjdsEQd/uwnkouW26XzRc0ulfJnPFftGnT9KIcShPf7DLj/tstmQAAceRMFHJTY3"
     127"PmxoowoK8HUyBK5D5Fcl3MAQIAAAAAAQAAw5YvpRV9UqIk5SwZxPTceMfGvYAKwww5XnKczrXtOnu"
     128"J00L5zh6B2qThL1gSm9HZi8eZ1l3KYvoXtAqbw6RdrNhkXav+Bn9sj6ORZuyfg7yrIBzc5QpBFnAF"
     129"t/6XEFb68zg7dmlSPPkFIoJwVCAz4xj3XJVTw2OLcc2e8acOq6hsUBmHGMv5LWXn5BmCR/J+/mZBJ"
     130"wZFtTUtqvXGD0bcnOdRvtLqm+sE7afAryD4pkF8nLlR5QuKAMfghaj8ma1oQaQoTa6IoiN2wRB3+7"
     131"CeSi5bbpfNFzS6V8mc8V+0adP0ohxKE9/sMuP+2y2ZAABx5EwUclNjc+bGijCgrwdTIA==";
     132
     133static const char *trustAuthOutgoing =
     134"AQAAAAwAAAAcAQAASuQ+RXJdzAECAAAAAAEAAMOWL6UVfVKiJOUsGcT03H"
     135"jHxr2ACsMMOV5ynM617Tp7idNC+c4egdqk4S9YEpvR2YvHmdZdymL6F7QKm8OkXazYZF2r/gZ/bI+"
     136"jkWbsn4O8qyAc3OUKQRZwBbf+lxBW+vM4O3ZpUjz5BSKCcFQgM+MY91yVU8Nji3HNnvGnDquobFAZ"
     137"hxjL+S1l5+QZgkfyfv5mQScGRbU1Lar1xg9G3JznUb7S6pvrBO2nwK8g+KZBfJy5UeULigDH4IWo/"
     138"JmtaEGkKE2uiKIjdsEQd/uwnkouW26XzRc0ulfJnPFftGnT9KIcShPf7DLj/tstmQAAceRMFHJTY3"
     139"PmxoowoK8HUyBK5D5Fcl3MAQIAAAAAAQAAw5YvpRV9UqIk5SwZxPTceMfGvYAKwww5XnKczrXtOnu"
     140"J00L5zh6B2qThL1gSm9HZi8eZ1l3KYvoXtAqbw6RdrNhkXav+Bn9sj6ORZuyfg7yrIBzc5QpBFnAF"
     141"t/6XEFb68zg7dmlSPPkFIoJwVCAz4xj3XJVTw2OLcc2e8acOq6hsUBmHGMv5LWXn5BmCR/J+/mZBJ"
     142"wZFtTUtqvXGD0bcnOdRvtLqm+sE7afAryD4pkF8nLlR5QuKAMfghaj8ma1oQaQoTa6IoiN2wRB3+7"
     143"CeSi5bbpfNFzS6V8mc8V+0adP0ohxKE9/sMuP+2y2ZAABx5EwUclNjc+bGijCgrwdTIA==";
     144
     145
    118146static bool trust_domain_passwords_check_in(struct torture_context *tctx,
    119147                                            struct trustDomainPasswords *r)
     
    155183        struct torture_suite *suite = torture_suite_create(ctx, "drsblobs");
    156184
    157         torture_suite_add_ndr_pull_fn_test(suite, ForestTrustInfo, forest_trust_info_data_out, NDR_IN, forest_trust_info_check_out);
    158         torture_suite_add_ndr_pull_fn_test(suite, trustDomainPasswords, trust_domain_passwords_in, NDR_IN, trust_domain_passwords_check_in);
     185        torture_suite_add_ndr_pull_test(suite, ForestTrustInfo, forest_trust_info_data_out, forest_trust_info_check_out);
     186        torture_suite_add_ndr_pull_test(suite, trustDomainPasswords, trust_domain_passwords_in, trust_domain_passwords_check_in);
     187
     188#if 0
     189        torture_suite_add_ndr_pullpush_test(suite,
     190                                            trustAuthInOutBlob,
     191                                            base64_decode_data_blob_talloc(suite, trustAuthIncoming),
     192                                            NULL);
     193
     194        torture_suite_add_ndr_pullpush_test(suite,
     195                                            trustAuthInOutBlob,
     196                                            base64_decode_data_blob_talloc(suite, trustAuthOutgoing),
     197                                            NULL);
     198#endif
    159199
    160200        return suite;
  • vendor/current/source4/torture/ndr/nbt.c

    r917 r919  
    6363        struct torture_suite *suite = torture_suite_create(ctx, "nbt");
    6464
    65         torture_suite_add_ndr_pull_fn_test(suite, nbt_netlogon_packet, netlogon_logon_request_req_data, NDR_IN, netlogon_logon_request_req_check);
     65        torture_suite_add_ndr_pull_test(suite, nbt_netlogon_packet, netlogon_logon_request_req_data, netlogon_logon_request_req_check);
    6666
    67         torture_suite_add_ndr_pull_fn_test(suite, nbt_netlogon_response2, netlogon_logon_request_resp_data, NDR_IN, netlogon_logon_request_resp_check);
     67        torture_suite_add_ndr_pull_test(suite, nbt_netlogon_response2, netlogon_logon_request_resp_data, netlogon_logon_request_resp_check);
    6868
    6969        return suite;
  • vendor/current/source4/torture/ndr/ndr.c

    r917 r919  
    3030        size_t struct_size;
    3131        ndr_pull_flags_fn_t pull_fn;
     32        ndr_push_flags_fn_t push_fn;
    3233        int ndr_flags;
     34        int flags;
    3335};
    3436
    35 static bool wrap_ndr_pull_test(struct torture_context *tctx,
    36                                struct torture_tcase *tcase,
    37                                struct torture_test *test)
     37static bool wrap_ndr_pullpush_test(struct torture_context *tctx,
     38                                   struct torture_tcase *tcase,
     39                                   struct torture_test *test)
    3840{
    3941        bool (*check_fn) (struct torture_context *ctx, void *data) = test->fn;
    4042        const struct ndr_pull_test_data *data = (const struct ndr_pull_test_data *)test->data;
    41         void *ds = talloc_zero_size(tctx, data->struct_size);
    4243        struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx);
     44        void *ds = talloc_zero_size(ndr, data->struct_size);
     45        bool ret;
     46        uint32_t highest_ofs;
     47
     48        ndr->flags |= data->flags;
    4349
    4450        ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
     
    4753                                   "pulling");
    4854
    49         torture_assert(tctx, ndr->offset == ndr->data_size,
     55        if (ndr->offset > ndr->relative_highest_offset) {
     56                highest_ofs = ndr->offset;
     57        } else {
     58                highest_ofs = ndr->relative_highest_offset;
     59        }
     60
     61        torture_assert(tctx, highest_ofs == ndr->data_size,
    5062                                   talloc_asprintf(tctx,
    51                                            "%d unread bytes", ndr->data_size - ndr->offset));
    52 
    53         if (check_fn != NULL)
    54                 return check_fn(tctx, ds);
    55         else
    56                 return true;
    57 }
    58 
    59 _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
    60                                         struct torture_suite *suite,
    61                                         const char *name, ndr_pull_flags_fn_t pull_fn,
    62                                         DATA_BLOB db,
    63                                         size_t struct_size,
    64                                         int ndr_flags,
    65                                         bool (*check_fn) (struct torture_context *ctx, void *data))
     63                                           "%d unread bytes", ndr->data_size - highest_ofs));
     64
     65        if (check_fn != NULL) {
     66                ret = check_fn(tctx, ds);
     67        } else {
     68                ret = true;
     69        }
     70
     71        if (data->push_fn != NULL) {
     72                DATA_BLOB outblob;
     73                torture_assert_ndr_success(tctx, ndr_push_struct_blob(&outblob, ndr, ds, data->push_fn), "pushing");
     74                torture_assert_data_blob_equal(tctx, outblob, data->data, "ndr push compare");
     75        }
     76
     77        talloc_free(ndr);
     78        return ret;
     79}
     80
     81_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pullpush_test(
     82        struct torture_suite *suite,
     83        const char *name,
     84        ndr_pull_flags_fn_t pull_fn,
     85        ndr_push_flags_fn_t push_fn,
     86        DATA_BLOB db,
     87        size_t struct_size,
     88        int ndr_flags,
     89        int flags,
     90        bool (*check_fn) (struct torture_context *ctx, void *data))
    6691{
    6792        struct torture_test *test;
     
    75100        test->name = talloc_strdup(test, name);
    76101        test->description = NULL;
    77         test->run = wrap_ndr_pull_test;
     102        test->run = wrap_ndr_pullpush_test;
     103
    78104        data = talloc(test, struct ndr_pull_test_data);
    79105        data->data = db;
    80106        data->ndr_flags = ndr_flags;
     107        data->flags = flags;
    81108        data->struct_size = struct_size;
    82109        data->pull_fn = pull_fn;
     110        data->push_fn = push_fn;
     111
    83112        test->data = data;
    84113        test->fn = check_fn;
     
    89118        return test;
    90119}
     120
    91121
    92122static bool wrap_ndr_inout_pull_test(struct torture_context *tctx,
     
    98128        void *ds = talloc_zero_size(tctx, data->struct_size);
    99129        struct ndr_pull *ndr;
     130        uint32_t highest_ofs;
    100131
    101132        /* handle NDR_IN context */
     
    110141                "ndr pull of context failed");
    111142
    112         torture_assert(tctx, ndr->offset == ndr->data_size,
    113                 talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - ndr->offset));
     143        if (ndr->offset > ndr->relative_highest_offset) {
     144                highest_ofs = ndr->offset;
     145        } else {
     146                highest_ofs = ndr->relative_highest_offset;
     147        }
     148
     149        torture_assert(tctx, highest_ofs == ndr->data_size,
     150                talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - highest_ofs));
    114151
    115152        talloc_free(ndr);
     
    126163                "ndr pull failed");
    127164
    128         torture_assert(tctx, ndr->offset == ndr->data_size,
    129                 talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - ndr->offset));
     165        if (ndr->offset > ndr->relative_highest_offset) {
     166                highest_ofs = ndr->offset;
     167        } else {
     168                highest_ofs = ndr->relative_highest_offset;
     169        }
     170
     171        torture_assert(tctx, highest_ofs == ndr->data_size,
     172                talloc_asprintf(tctx, "%d unread bytes", ndr->data_size - highest_ofs));
    130173
    131174        talloc_free(ndr);
  • vendor/current/source4/torture/ndr/ndr.h

    r917 r919  
    2525#include "libcli/security/security.h"
    2626
    27 _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
     27_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pullpush_test(
    2828                                        struct torture_suite *suite,
    29                                         const char *name, ndr_pull_flags_fn_t fn,
     29                                        const char *name,
     30                                        ndr_pull_flags_fn_t pull_fn,
     31                                        ndr_push_flags_fn_t push_fn,
    3032                                        DATA_BLOB db,
    3133                                        size_t struct_size,
    3234                                        int ndr_flags,
     35                                        int flags,
    3336                                        bool (*check_fn) (struct torture_context *, void *data));
    3437
     
    4245
    4346#define torture_suite_add_ndr_pull_test(suite,name,data,check_fn) \
    44                 _torture_suite_add_ndr_pull_test(suite, #name, \
    45                          (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \
    46                          sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, (bool (*) (struct torture_context *, void *)) check_fn);
     47                _torture_suite_add_ndr_pullpush_test(suite, #name, \
     48                         (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \
     49                         sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, 0, (bool (*) (struct torture_context *, void *)) check_fn);
    4750
    4851#define torture_suite_add_ndr_pull_fn_test(suite,name,data,flags,check_fn) \
    49                 _torture_suite_add_ndr_pull_test(suite, #name "_" #flags, \
    50                          (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \
    51                          sizeof(struct name), flags, (bool (*) (struct torture_context *, void *)) check_fn);
     52                _torture_suite_add_ndr_pullpush_test(suite, #name "_" #flags, \
     53                         (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \
     54                         sizeof(struct name), flags, 0, (bool (*) (struct torture_context *, void *)) check_fn);
     55
     56#define torture_suite_add_ndr_pull_fn_test_flags(suite,name,data,flags,flags2,check_fn) \
     57                _torture_suite_add_ndr_pullpush_test(suite, #name "_" #flags "_" #flags2, \
     58                         (ndr_pull_flags_fn_t)ndr_pull_ ## name, NULL, data_blob_const(data, sizeof(data)), \
     59                         sizeof(struct name), flags, flags2, (bool (*) (struct torture_context *, void *)) check_fn);
     60
     61#define torture_suite_add_ndr_pullpush_test(suite,name,data_blob,check_fn) \
     62                _torture_suite_add_ndr_pullpush_test(suite, #name, \
     63                         (ndr_pull_flags_fn_t)ndr_pull_ ## name, \
     64                         (ndr_push_flags_fn_t)ndr_push_ ## name, \
     65                         data_blob, \
     66                         sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, 0, (bool (*) (struct torture_context *, void *)) check_fn);
    5267
    5368#define torture_suite_add_ndr_pull_io_test(suite,name,data_in,data_out,check_fn_out) \
    5469                _torture_suite_add_ndr_pull_inout_test(suite, #name "_INOUT", \
    5570                         (ndr_pull_flags_fn_t)ndr_pull_ ## name, \
    56                          data_blob_talloc(suite, data_in, sizeof(data_in)), \
    57                          data_blob_talloc(suite, data_out, sizeof(data_out)), \
     71                         data_blob_const(data_in, sizeof(data_in)), \
     72                         data_blob_const(data_out, sizeof(data_out)), \
    5873                         sizeof(struct name), \
    5974                         (bool (*) (struct torture_context *, void *)) check_fn_out);
  • vendor/current/source4/torture/ndr/ntlmssp.c

    r917 r919  
    112112        struct torture_suite *suite = torture_suite_create(ctx, "ntlmssp");
    113113
    114         torture_suite_add_ndr_pull_fn_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, NDR_IN, ntlmssp_NEGOTIATE_MESSAGE_check);
    115         /* torture_suite_add_ndr_pull_fn_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, NDR_IN, ntlmssp_CHALLENGE_MESSAGE_check);
    116         torture_suite_add_ndr_pull_fn_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, NDR_IN, ntlmssp_AUTHENTICATE_MESSAGE_check); */
    117 
     114        torture_suite_add_ndr_pull_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, ntlmssp_NEGOTIATE_MESSAGE_check);
     115#if 0
     116        torture_suite_add_ndr_pull_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, ntlmssp_CHALLENGE_MESSAGE_check);
     117        torture_suite_add_ndr_pull_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, ntlmssp_AUTHENTICATE_MESSAGE_check);
     118#endif
    118119        return suite;
    119120}
  • vendor/current/source4/torture/raw/samba3misc.c

    r917 r919  
    341341        TALLOC_CTX *mem_ctx;
    342342        bool nt_status_support;
     343        bool client_ntlmv2_auth;
    343344
    344345        if (!(mem_ctx = talloc_init("torture_samba3_badpath"))) {
     
    348349
    349350        nt_status_support = lpcfg_nt_status_support(torture->lp_ctx);
    350 
    351         if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes")) {
    352                 printf("Could not set 'nt status support = yes'\n");
    353                 goto fail;
    354         }
     351        client_ntlmv2_auth = lpcfg_client_ntlmv2_auth(torture->lp_ctx);
     352
     353        torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "yes"), ret, fail, "Could not set 'nt status support = yes'\n");
     354        torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "client ntlmv2 auth", "yes"), ret, fail, "Could not set 'client ntlmv2 auth = yes'\n");
    355355
    356356        if (!torture_open_connection(&cli_nt, torture, 0)) {
     
    358358        }
    359359
    360         if (!lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no")) {
    361                 printf("Could not set 'nt status support = yes'\n");
    362                 goto fail;
    363         }
     360        torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support", "no"), ret, fail, "Could not set 'nt status support = no'\n");
     361        torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "client ntlmv2 auth", "no"), ret, fail, "Could not set 'client ntlmv2 auth = no'\n");
    364362
    365363        if (!torture_open_connection(&cli_dos, torture, 1)) {
     
    374372
    375373        smbcli_deltree(cli_nt->tree, dirname);
     374        torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "nt status support",
     375                                                       nt_status_support ? "yes":"no"),
     376                            ret, fail, "Could not set 'nt status support' back to where it was\n");
     377        torture_assert_goto(torture, lpcfg_set_cmdline(torture->lp_ctx, "client ntlmv2 auth",
     378                                                       client_ntlmv2_auth ? "yes":"no"),
     379                            ret, fail, "Could not set 'client ntlmv2 auth' back to where it was\n");
    376380
    377381        status = smbcli_mkdir(cli_nt->tree, dirname);
  • vendor/current/source4/torture/rpc/rpc.c

    r917 r919  
    502502        torture_suite_add_suite(suite, torture_rpc_samr_passwords_badpwdcount(suite));
    503503        torture_suite_add_suite(suite, torture_rpc_samr_passwords_lockout(suite));
     504        torture_suite_add_suite(suite, torture_rpc_samr_passwords_validate(suite));
    504505        torture_suite_add_suite(suite, torture_rpc_samr_user_privileges(suite));
    505506        torture_suite_add_suite(suite, torture_rpc_samr_large_dc(suite));
  • vendor/current/source4/torture/rpc/samba3rpc.c

    r917 r919  
    11231123                names_blob = NTLMv2_generate_names_blob(
    11241124                        mem_ctx,
    1125                         cli_credentials_get_workstation(user_creds),
    1126                         cli_credentials_get_domain(user_creds));
     1125                        cli_credentials_get_workstation(wks_creds),
     1126                        cli_credentials_get_domain(wks_creds));
    11271127                status = cli_credentials_get_ntlm_response(
    11281128                        user_creds, mem_ctx, &flags, chal, names_blob,
  • vendor/current/source4/torture/rpc/samr.c

    r860 r919  
    79397939
    79407940
    7941 static bool test_samr_ValidatePassword(struct dcerpc_pipe *p,
    7942                                        struct torture_context *tctx)
     7941static bool test_samr_ValidatePassword(struct torture_context *tctx,
     7942                                       struct dcerpc_pipe *p)
    79437943{
    79447944        struct samr_ValidatePassword r;
     
    79527952        torture_comment(tctx, "Testing samr_ValidatePassword\n");
    79537953
     7954        if (p->conn->transport.transport != NCACN_IP_TCP) {
     7955                torture_comment(tctx, "samr_ValidatePassword only should succeed over NCACN_IP_TCP!\n");
     7956        }
     7957
    79547958        ZERO_STRUCT(r);
    79557959        r.in.level = NetValidatePasswordReset;
     
    80758079        ret &= test_samr_handle_Close(b, torture, &ctx->handle);
    80768080
    8077         ret &= test_samr_ValidatePassword(p, torture);
    8078 
    80798081        return ret;
    80808082}
     
    83718373}
    83728374
    8373 
     8375struct torture_suite *torture_rpc_samr_passwords_validate(TALLOC_CTX *mem_ctx)
     8376{
     8377        struct torture_suite *suite = torture_suite_create(mem_ctx, "samr.passwords.validate");
     8378        struct torture_rpc_tcase *tcase;
     8379
     8380        tcase = torture_suite_add_rpc_iface_tcase(suite, "samr",
     8381                                                  &ndr_table_samr);
     8382        torture_rpc_tcase_add_test(tcase, "validate",
     8383                                   test_samr_ValidatePassword);
     8384
     8385        return suite;
     8386}
Note: See TracChangeset for help on using the changeset viewer.