1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00
Commit Graph

96 Commits

Author SHA1 Message Date
Andrew Bartlett
3759128bd3 r3074: Add in a new 'field present' flag samr.idl for the Account Flags
field.  Add torture test for setting this feild - including all the
odd cases (not all the flags 'stick', and not others cannot be
removed).

Seperate the two 'password change' flags, and test them both in the
torture code.

Check that the password did change after every password set call.

Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Tridgell
aad0e7e9d8 r2910: I noticed that the samr torture test was doing its own DOS->UNIX
string conversion. For RPC, all string conversions are supposed to be
done by the NDR layer, using string flags set in the IDL. The reason
this wasn't working is that I had been too lazy to do the STR_ASCII
string types properly at the NDR layer when initially writing
ndr_basic.c.

This commit fixes the ndr_basic code properly to do all ASCII
varients, by re-using the non-ascii code and a "byte_mul" local
variable. I have also removed the manual string conversion in the SAMR
torture test code.
2007-10-10 12:59:47 -05:00
Andrew Tridgell
db1ed5675a r2833: - added a call to SamrQueryGroupMember for every group, and fix the
IDL so this works (the previous IDL was bogus)

- changed a hyper to uint64 after looking at output on cascade on sparc
2007-10-10 12:59:37 -05:00
Andrew Tridgell
e14ee428ec r2710: continue with the new style of providing a parent context whenever
possible to a structure creation routine. This makes for much easier
global cleanup.
2007-10-10 12:59:25 -05:00
Andrew Tridgell
f31e5d56e3 r2676: add a test of the reference counting logic in the SAMR server into the
RPC-SAMR torture test. This closes the samr connection before working
on a open domain handle. The server is supposed to know that the open
domain handle still holds a reference to the connection, so the
connection remains valid even though it has been closed.
2007-10-10 12:59:20 -05:00
Andrew Bartlett
4904d814c0 r2547: Another place to use convert_string_talloc().
Andrew Bartlett
2007-10-10 12:59:05 -05:00
Tim Potter
90a9e754db r2501: The AddMemberToAlias test doesn't need a domain_handle. 2007-10-10 12:58:59 -05:00
Tim Potter
a0e571a9dd r2489: Rename account_flags in EnumDomainAliases() to acct_flags. 2007-10-10 12:58:57 -05:00
Tim Potter
32f0f3154a r2458: Rename policy handle parameters for the SAMR pipe. Parameters now
have the handle type implied by the parameter name.  There are four
types of handle: connect, domain, user and group handles.  The
various samr_Connect functions return a connect handle, and the
samr_OpenFoo functions return a foo handle.

There is one exception - the samr_{Get,Set}Security function can
take any type of handle.

Fix up all C callers.
2007-10-10 12:58:55 -05:00
Andrew Tridgell
bdb49f01b7 r2273: disable the async samr tests unless -X option is used, as windows
fails this and it kills the pipe, so we can't run the rest of the test
2007-10-10 12:58:36 -05:00
Andrew Tridgell
306eb84865 r2107: added a SAMR async test - this one seems to work 2007-10-10 12:58:25 -05:00
Simo Sorce
606caddeb9 r1758: Move and enhance the add_string_to_array function as per volker job on trunk 2007-10-10 12:57:54 -05:00
Andrew Tridgell
bcad9efd72 r1646: disable testing of group rename in the RPC-SAMR test, as it leaves the
group in a state where it can't be deleted via samr, which breaks
repeated runs of the test.
2007-10-10 12:57:46 -05:00
Andrew Tridgell
fb5796b0dc r1510: add a commented out routine I used to test password change on NT3. 2007-10-10 12:57:36 -05:00
Andrew Bartlett
b97d3cb2ef r1498: (merge from 3.0)
Rework our random number generation system.

On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

This also requires that we start the secrets subsystem, as that is
where the reseed value is stored, for systems without /dev/urandom.

In order to aviod identical streams in forked children, the random
state is re-initialised after the fork(), at the same point were we do
that to the tdbs.

Andrew Bartlett
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
f65cba9047 r1062: fix typo, found by valgrind
metze
2007-10-10 12:56:36 -05:00
Andrew Bartlett
4e35418c27 r1025: Rename (across the samr and netlogon pipes, so far)
pwd -> password
passwd -> password

username -> account_name

Also work on consistant structure feild names between these two pipes,
and fix up some callers to use samr_Password for the netlogon
credential code.

