1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

288 Commits

Author SHA1 Message Date
Günther Deschner
10d72781fd s4-smbtorture: verify each password change via samlogon in SAMR-PASSWORDS-PWDLASTSET test.
Guenther
2009-01-06 16:03:54 +01:00
Jelmer Vernooij
dcc4081f75 Fix more compiler warnings. 2008-12-23 23:22:57 +01:00
Matthias Dieter Wallnöfer
6e4cc12604 s4-samr: Fix Bug #5946. userparameters handling in torture test.
Signed-off-by: Günther Deschner <gd@samba.org>
2008-12-10 00:07:25 +01:00
Günther Deschner
f29d31a7e0 s4-smbtorture: do full level 18, 21, 23, 24, 25, 26 testing in pwdlastset test.
Guenther
2008-12-05 16:29:04 +01:00
Günther Deschner
c0b67b4aa6 s4-smbtorture: add support for level 18 and 21 in test_SetUserPass_level_ex.
Guenther
2008-12-05 16:28:57 +01:00
Günther Deschner
97c3ae12cf s4-smbtorture: more tests for RPC-SAMR-PASSWORDS-PWDLASTSET.
Guenther
2008-12-05 16:28:50 +01:00
Günther Deschner
b514da4afd s4-smbtorture: add test for setting passwords via samr_UserInfo21.
Guenther
2008-12-05 16:03:08 +01:00
Günther Deschner
985d9b1099 s4-smbtorture: add test for setting passwords via samr_UserInfo18.
Guenther
2008-12-05 16:03:04 +01:00
Günther Deschner
58102a366b s4-smbtorture: fix build of samr test (bad git merge).
Guenther
2008-12-05 15:48:47 +01:00
Günther Deschner
4bcf8edcf8 s4-samr: fix samr callers after SAMR_FIELD_PASSWORD change.
Guenther
2008-12-05 14:27:03 +01:00
Günther Deschner
1cf5c154aa s4-smbtorture: add some more testcases to pwdlastset test.
Guenther
2008-11-28 22:06:41 +01:00
Günther Deschner
fd2a15fa78 s4-smbtorture: fix RPC-SAMR-PASSWORDS-PWDLASTSET with samba3 option.
Guenther
2008-11-28 22:06:32 +01:00
Günther Deschner
4b687944f3 s4-smbtorture: allow to disable full testing of all possible opcode combinations.
Guenther
2008-11-28 14:09:26 +01:00
Günther Deschner
465466e1af s4-smbtorture: move test to SAMR-PASSWORDS-PWDLASTSET.
Guenther
2008-11-28 14:09:18 +01:00
Günther Deschner
89ad20789c s4-smbtorture: add test for samr password_expired flag while setting passwords.
Guenther
2008-11-28 14:09:10 +01:00
Günther Deschner
bd95b6b416 s4-smbtorture: add test_SetUserPass_level_ex.
Guenther
2008-11-28 14:08:14 +01:00
Günther Deschner
206375c8cf s4-smbtorture: add samr_rand_pass_silent.
Guenther
2008-11-28 14:08:03 +01:00
Günther Deschner
296fae7561 s4-samr: fix samr passwdord_expired callers.
Guenther
2008-11-28 13:55:49 +01:00
Günther Deschner
09998ab89d s4-samr: merge samr_QueryUserInfo{2} from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:31 +01:00
Günther Deschner
15e011564a s4-samr: merge samr_QueryGroupInfo from s3 idl. (fixme python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
0548642e5b s4-samr: merge samr_QueryAliasInfo from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
99c2fac6b2 s4-samr: merge samr_EnumDomainGroups from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
1ea97d76ed s4-samr: merge samr_EnumDomainUsers from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
d4d9a73ad1 s4-samr: merge samr_EnumDomains from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
bb1d7684d2 s4-samr: merge samr_LookupDomain from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
61391d0ade s4-samr: merge samr_LookupNames from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
2efec54b8d s4-samr: merge samr_EnumDomainAliases from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
aaca059a35 s4-samr: merge samr_QueryDisplayInfo from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
3a9b42fa75 s4-samr: merge samr_QueryDisplayInfo2 from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
bab255f09b s4-samr: merge samr_QueryDisplayInfo3 from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
68a2ca11dc s4-samr: merge samr_GetGroupsForUser from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
f20dd953ef s4-samr: merge samr_QueryDomainInfo2 from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
f7dfea32fc s4-samr: merge samr_QueryDomainInfo from s3 idl. (fixme python)
Guenther
2008-11-10 21:46:29 +01:00
Günther Deschner
9774927947 s4-samr: merge samr_QueryGroupMember from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:28 +01:00
Günther Deschner
a2a26da899 s4-samr: merge samr_Connect5 from s3 idl. (fixme python)
Guenther
2008-11-10 21:46:28 +01:00
Günther Deschner
88ff1be036 s4-samr: merge samr_GetBootKeyInformation from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:28 +01:00
Günther Deschner
8f1559c350 s4-samr: merge samr_GetDomPwInfo from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:28 +01:00
Günther Deschner
f42f1ae5a8 s4-samr: merge samr_GetUserPwInfo from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:27 +01:00
Günther Deschner
94b7db1fb4 s4-samr: merge samr_RidToSid from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:27 +01:00
Günther Deschner
5ce30d0f4d s4-samr: merge samr_QuerySecurity from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:27 +01:00
Günther Deschner
93c6129c99 s4-samr: merge samr_LookupRids from s3 idl.
Guenther
2008-11-10 21:46:27 +01:00
Günther Deschner
41776e1091 s4-samr: merge samr_GetDisplayEnumerationIndex2 from s3 idl.
Guenther
2008-11-10 21:46:27 +01:00
Günther Deschner
5ae9ec3d4b s4-samr: merge samr_GetDisplayEnumerationIndex from s3 idl.
Guenther
2008-11-10 21:46:27 +01:00
Günther Deschner
e0a6e3b23b s4-samr: merge samr_ChangePasswordUser3 from s3 idl.
Guenther
2008-11-10 21:46:26 +01:00
Günther Deschner
7f58bba558 s4-samr: fix tests for binary parameter string.
Guenther
2008-11-10 21:46:26 +01:00
Günther Deschner
89fac8c1b6 s4-smbtorture: fix some obvious copy-paste errors.
Guenther
2008-11-04 19:55:07 +01:00
Jelmer Vernooij
634e3df024 samba4.rpc.samr: Use torture API in a couple more places. 2008-10-31 16:09:29 +01:00
Jelmer Vernooij
0e79895e2b samba4.rpc.samr: Use more torture API functions 2008-10-31 15:24:24 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Andrew Bartlett
85919c34f4 Improve RPC-SAMR tests to check random passwords
By random I don't mean 'nice stream of ASCII chars, but pure random
passwords containing invalid UTF16 sequences etc.

Andrew Bartlett
2008-10-17 13:00:24 +11:00
Günther Deschner
11ecd5acfd s4: merge from s3 samr.idl.
Guenther
2008-10-15 17:42:33 +02:00
Jelmer Vernooij
6925202bde Move source4/lib/crypto to lib/crypto. 2008-09-24 15:30:23 +02:00
Andrew Bartlett
d626a26374 Rename structures to better match the names in the WSPP IDL.
The 'comment' element in a number of domain structures is called
oem_information.  This was picked up actually because with OpenLDAP
doing the schema checking, it noticed that 'comment' was not a valid
attribute.

The rename tries to keep this consistant in both the LDB mappings and
IDL, so we don't make the same mistake in future.

This has no real schema impact, as this value isn't actually used for
anything, as 'comment' was not used in the provision.

Andrew Bartlett
(This used to be commit 65dc0d5365)
2008-07-21 13:42:07 +10:00
Andrew Bartlett
9a6422b695 Rework our SAMR test and SAMR server.
Now that we don't create users/domain groups/aliases in the builtin
domain, we hit some bugs in the server-side implementation of the
enumeration functions.

In essence, it turns out to be: don't treat 0 as a special case.

Also, fix up the PDC name to always be returned.  I'm sure nothing
actually uses it, particularly for BUILTIN...

Andrew Bartlett
(This used to be commit 353bb79f56)
2008-03-14 12:26:03 +11:00
Andrew Bartlett
5043215f21 Generate ACB_PW_EXPIRED correctly
More correctly handle expired passwords, and do not expire machine accounts.

Test that the behaviour is consistant with windows, using the RPC-SAMR test.

Change NETLOGON to directly query the userAccountControl, just because
we don't want to do the extra expiry processing here.

Andrew Bartlett
(This used to be commit acda1f69bc)
2008-02-28 08:50:00 +11:00
Kai Blin
43ac3d9b44 r26453: Janitorial: Don't use a static char[] in smb_readline_replacement.
Fix up callers to free the memory returned, as that is needed if we use the
original readline function as well.
(This used to be commit c81ead1c38)
2007-12-21 05:50:18 +01:00
Jelmer Vernooij
43696d2752 r26252: Specify loadparm_context explicitly when creating sessions.
(This used to be commit 7280c1e941)
2007-12-21 05:47:29 +01:00
Jelmer Vernooij
ab69eb8d89 r26250: Avoid global_loadparm in a couple more places.
(This used to be commit 2c6b755309)
2007-12-21 05:47:28 +01:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Jelmer Vernooij
60a1046c5c r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9)
2007-10-10 15:07:31 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Andrew Bartlett
839e17019f r24972: Try to rat out this SAMR failure with some more cross-tests, and
format checks.

