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

103 Commits

Author SHA1 Message Date
Andrew Tridgell
876a6eecc3 r918: - dcerpc endpoint name are case insensitive
this fix allows samba3 to join a samba4 domain using "net rpc join"
2007-10-10 12:56:19 -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
41f9b144f9 r904: - fixed account expiry testing in auth_sam
- added printf style format attribute checking to samdb varargs fns

- fix nt_time_to_unix() for zero and -1 times
2007-10-10 12:56:19 -05:00
Andrew Tridgell
8feeecf303 r903: used samdb_result_passwords() in samr_ChangePasswordUser2() and fix the error handling on a bad change.
With this change WinXP can now successfully change the password on a
Samba4 server via SAMR. After the change you can't login because the
handling of much_change_time seems to be broken in the auth code, but
that should be easy to fix.
2007-10-10 12:56:19 -05:00
Andrew Tridgell
e128bcca56 r901: w2k3 completely ignores the domain name argument to GetDomPwInfo,
always returning the info for the primary domain. I noticed this
because WinXP sends the wrong information in this field (it sends
\\server_name) and gets away with it
2007-10-10 12:56:19 -05:00
Andrew Tridgell
965748cbee r897: - user/group creation needs to create unique names across both the
Builtin and local domain, as some calls (notably password change
  calls) don't specify a domain name, they just specifiy an account
  name.

- added the remaining password set levels to SetUserInfo in the samr
  server. We now support all of the password set and change levels
  that we know about in SAMR.
2007-10-10 12:56:18 -05:00
Andrew Tridgell
b5324a4b80 r896: - use andrews samdb_result_passwords() for the remaining password change mechanisms
- added samr_ChangePasswordUser2() (just a subset of samr_ChangePasswordUser3)
2007-10-10 12:56:18 -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
c75b763f41 r879: fixed a typo in the password fetch wrapper 2007-10-10 12:56:15 -05:00
Andrew Bartlett
399e2e2b11 r874: This patch is a pile of work on NTLMSSP:
Samba's NTLMSSP code is now fully talloc based, which should go a long
way to cleaning up the memory leaks in this code.  This also avoids a
lot of extra copies of data, as we now allocate the 'return' blobs on
a caller-supplied context.

I have also been doing a lot of work towards NTLM2 signing and
sealing.  I have this working for sealing, but not for the verifier
(MD5 integrity check on the stream) which is still incorrect.

(I can aim a rpcecho sinkdata from a Win2k3 box to my server, and the
data arrives intact, but the signature check fails.  It does however
match the test values I have...).

The new torture test is cludged in - when we get a unit test suite
back, I'll happliy put it in the 'right' place....

Andrew Bartlett
2007-10-10 12:56:14 -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 Tridgell
2fdf33c6e5 r871: add a comment about how samdb_set_password() works 2007-10-10 12:56:14 -05:00
Andrew Tridgell
abe90bc7ba r870: we should issue a rpc fault OP_RANGE_ERROR not a WERR_NOT_SUPPORTED for
functions we don't implement yet so that we don't put uninitialised
result data on the wire (found with valgrind)
2007-10-10 12:56:14 -05:00
Andrew Tridgell
2712e26a5d r868: we should issue a rpc fault OP_RANGE_ERROR not a WERR_NOT_SUPPORTED for
functions we don't implement yet so that we don't put uninitialised
result data on the wire (found with valgrind)
2007-10-10 12:56:14 -05:00
Stefan Metzmacher
7fffc124e3 r846: convert DCESRV subsystem to a config.mk file
metze
2007-10-10 12:53:54 -05:00
Andrew Tridgell
2ba7ff824c r839: password set/change in the samr server is complex enough that it
deserves its own C module
2007-10-10 12:53:54 -05:00
Andrew Bartlett
7c69a85984 r816: - Make use of tridge's new samdb_result_sid_prefix() helper function.
- Remove legacy sid_to_string (which contained a memleak)

 - Remove some unused parts of lib/util_sid.c

Andrew Bartlett
2007-10-10 12:53:52 -05:00
Andrew Tridgell
255d6e77e7 r812: added a new samdb_replace() call that simplifies the code in the main samr server a bit. 2007-10-10 12:53:51 -05:00
Andrew Tridgell
24bbf9f1bc r796: fixed samr_OemChangePasswordUser2() to replace attributes, not add 2007-10-10 12:53:51 -05:00
Andrew Tridgell
c1a65f83f6 r793: - don't make templates members of any class that would make them show
up in searches like "objectclass=user"

 - auto-add the computer objectclass for computer accounts on create

 - added two types of password change call in samr server

 - reset last_fault_code before each dcerpc call
2007-10-10 12:53:51 -05:00
Simo Sorce
c0c1596dbd r789: we return wrong number of entries 2007-10-10 12:53:50 -05:00
Stefan Metzmacher
4bfecf337b r758: just move the util file to the additional object file list
metze
2007-10-10 12:53:49 -05:00
Andrew Bartlett
f9f581b580 r754: Implement the SetPassword operation on the netlogon pipe.
This involves allowing the password set code in samdb to take an
already hashed password, and some fixes to our torture code.

Andrew Bartlett
2007-10-10 12:53:48 -05:00
Andrew Bartlett
b886cb65f8 r745: Move netr_ServerPasswordSet up with the other secure channel
management functions, and make sure to include the fault until this is
no longer a stub.

