summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-03-22 22:27:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:06 -0500
commit5dd94460996568706dbbf9819e58ece4b0b82686 (patch)
tree2d6da9999be390437e48ef29fd2ebc84473d01c4 /source4
parent7de4a5b135daddcbbe21ca11419491dac7c88c6c (diff)
downloadsamba-5dd94460996568706dbbf9819e58ece4b0b82686.tar.gz
samba-5dd94460996568706dbbf9819e58ece4b0b82686.tar.bz2
samba-5dd94460996568706dbbf9819e58ece4b0b82686.zip
r14665: More testing in RPC-SAMR. It looks like we will probably need another
ldb module to handle which flags can be set under what circumstances. Andrew Bartlett (This used to be commit 1d1ff501f2d2b952a4dd80c374c857be0456173c)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/samr.c61
1 files changed, 41 insertions, 20 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index cbe011eeb0..588450e30c 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -355,33 +355,55 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
SAMR_FIELD_LOGON_HOURS);
TEST_USERINFO_INT_EXP(16, acct_flags, 5, acct_flags,
- (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ),
- (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ | user_extra_flags),
- 0);
+ (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ),
+ (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ | user_extra_flags),
+ 0);
TEST_USERINFO_INT_EXP(16, acct_flags, 5, acct_flags,
- (base_acct_flags | ACB_DISABLED),
- (base_acct_flags | ACB_DISABLED | user_extra_flags),
- 0);
+ (base_acct_flags | ACB_DISABLED),
+ (base_acct_flags | ACB_DISABLED | user_extra_flags),
+ 0);
/* Setting PWNOEXP clears the magic ACB_PW_EXPIRED flag */
TEST_USERINFO_INT_EXP(16, acct_flags, 5, acct_flags,
- (base_acct_flags | ACB_DISABLED | ACB_PWNOEXP),
- (base_acct_flags | ACB_DISABLED | ACB_PWNOEXP),
- 0);
+ (base_acct_flags | ACB_DISABLED | ACB_PWNOEXP),
+ (base_acct_flags | ACB_DISABLED | ACB_PWNOEXP),
+ 0);
TEST_USERINFO_INT_EXP(16, acct_flags, 21, acct_flags,
- (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ),
- (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ | user_extra_flags),
- 0);
+ (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ),
+ (base_acct_flags | ACB_DISABLED | ACB_HOMDIRREQ | user_extra_flags),
+ 0);
/* The 'autolock' flag doesn't stick - check this */
TEST_USERINFO_INT_EXP(16, acct_flags, 21, acct_flags,
- (base_acct_flags | ACB_DISABLED | ACB_AUTOLOCK),
- (base_acct_flags | ACB_DISABLED | user_extra_flags),
- 0);
+ (base_acct_flags | ACB_DISABLED | ACB_AUTOLOCK),
+ (base_acct_flags | ACB_DISABLED | user_extra_flags),
+ 0);
+
+ /* The 'store plaintext' flag does stick */
+ TEST_USERINFO_INT_EXP(16, acct_flags, 21, acct_flags,
+ (base_acct_flags | ACB_DISABLED | ACB_ENC_TXT_PWD_ALLOWED),
+ (base_acct_flags | ACB_DISABLED | ACB_ENC_TXT_PWD_ALLOWED | user_extra_flags),
+ 0);
+ /* The 'use DES' flag does stick */
+ TEST_USERINFO_INT_EXP(16, acct_flags, 21, acct_flags,
+ (base_acct_flags | ACB_DISABLED | ACB_USE_DES_KEY_ONLY),
+ (base_acct_flags | ACB_DISABLED | ACB_USE_DES_KEY_ONLY | user_extra_flags),
+ 0);
+ /* The 'don't require kerberos pre-authentication flag does stick */
+ TEST_USERINFO_INT_EXP(16, acct_flags, 21, acct_flags,
+ (base_acct_flags | ACB_DISABLED | ACB_DONT_REQUIRE_PREAUTH),
+ (base_acct_flags | ACB_DISABLED | ACB_DONT_REQUIRE_PREAUTH | user_extra_flags),
+ 0);
+ /* The 'no kerberos PAC required' flag sticks */
+ TEST_USERINFO_INT_EXP(16, acct_flags, 21, acct_flags,
+ (base_acct_flags | ACB_DISABLED | ACB_NO_AUTH_DATA_REQD),
+ (base_acct_flags | ACB_DISABLED | ACB_NO_AUTH_DATA_REQD | user_extra_flags),
+ 0);
+
TEST_USERINFO_INT_EXP(21, acct_flags, 21, acct_flags,
- (base_acct_flags | ACB_DISABLED),
- (base_acct_flags | ACB_DISABLED | user_extra_flags),
- SAMR_FIELD_ACCT_FLAGS);
+ (base_acct_flags | ACB_DISABLED),
+ (base_acct_flags | ACB_DISABLED | user_extra_flags),
+ SAMR_FIELD_ACCT_FLAGS);
#if 0
/* these fail with win2003 - it appears you can't set the primary gid?
@@ -2594,10 +2616,9 @@ static BOOL test_QueryDisplayInfo_continue(struct dcerpc_pipe *p, TALLOC_CTX *me
status = dcerpc_samr_QueryDisplayInfo(p, mem_ctx, &r);
if (NT_STATUS_IS_OK(status) && r.out.returned_size != 0) {
if (r.out.info.info1.entries[0].idx != r.in.start_idx + 1) {
- printf("failed: expected idx %d but got %d\n",
+ printf("expected idx %d but got %d\n",
r.in.start_idx + 1,
r.out.info.info1.entries[0].idx);
- ret = False;
break;
}
}