diff options
author | Günther Deschner <gd@samba.org> | 2009-05-07 21:47:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-05-08 00:42:21 +0200 |
commit | 41cb06fba7126c79fe536321f2dc461e87e83076 (patch) | |
tree | 8dfab609bbf728355b391f653069f4fe979a686d | |
parent | 6aca5fca8dd73ff33cfac5000480520def04e7fa (diff) | |
download | samba-41cb06fba7126c79fe536321f2dc461e87e83076.tar.gz samba-41cb06fba7126c79fe536321f2dc461e87e83076.tar.bz2 samba-41cb06fba7126c79fe536321f2dc461e87e83076.zip |
s4-smbtorture: prepare for running RPC-SAMR-USERS against samba3.
In Samba 3 there are no pdb calls to store comments, codepages and countrycodes
(yet).
Guenther
-rw-r--r-- | source4/torture/rpc/samr.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 9483ae2a9a..2820014873 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -321,10 +321,13 @@ static bool test_SetUserInfo(struct dcerpc_pipe *p, struct torture_context *tctx q0.in.level = 12; do { TESTCALL(QueryUserInfo, q0) } while (0); - TEST_USERINFO_STRING(2, comment, 1, comment, "xx2-1 comment", 0); - TEST_USERINFO_STRING(2, comment, 21, comment, "xx2-21 comment", 0); - TEST_USERINFO_STRING(21, comment, 21, comment, "xx21-21 comment", - SAMR_FIELD_COMMENT); + /* Samba 3 cannot store comment fields atm. - gd */ + if (!torture_setting_bool(tctx, "samba3", false)) { + TEST_USERINFO_STRING(2, comment, 1, comment, "xx2-1 comment", 0); + TEST_USERINFO_STRING(2, comment, 21, comment, "xx2-21 comment", 0); + TEST_USERINFO_STRING(21, comment, 21, comment, "xx21-21 comment", + SAMR_FIELD_COMMENT); + } test_account_name = talloc_asprintf(tctx, "%sxx7-1", base_account_name); TEST_USERINFO_STRING(7, account_name, 1, account_name, base_account_name, 0); @@ -420,18 +423,21 @@ static bool test_SetUserInfo(struct dcerpc_pipe *p, struct torture_context *tctx TEST_USERINFO_BINARYSTRING(21, parameters, 20, parameters, "", SAMR_FIELD_PARAMETERS); - TEST_USERINFO_INT(2, country_code, 2, country_code, __LINE__, 0); - TEST_USERINFO_INT(2, country_code, 21, country_code, __LINE__, 0); - TEST_USERINFO_INT(21, country_code, 21, country_code, __LINE__, - SAMR_FIELD_COUNTRY_CODE); - TEST_USERINFO_INT(21, country_code, 2, country_code, __LINE__, - SAMR_FIELD_COUNTRY_CODE); + /* Samba 3 cannot store country_code and copy_page atm. - gd */ + if (!torture_setting_bool(tctx, "samba3", false)) { + TEST_USERINFO_INT(2, country_code, 2, country_code, __LINE__, 0); + TEST_USERINFO_INT(2, country_code, 21, country_code, __LINE__, 0); + TEST_USERINFO_INT(21, country_code, 21, country_code, __LINE__, + SAMR_FIELD_COUNTRY_CODE); + TEST_USERINFO_INT(21, country_code, 2, country_code, __LINE__, + SAMR_FIELD_COUNTRY_CODE); - TEST_USERINFO_INT(2, code_page, 21, code_page, __LINE__, 0); - TEST_USERINFO_INT(21, code_page, 21, code_page, __LINE__, - SAMR_FIELD_CODE_PAGE); - TEST_USERINFO_INT(21, code_page, 2, code_page, __LINE__, - SAMR_FIELD_CODE_PAGE); + TEST_USERINFO_INT(2, code_page, 21, code_page, __LINE__, 0); + TEST_USERINFO_INT(21, code_page, 21, code_page, __LINE__, + SAMR_FIELD_CODE_PAGE); + TEST_USERINFO_INT(21, code_page, 2, code_page, __LINE__, + SAMR_FIELD_CODE_PAGE); + } TEST_USERINFO_INT(17, acct_expiry, 21, acct_expiry, __LINE__, 0); TEST_USERINFO_INT(17, acct_expiry, 5, acct_expiry, __LINE__, 0); @@ -5655,7 +5661,9 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct torture_context *tctx, switch (which_ops) { case TORTURE_SAMR_USER_ATTRIBUTES: case TORTURE_SAMR_PASSWORDS: - ret &= test_CreateUser2(p, tctx, &domain_handle, sid, which_ops, NULL); + if (!torture_setting_bool(tctx, "samba3", false)) { + ret &= test_CreateUser2(p, tctx, &domain_handle, sid, which_ops, NULL); + } ret &= test_CreateUser(p, tctx, &domain_handle, &user_handle, sid, which_ops, NULL); /* This test needs 'complex' users to validate */ ret &= test_QueryDisplayInfo(p, tctx, &domain_handle); |