Andrew Bartlett
(This used to be commit 33deecbfc3)
2007-10-10 15:03:43 -05:00
Andrew Bartlett
2d95d73887 r24971: Test more combinations for resetting the account expiry.
Andrew Bartlett
(This used to be commit 8844f4796c)
2007-10-10 15:03:42 -05:00
Andrew Bartlett
466bd44a46 r24942: Patch from Matthias Wallnöfer <mwallnoefer@yahoo.de> and a testsuite
to prove it is correct.

This should fix bug #4824: User Manager for Domains - Account Expires.

Thanks!

Andrew Bartlett
(This used to be commit e5f0744d62)
2007-10-10 15:03:41 -05:00
Andrew Bartlett
d7f84b51f9 r24611: Following up on the re-opening of bug 4817 is it pretty clear that
machine accounts are not subject to password policy in Win2k3 R2 (at
least in terms of password quality).

In testing this, I found that Win2k3 R2 has changed the way the old
ChangePassword RPC call is handled - the 'cross-checks' between new LM
and NT passwords are not required.

Andrew Bartlett
(This used to be commit 417ea885b4)
2007-10-10 15:02:23 -05:00
Stefan Metzmacher
f14bd1a90a r24557: rename 'dcerpc_table_' -> 'ndr_table_'
metze
(This used to be commit 84651aee81)
2007-10-10 15:02:15 -05:00
Andrew Bartlett
50a66a2e81 r24083: Don't fail the test (looking for the user in the enum) if we didn't
create the user in the first place.

