Ignore:
Timestamp:
Nov 29, 2012, 2:06:31 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.9 2nd part

Location:
trunk/server
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/torture/ndr/ndr.c

    r745 r752  
    351351        torture_suite_add_suite(suite, ndr_drsuapi_suite(suite));
    352352        torture_suite_add_suite(suite, ndr_spoolss_suite(suite));
     353        torture_suite_add_suite(suite, ndr_ntprinting_suite(suite));
    353354        torture_suite_add_suite(suite, ndr_samr_suite(suite));
    354355        torture_suite_add_suite(suite, ndr_drsblobs_suite(suite));
  • trunk/server/source4/torture/ndr/ndr.h

    r745 r752  
    4444                _torture_suite_add_ndr_pull_test(suite, #name, \
    4545                         (ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \
    46                          sizeof(struct name), 0, (bool (*) (struct torture_context *, void *)) check_fn);
     46                         sizeof(struct name), NDR_SCALARS|NDR_BUFFERS, (bool (*) (struct torture_context *, void *)) check_fn);
    4747
    4848#define torture_suite_add_ndr_pull_fn_test(suite,name,data,flags,check_fn) \
  • trunk/server/source4/torture/ndr/samr.c

    r745 r752  
    278278};
    279279
     280static const uint8_t samr_changepassworduser3_w2k8r2_out_data[] = {
     281        0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
     282        0x00, 0x80, 0xa6, 0x0a, 0xff, 0xde, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
     283        0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00,
     284        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0xc0
     285};
     286
     287static bool samr_changepassworduser3_w2k8r2_out_check(struct torture_context *tctx,
     288                                                      struct samr_ChangePasswordUser3 *r)
     289{
     290        struct samr_DomInfo1 *dominfo = *r->out.dominfo;
     291        struct userPwdChangeFailureInformation *reject = *r->out.reject;
     292
     293        torture_assert_int_equal(tctx, dominfo->min_password_length, 7, "min_password_length");
     294        torture_assert_int_equal(tctx, dominfo->password_history_length, 0, "password_history_length");
     295        torture_assert_int_equal(tctx, dominfo->password_properties, DOMAIN_PASSWORD_COMPLEX, "password_properties");
     296        torture_assert_u64_equal(tctx, dominfo->max_password_age, 0xffffdeff0aa68000, "max_password_age");
     297        torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000, "min_password_age");
     298
     299        torture_assert_int_equal(tctx, reject->extendedFailureReason, SAM_PWD_CHANGE_NOT_COMPLEX, "extendedFailureReason");
     300        torture_assert_int_equal(tctx, reject->filterModuleName.length, 0, "filterModuleName.length");
     301        torture_assert_int_equal(tctx, reject->filterModuleName.size, 0, "filterModuleName.size");
     302
     303        torture_assert_ntstatus_equal(tctx, r->out.result, NT_STATUS_PASSWORD_RESTRICTION, "result");
     304
     305        return true;
     306}
     307
    280308struct torture_suite *ndr_samr_suite(TALLOC_CTX *ctx)
    281309{
     
    314342        torture_suite_add_ndr_pull_fn_test(suite, samr_ChangePasswordUser3, samr_changepassworduser3_w2k_out_data, NDR_OUT, NULL);
    315343#endif
     344        torture_suite_add_ndr_pull_fn_test(suite,
     345                                           samr_ChangePasswordUser3,
     346                                           samr_changepassworduser3_w2k8r2_out_data,
     347                                           NDR_OUT,
     348                                           samr_changepassworduser3_w2k8r2_out_check);
     349
    316350        return suite;
    317351}
Note: See TracChangeset for help on using the changeset viewer.