Andrew Bartlett
2007-10-10 12:56:30 -05:00
Andrew Bartlett
49d545a820 r1009: Make all users of NT and LM passwords use the samr_Password structure.
This includes the netlogon pipe, for the machine account password
change system.

Andrew Bartlett
2007-10-10 12:56:26 -05:00
Andrew Tridgell
729b2f41c9 r995: - renamed many of our crypto routines to use the industry standard
names rather than our crazy naming scheme. So DES is now called
  des_crypt() rather than smbhash()

- added the code from the solution of the ADS crypto challenge that
  allows Samba to correctly handle a 128 bit session key in all of the
  netr_ServerAuthenticateX() varients. A huge thanks to Luke Howard
  from PADL for solving this one!

- restructured the server side rpc authentication to allow for other
  than NTLMSSP sign and seal. This commit just adds the structure, the
  next commit will add schannel server side support.

- added 128 bit session key support to our client side code, and
  testing against w2k3 with smbtorture. Works well.
2007-10-10 12:56:25 -05:00
Volker Lendecke
74e59c4560 r963: Tridge, according to ethereal this is an 'Acct Ctrl' field. My tests also
indicate this although I could not find any consistent pattern.

I found this as 'net rpc group list local' in Samba3 sets this to 250 and only
gets a fixed, but incomplete list of groups out of W2k3.

I tried to correlate the results I got from w2k3 with the LDAP contents of the
corresponding entries, but I could not find anything. Ethereal only decodes
the lower byte, but to get all it seems necessary to have 0xffff here.

If you have time, could you might want to spend some of it decoding the bits
for SAMR completeness....

Volker
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
b5378803fd r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
2007-10-10 12:56:21 -05:00
Andrew Tridgell
ae5a5113fb r937: - added a simple QuerySecurity implementation in samr server
- moved some sec desc defines into misc.idl

 - fixed pw_len field in UserInfo26

 - made some pipes available on TCP

 - added netr_DsrEnumerateDomainTrusts() to netlogon

 - added templates for remaining netlogon IDL calls (from ethereal)

 - added a unistr_noterm vs unistr error detector in ndr basic decoder

 - added torture test for netr_DsrEnumerateDomainTrusts()
2007-10-10 12:56:20 -05:00
Andrew Tridgell
0a2c6a1062 r917: - added the start of a LSA server to samba4.
- added start of QueryDomainInfo in samr server

"net rpc info" from samba3 now works against a samba4 server. I
suspect join will work fairly soon.
2007-10-10 12:56:19 -05:00
Andrew Tridgell
0009660997 r902: added torture tests for sending rubbish in the domain name field of GetDomPwInfo 2007-10-10 12:56:19 -05:00
Stefan Metzmacher
2986c5f08c r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
af6f1f8a01 r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
0e5517d937 r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
2007-10-10 12:56:15 -05:00
Andrew Tridgell
9a9244a1c6 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
2007-10-10 12:56:14 -05:00
Andrew Bartlett
94624e519b r743: Start on a NETLOGON server in Samba4.
Currently this only authentiates the machine, not real users.

As a consequence of running the Samba4 NETLOGON test against Samba4, I
found a number of issues in the SAMR server, which I have addressed.
There are more templates in the provison.ldif for this reason.

I also added some debug to our credentials code, and fixed some bugs
in the auth_sam module.

The static buffer in generate_random_string() bit me badly, so I
removed it in favor of a talloc based system.

Andrew Bartlett
2007-10-10 12:53:46 -05:00
Andrew Tridgell
cb070b9084 r623: setUserInfo level 24 (password set) now works in the SAMR server. This includes all
of the password complexity, password history and other password restrictions.
2007-10-10 12:51:55 -05:00
Volker Lendecke
945d747860 r615: Implement samr_OpenGroup, samr_QueryGroupInfo, samr_SetGroupInfo,
samr_DeleteDomainGroup.

I've added the hidden attribute numMembers that must be maintained by
Add/DelGroupMember for the GroupInfoAll query.