Andrew Bartlett
(This used to be commit db0f81734d)
2007-10-10 15:01:24 -05:00
Andrew Bartlett
97859bc760 r24081: Domain Controllers are also shown in this enumeration.
Andrew Bartlett
(This used to be commit 3e332ff771)
2007-10-10 15:01:23 -05:00
Andrew Bartlett
008b840760 r24080: Set the primary group (matching windows) when creating new users in
SAMR.  This can't be done in the ldb templates code, as it doesn't
happen over direct LDAP.

As noted in bug #4829.

Andrew Bartlett
(This used to be commit 3bfa6dbf7d)
2007-10-10 15:01:23 -05:00
Andrew Bartlett
fe60cd993d r24059: Fix bug 4822 reported by Matthias Wallnöfer <mwallnoefer@yahoo.de>.
Any SAMR client (usrmgr.exe in this case) that attempted to set a
property to a zero length string found instead the the old value was
kept.

In fixing this, rework the macros to be cleaner (add the
always-present .string) to every macro, and remove the use of the
samdb_modify() and samdb_replace() wrappers where possible.

Andrew Bartlett
(This used to be commit b05fe69304)
2007-10-10 15:01:20 -05:00
Andrew Bartlett
41ab04e37c r24053: Ensure we filter EnumDomainUsers with the supplied mask.
Should fix another part (list of domains in usrmgr incorrectly
including accounts) of bug #4815 by mwallnoefer@yahoo.de.