Andrew Bartlett
2007-10-10 12:53:46 -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
Stefan Metzmacher
c78a2ddb28 r665: merge over the new build system from my tmp branch
to the main SAMBA_4_0 tree.

NOTE: that it's not completely ready, but it's functional:-)

metze
2007-10-10 12:53:36 -05:00
Stefan Metzmacher
c39e450702 r649: return unknown interface when the client not yet
binds succesful to an interface

metze
2007-10-10 12:51:56 -05:00
Stefan Metzmacher
81b94718e4 r626: make the code a bit more readable
metze
2007-10-10 12:51:56 -05:00
Andrew Tridgell
6c3f22a685 r625: - handle passwords longer than length 14 (thanks to abartlet for pointing out the bug)
- delete unicodePwd if not storing a plaintext password
2007-10-10 12:51:56 -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 Tridgell
0250f5d6aa r608: - a couple of very minor fixes to the CreateGroup code
- added samr_GetUserPwInfo() samr server call
2007-10-10 12:51:51 -05:00
Volker Lendecke
59241c0c9a r605: Implement CreateDomainGroup, essentially cut&paste from CreateUser2.
Volker
2007-10-10 12:51:50 -05:00
Andrew Tridgell
ec0a51898f r601: added the server code for all the samr_SetUserInfo and samr_QueryUserInfo levels except for the password
set levels.

This means that a large part of the RPC-SAMR torture test now runs correctly against Samba4
2007-10-10 12:51:50 -05:00
Andrew Tridgell
defaf0d817 r596: log all ldb searches at level 4 in samdb 2007-10-10 12:51:49 -05:00
Andrew Tridgell
994baba7eb r595: nicer handling on max_size multiplier 2007-10-10 12:51:49 -05:00
Andrew Tridgell
e0db9659a8 r587: added server code for samr_EnumDomainUsers, and started adding
samr_SetUserInfo and samr_QueryUserInfo
2007-10-10 12:51:48 -05:00
Andrew Tridgell
10b6e0011b r578: initial server side implementation of samr_CreateUser(),
samr_CreateUser2(), samr_LookupNames(), samr_OpenUser(),
and samr_DeleteUser()

this uses a user template in the SAM db, of objectclass "userTemplate"
and dn CN=TemplateUser,CN=Templates,$BASEDN. Using a template allows
an admin to add any default user attributes that they might want to
the user template and all new users will receive those attributes.
2007-10-10 12:51:48 -05:00
Andrew Tridgell
b1cd98188d r514: added a context pointer to the samdb interface, as suggested by
metze. Also added a reference count so that a client can close the
connection handle and still used a derived domain handle.
2007-10-10 12:51:46 -05:00
Andrew Tridgell
74b89d5f96 r513: added a generic ldb debug system to allow the Samba debug functions to
be cleanly interfaced to ldb
2007-10-10 12:51:46 -05:00
Andrew Tridgell
a3edd4bca8 r510: converted the samdb code to give ldb a talloc context rather than letting ldb use malloc 2007-10-10 12:51:46 -05:00
Andrew Tridgell
bba0044a51 r466: implemented samr_OpenDomain() and samr_GetDomPwInfo() server side calls
if you take a look at samr_GetDomPwInfo() then you will get a fairly good idea
of what I am planning for the database oriented SAMR server implementation.
2007-10-10 12:51:44 -05:00
Andrew Tridgell
d96b68169a r465: we need common.h in two more rpc server pipes 2007-10-10 12:51:44 -05:00
Andrew Tridgell
a4df5c7cf8 r464: a big improvement to the API for writing server-side RPC
servers. Previously the server pipe code needed to return the RPC
level status (nearly always "OK") and separately set the function call
return using r->out.result. All the programmers writing servers
(metze, jelmer and me) were often getting this wrong, by doing things
like "return NT_STATUS_NO_MEMORY" which was really quite meaningless
as there is no code like that at the dcerpc level.

I have now modified pidl to generate the necessary boilerplate so that
just returning the status you want from the function will work. So for
a NTSTATUS function you return NT_STATUS_XXX and from a WERROR
function you return WERR_XXX. If you really want to generate a DCERPC
level fault rather than just a return value in your function then you
should use the DCESRV_FAULT() macro which will correctly generate a
fault for you.

As a side effect, this also adds automatic type checking of all of our
server side rpc functions, which was impossible with the old API. When
I changed the API I found and fixed quite a few functions with the
wrong type information, so this is definately useful.

I have also changed the server side template generation to generate a
DCERPC "operation range error" by default when you have not yet filled
in a server side function. This allows us to correctly implement
functions in any order in our rpc pipe servers and give the client the
right information about the fault.
2007-10-10 12:51:44 -05:00
Andrew Tridgell
e2002e40a5 r458: this is the (very primitive) beginnings of a SAMR server for
Samba4. I'm committing this now so I can get comments on the approach.

Note that you need to do something like this to initialise the SAM db:

 edit script/provision.pl
 script/provision.pl > provision.ldif.out
 bin/ldbadd /path/to/private/sam.ldb provision.ldif.out
2007-10-10 12:51:44 -05:00
Andrew Tridgell
f3799e7720 r445: fixed the bind_nak code 2007-10-10 12:51:42 -05:00
Andrew Tridgell
62f59d1180 r441: added an example of how to use the remote rpc interface 2007-10-10 12:51:42 -05:00
Stefan Metzmacher
3e911db7c2 r424: let this code compile on every machine hopefully
metze
2007-10-10 12:51:37 -05:00