Volker
2007-10-10 12:51:52 -05:00
Andrew Bartlett
a04b074c04 r613: Fix the RPC-SAMR torture test, for my session_key changes.
Andrew Bartlett
2007-10-10 12:51:51 -05:00
Andrew Tridgell
e3b31625f4 r577: extended the LookupNames test to check for correct handling of unmapped names 2007-10-10 12:51:48 -05:00
Andrew Tridgell
0f25031114 r457: added some more samr tests to help me work out the right error codes
in our new samr server
2007-10-10 12:51:43 -05:00
Andrew Tridgell
d49f7a6a0d r420: added nicer names for the field bits in userinfo21
added tests for the level 23 and 25 password change methods
2007-10-10 12:51:37 -05:00
Andrew Tridgell
891653e7d4 r389: added a test for set user info level 26 (set password extended)
thanks to Luke Howard for this test
2007-10-10 12:51:37 -05:00
Andrew Tridgell
feac996794 r372: automatically create a fake BDC machine account and delete it
afterwards for the RPC-NETLOGON test. This makes it much simpler to
run the test and also means that it doesn't distrurb any existing
domain join you might have.
2007-10-10 12:51:35 -05:00
Andrew Tridgell
4b4f025504 r365: improved the IDL for samr_Connect5() 2007-10-10 12:51:35 -05:00
Andrew Tridgell
0221566cf5 r364: finally worked out the ancient samr_ChangePasswordUser() interface
yay!
2007-10-10 12:51:35 -05:00
Andrew Tridgell
b2ebaf95b7 r362: after setting domain info query it again so we can see what attributes stick 2007-10-10 12:51:35 -05:00
Andrew Tridgell
84de0b7e58 r336: added a -X command line option to smbtorture to enable dangerous or
possibly destructive tests. Use with care!

Added IDL and test code for samr_Shutdown() and samr_SetDsrmPassword()
2007-10-10 12:51:33 -05:00
Andrew Tridgell
925bc2622c r335: added much better handling of servers that die unexpectedly during a
request (a dead socket). I discovered this when testing against Sun's
PC-NetLink.

cleaned up the naming of some of the samr requests

add IDL and test code for samr_QueryGroupMember(),
samr_SetMemberAttributesOfGroup() and samr_Shutdown().  (actually, I
didn't leave the samr_Shutdown() test in, as its fatal to windows
servers due to doing exactly what it says it does).
2007-10-10 12:51:33 -05:00
Andrew Tridgell
d06ed158f9 r326: tweaks to the RPC-SAMR test code to allow win2003 to pass the test (for example, not filling in extra
fields in level21 setuserinfo)
2007-10-10 12:51:33 -05:00
Andrew Tridgell
67ae0b2a98 r325: added IDL and test code for samr_ChangePasswordUser3().
Also added much better handling of random password generation in the
password change test code
2007-10-10 12:51:32 -05:00
Andrew Tridgell
118b6fc292 r307: added IDL and test code for samr_GetDomPwInfo(), samr_SetUserInfo2(),
samr_GetBootKeyInformation() and samr_Connect3()

also added some stub IDL for samr_SetBootKeyInformation() although I
don't yet have working test code. This one is tricky, as if you get it
wrong then the target system won't boot any more :)
2007-10-10 12:51:20 -05:00
Andrew Tridgell
051efa2abf r305: - added IDL and test code for samr_RidToSid()
- completed the IDL and test code for the various set user password
  mechanisms in samr. Three password mechanisms are now working, the
  UserInfo24 method, the OemChangePasswordUser2() method (which only
  sets the LM password) and the ChangePasswordUser2() method which sets
  both the LM and NT passwords.

- updated some crypto routines to support the password change tests
2007-10-10 12:51:19 -05:00
Andrew Tridgell
849d0d314a r275: added IDL and test code for samr_QueryDisplayInfo3(),
samr_AddMultipleMembersToAlias(),
samr_RemoveMultipleMembersFromAlias(), samr_OemChangePasswordUser2(),
and samr_ChangePasswordUser2()

The password change functions don't actually work yet (but should
soon). At this stage I have just completed the IDL for them. Next step
is to get the hash verifiers right and the torture test should be able
to do password changes.
2007-10-10 12:51:19 -05:00
Andrew Tridgell
fddda52500 r268: added IDL and test code for samr_QueryDomainInfo2(),
samr_QueryUserInfo2(), samr_QueryDisplayInfo2() and
samr_GetDisplayEnumerationIndex2()
2007-10-10 12:51:18 -05:00
Andrew Tridgell
53c6670887 r267: added IDL and test code for samr_ChangePasswordUser(),
samr_GetDisplayEnumerationIndex(), samr_TestPrivateFunctionsDomain(),
samr_TestPrivateFunctionsUser() and samr_RemoveMemberFromForeignDomain()
2007-10-10 12:51:18 -05:00
Andrew Tridgell
747351140b r259: added samr_DeleteGroupMember() IDL and test code 2007-10-10 12:51:18 -05:00