Andrew Bartlett
(This used to be commit 7f7e4fe298)
2007-10-10 15:01:19 -05:00
Andrew Bartlett
32d55960b5 r24052: Fix some of the NT4 usrmgr.exe portions of bug 4815.
- The icons in usermgr were incorrect, because the acct_flags were
   not filled in (due to missing attribute in ldb query)

 - The Full name was missing, and the description used as the full
   name (due to missing attributes in ldb query and incorrect IDL)

To prove the correctness of these fixes, I added a substantial new
test to RPC-SAMR-USERS, to ensure cross-consistancy between
QueryDisplayInfo and QueryUserInfo on each user.

This showed that for some reason, we must add ACB_NORMAL to the
acct_flags on level 2 queries (for machine trust accounts)...

Getting this right is important, because Samba3's RPC winbind methods
uses these queries.

Andrew Bartlett
(This used to be commit 9475d94a61)
2007-10-10 15:01:19 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Bartlett
c74ad3546c r23365: Try to make Windows Vista join again. On my new test environment, it
wants to check for an existing domain join account, and fails.  This
test shows that we need to return NT_STATUS_NONE_MAPPED when nothing
matches.  (not yet tested if this helps vista).

Andrew Bartlett
(This used to be commit 7f3671bf11)
2007-10-10 14:53:12 -05:00
Andrew Bartlett
aeaa440932 r21727: Walk some more of the error branches in the ChangePasswordUser server.
Andrew
(This used to be commit c1ee06703a)
2007-10-10 14:49:18 -05:00
Andrew Bartlett
3e1dd63927 r21719: Try to cover more of the server-side password processing.
Don't just exit the test with 'return True', actually process the result.

Turn off password complexity checking for the password length test.

Andrew Bartlett
(This used to be commit 1a7635baa7)
2007-10-10 14:49:17 -05:00
Andrew Bartlett
099a3a7f52 r21697: Try to cover the 'bad session key' codepaths too.
Andrew Bartlett
(This used to be commit 33cfe1ca22)
2007-10-10 14:49:14 -05:00
Andrew Bartlett
d471e52d23 r20149: Remove the smb.conf distinction between PDC and BDC. Now the correct
way to setup a Samba4 DC is to set 'server role = domain controller'.

We use the fSMORoleOwner attribute in the base DN to determine the PDC.

This patch is quite large, as I have corrected a number of places that
assumed taht we are always the PDC, or that used the smb.conf
lp_server_role() to determine that.

Also included is a warning fix in the SAMR code, where the IDL has
seperated a couple of types for group display enumeration.

We also now use the ldb database to determine if we should run the
global catalog service.

In the near future, I will complete the DRSUAPI
DsGetDomainControllerInfo server-side on the same basis.

Andrew Bartlett
(This used to be commit 67d8365e83)
2007-10-10 14:29:15 -05:00
Jelmer Vernooij
ef9e094d84 r19843: Fix warning.
(This used to be commit 38067c1adf)
2007-10-10 14:28:23 -05:00
Jelmer Vernooij
a39f239cb2 r19392: Use torture_setting_* rather than lp_parm_* where possible.
(This used to be commit b28860978f)
2007-10-10 14:21:24 -05:00
Rafal Szczesniak
c7090e6669 r19380: forgot to add home drive testing as well as home directory...
rafal
(This used to be commit 732c22071e)
2007-10-10 14:21:21 -05:00
Rafal Szczesniak
8fd1ca82d8 r19379: add testing home directory field to the samr tests.
rafal
(This used to be commit 4dfd1d5027)
2007-10-10 14:21:21 -05:00
Stefan Metzmacher
ead672ea09 r18800: fix a write behind the buffer bug...
Thanks Herb for finding this:-)

