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

164 Commits

Author SHA1 Message Date
Volker Lendecke
9e27a83ac3 r4381: Add my copyright 2007-10-10 13:07:40 -05:00
Volker Lendecke
26d21bb5cc r4380: Implement samr_QueryDisplayInfo. This probably needs some polishing (Do we
have to sort the entries?)

Volker
2007-10-10 13:07:40 -05:00
Volker Lendecke
c95d20cd7c r4378: Implement samr_EnumDomainGroups and samr_EnumDomainAliases.
Hmmm. How do I tell ldb not to descend into cn=Builtin?

Volker
2007-10-10 13:07:40 -05:00
Volker Lendecke
78802720ae r4376: Implement samr_AddAliasMember, samr_DeleteAliasMember and
samr_GetMembersInAlias.

Volker
2007-10-10 13:07:40 -05:00
Volker Lendecke
d70e237190 r4375: Implement samr_OpenAlias, samr_QueryAliasInfo and samr_SetAliasInfo. Fix IDL
for samr_SetAliasInfo.

Volker
2007-10-10 13:07:39 -05:00
Volker Lendecke
b8fa5b9419 r4374: Follow metzes hint, change LookupRids a bit 2007-10-10 13:07:39 -05:00
Volker Lendecke
1bab3254f6 r4372: Implement samr_LookupRids 2007-10-10 13:07:39 -05:00
Volker Lendecke
43581c3711 r4367: Implement samr_AddGroupMember, samr_DeleteGroupMember and
samr_QueryGroupMember.

Volker
2007-10-10 13:07:39 -05:00
Volker Lendecke
79ec28ade8 r4344: Unify memory handling in dcerpc_samr.c a bit 2007-10-10 13:07:36 -05:00
Volker Lendecke
c0fa7a92d9 r4335: Fix some potential memleaks, implement CreateDomAlias. Hmmmm. Isn't there
enough stuff to do in 3_0??? ;-)

Volker
2007-10-10 13:07:35 -05:00
Volker Lendecke
8f2b9c9d32 r4332: Fix a potential memleak.
Volker
2007-10-10 13:07:35 -05:00
Stefan Metzmacher
f75c2004a0 r4320: fix locations of new trusting domains and domsin controller
computer accounts

metze
2007-10-10 13:07:34 -05:00
Andrew Bartlett
39ae5e1dac r3885: Add security descriptor comparison to our RPC-SAMSYNC test. We now
verify that the security descriptor found in the SamSync is the same
as what is available over SAMR.

Unfortunately, the administrator seems unable to retrieve the SACL on
the security descriptor, so I've added a new function to compare with
a mask.

Andrew Bartlett
2007-10-10 13:06:01 -05:00
Andrew Bartlett
90398fda41 r3807: Cross-check the basic attributes for groups and aliases in RPC-SAMSYNC.
Andrew Bartlett
2007-10-10 13:05:56 -05:00
Andrew Bartlett
3f52fa3a42 r3804: Add more comparison tests in RPC-SAMSYNC.
This compares values for the domain and for secrets.  We still have
some problems we need to sort out for secrets.

Also rename a number of structures in samr.idl and netlogon.idl, to
better express their consistancy.

Andrew Bartlett
2007-10-10 13:05:55 -05:00
Stefan Metzmacher
4839ea156f r3788: give new accounts and groups a objectGUID
metze
2007-10-10 13:05:53 -05:00
Stefan Metzmacher
f5ee40d6ce r3783: - don't use make proto for ldb anymore
- split ldh.h out of samba's includes.h

- make ldb_context and ldb_module private to the subsystem

- use ltdb_ prefix for all ldb_tdb functions

metze
2007-10-10 13:05:52 -05:00
Andrew Bartlett
9cd666bcfb r3724: Rename a number of structures, for better consistance between SAMR and
NETLOGON.

In particular, rename samr_Name to samr_String - given that many
strings in this pipe are not 'names', the previous was just confusing.
(I look forward to PIDL turning these into simple char * some day...).

Also export out a few changes from testjoin.c to allow for how I have
written the new RPC-SAMSYNC test.

Andrew Bartlett
2007-10-10 13:05:47 -05:00
Andrew Tridgell
729e0026e4 r3468: split out dcerpc_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
7b7477ac42 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
2007-10-10 13:05:13 -05:00
Andrew Tridgell
264ce91810 r3447: more include/system/XXX.h include files 2007-10-10 13:05:12 -05:00
Andrew Tridgell
b8f5fa8ac8 r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
2007-10-10 13:05:09 -05:00
Andrew Bartlett
5f2295a5fb r3080: Make the Samba4 SAMR server pass the new, nasty torture test (now that
SAMR_FIELD_PASSWORD has been split up).

Andrew Bartlett
2007-10-10 13:01:57 -05:00
Andrew Bartlett
51774a9bca r3077: Add initial handling of Account Flags in SAMR user info level 21 and 25.
Andrew Bartlett
2007-10-10 13:01:56 -05:00
Andrew Tridgell
dc53150861 r2675: added a convenience function
void *talloc_reference(const void *context, const void *ptr);

this function makes a secondary reference to ptr, and hangs it off the
given context. This greatly simplifies some of the current reference
counting code in the samr server and I suspect it will be widely used
in other places too.

the way you use it is like this:

	domain_state->connect_state = talloc_reference(domain_state, connect_state);

that makes the element connect_state of domain_state a secondary
reference to connect_state. The connect_state structure will then only
be freed when both domain_state and the original connect_state go
away, allowing you to free them independently and in any order.

you could do this alrady using a talloc destructor, and that is what
the samr server did previously, but that meant this construct was
being reinvented in several places. So this convenience function sets
up the destructor for you, giving a much more convenient and less
error prone API.
2007-10-10 12:59:20 -05:00
Andrew Tridgell
26da45a801 r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation 2007-10-10 12:59:14 -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
Tim Potter
6c1a72c5d6 r2247: talloc_destroy -> talloc_free 2007-10-10 12:58:34 -05:00
Andrew Tridgell
da60987a92 r2051: switched the samdb over to using the new destructor and reference
count features of talloc, instead of re-implementing both those
features inside of samdb (which is what we did before).

This makes samdb considerably simpler, and also fixes some bugs, as I
found some error paths that didn't call samdb_close(). Those are now
handled by the fact that a talloc_free() will auto-close and destroy
the samdb context, using a destructor.
2007-10-10 12:58:21 -05:00
Andrew Tridgell
e35bb094c5 r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
2007-10-10 12:58:14 -05:00
Stefan Metzmacher
80851e6778 r1335: NT_STATUS_INTERNAL_DB_CORRUPTION
should cause DEBUG(0,(...));

metze
2007-10-10 12:56:50 -05:00
Stefan Metzmacher
d3b80fd40a r1235: as the pidl code init all output data.
we should do it manualy too.

metze
2007-10-10 12:56:46 -05:00
Andrew Bartlett
0d2ae66d3a r1028: More consistancy fixes, which should also fix the build.
Andrew Bartlett
2007-10-10 12:56:30 -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
Stefan Metzmacher
e21f8a3430 r1013: WE NEED ALWAYS TO INIT THE OUTPUT VARS!
in rpc server code!

add missing ZERO_STRUCT(r->out.info);
in samr_GetDomPwInfo

metze
2007-10-10 12:56:26 -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
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
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 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 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
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
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
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