This was my bug, I typed it in on gd's laptop and he just run 'svn ci'

metze
(This used to be commit 3c08e29f4f)
2007-10-10 14:19:12 -05:00
Günther Deschner
da94f9ffd9 r18782: Do not send random data to the password change (although that reveals
interesting new password set tests), make sure to send valid characters.

Guenther
(This used to be commit f193c5347c)
2007-10-10 14:19:11 -05:00
Günther Deschner
13b3421d96 r18759: Do not use "simple" as test password as pointed out by Andrew Bartlett.
Thanks metze.

Guenther
(This used to be commit ea313d5565)
2007-10-10 14:19:08 -05:00
Günther Deschner
dfddcf65a9 r18751: Check for samr reject codes and their particular order.
Guenther
(This used to be commit 8f9ab07e78)
2007-10-10 14:19:07 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Andrew Bartlett
0f215e9947 r16860: Fix (and reactivate) the RPC-SAMR test. We need to allow these sids
to be created as foreign, even if they are in a local domain.

Also we do need the user to exist for the life of the test, as we add
it to a group.

Andrew Bartlett
(This used to be commit ae470ff701)
2007-10-10 14:09:54 -05:00
Andrew Bartlett
5768d1298f r16851: Put a clue in as to which domain might have failed, due to the length
of this test.

Andrew Bartlett
(This used to be commit b4d75f01d9)
2007-10-10 14:09:53 -05:00
Andrew Bartlett
ba968d6684 r16847: Add the parts of the SAMR test that pass back into 'make test'.
I still need to figure out what causes the rest to fail...

Andrew Bartlett
(This used to be commit aa34bd46cb)
2007-10-10 14:09:53 -05:00
Andrew Bartlett
3aa8a700e6 r16826: Ensure we don't segfault if the remote server fails to set a password
in RPC-SAMR test.

Andrew Bartlett
(This used to be commit 08ec74d620)
2007-10-10 14:09:47 -05:00
Andrew Bartlett
3c9281f014 r16794: Make Samba4 pass it's own RPC-SAMR test, at least in part. There are
still a couple of unimplemented functions, but this is far better than
not testing this at all.  In particular, this exercises the
password_hash module.

Specific changes:
 - Add support for SetDomainInfo
 - Add many more info levels to QueryDomainInfo
 - Set a domain comment in RPC-SAMR, and verify it is kept
 - Refactor QueryUserInfo not to always serach for all attributes
 - Add QueryDiplayInfo3 and QueryDomainInfo2 as aliased calls
 - Make OemChangePassword2 search under the samdb_base_dn(), so it
   finds the user when partitions are active.
 - Skip SetSecurity, DisplayIndex, MemberAttributesOfGroup and
  'Multiple' alias operations in RPC-SAMR for Samba4
 - Add RPC-SAMR as a 'slow' RPC test (it is quite slow)

Andrew Bartlett
(This used to be commit 01d25c9d6c)
2007-10-10 14:09:46 -05:00
Andrew Bartlett
23f8579e8a r16770: Get closer to having Samba4 pass some of the RPC-SAMR test, by
skipping some checks.

These should be removed, and the code fixed, but currently we are
loosing quality because the test isn't run by default.

Andrew Bartlett
(This used to be commit 1306f60c97)
2007-10-10 14:09:44 -05:00
Jelmer Vernooij
582d46ec42 r16304: Improve testing UI API. This now allows registering the full
test suite tree, looks a bit more like other unit testing API's,
fixes some memory responsibility issues, introduces testcases,
and removes the need for tests to call torture_ok().
(This used to be commit 0445b1a56a)
2007-10-10 14:09:09 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3)
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce291)
2007-10-10 13:59:13 -05:00
Andrew Bartlett
5dd9446099 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 1d1ff501f2)
2007-10-10 13:59:06 -05:00
Jelmer Vernooij
4f1c8daa36 r14470: Remove some unnecessary headers.
(This used to be commit f7312dab3b)
2007-10-10 13:57:29 -05:00