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

147 Commits

Author SHA1 Message Date
Andrew Bartlett
968bcc4fe8 r8670: Remove GUID code from SAMR, it is handled lower down now. I notice
this code also does string SIDs, but I'm not quite sure where that
fits in.

Andrew Bartlett
2007-10-10 13:29:52 -05:00
Andrew Tridgell
a58ea6b385 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
2007-10-10 13:29:34 -05:00
Stefan Metzmacher
206f33778e r8370: remove the '$' from in the cn: attribute for computer and dc accounts
metze
2007-10-10 13:20:12 -05:00
Stefan Metzmacher
e601042c07 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
2007-10-10 13:19:22 -05:00
Andrew Bartlett
e2015671c2 r7993: Further work on the Krb5 PAC.
We now generate the PAC, and can verifiy both our own PAC and the PAC
from Win2k3.

This commit adds the PAC generation code, spits out the code to get
the information we need from the NETLOGON server back into a auth/
helper function, and adds a number of glue functions.

In the process of building the PAC generation code, some hints in the
Microsoft PAC specification shed light on other parts of the code, and
the updates to samr.idl and netlogon.idl come from those hints.

Also in this commit:

The Heimdal build package has been split up, so as to only link the
KDC with smbd, not the client utils.

To enable the PAC to be veified with gensec_krb5 (which isn't quite
dead yet), the keyblock has been passed back to the calling layer.

Andrew Bartlett
2007-10-10 13:18:57 -05:00
Andrew Tridgell
d40bc2fa8d r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
2007-10-10 13:18:44 -05:00
Simo Sorce
a614466dec r7582: Better way to have a fast path searching for a specific DN.
Old way was ugly and had a bug, you couldn't add an attribute named
dn or distinguishedName and search for it, tdb would change that search in a dn search.
This makes it also possible to search by dn against an ldap server as the old method was
not supported by ldap syntaxes.

sss
2007-10-10 13:18:11 -05:00
Andrew Tridgell
9e428881f6 r7507: fixed the problem with users being shown too many times in acl
editors, and added a test for it.
2007-10-10 13:18:02 -05:00
Andrew Bartlett
d9c31e60a7 r6544: Use common structures between SAMR, NETLGON and the Krb5 PAC.
Fill out the group list for the SamLogon reply, so clients get the
supplementary groups.

Andrew Bartlett
2007-10-10 13:16:24 -05:00
Simo Sorce
4f0948dab0 r6470: Remove ldb_search_free() it is not needed anymore.
Just use talloc_free() to release the memory after an ldb_search().
2007-10-10 13:11:40 -05:00
Tim Potter
63dfa9b806 r6325: Rename aliasname -> alias_name in CreateDomAlias function. 2007-10-10 13:11:32 -05:00
Simo Sorce
fb9afcaf53 r6084: - Introduce the samldb module dependency on samba4
- This module will take care of properly filling an user or group object
  with required fields. You just need to provide the dn and the objectclass
  and a user/group get created

  Simo.
2007-10-10 13:11:18 -05:00
Andrew Bartlett
e13c671619 r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
2007-10-10 13:11:12 -05:00
Andrew Bartlett
7822101cb5 r5879: Rename SAMR_FIELD_WORKSTATION to SAMR_FIELD_WORKSTATIONS - it is a list.
Andrew Bartlett
2007-10-10 13:11:06 -05:00
Andrew Bartlett
fd748f9d2f r5783: Test renaming of accounts in the RPC-SAMR test, and add support into
the SAMR server.

Andrew Bartlett
2007-10-10 13:11:03 -05:00
Tim Potter
6749b9404d r5364: Rename string fields called 'domain' and 'name' to be 'domain_name'. 2007-10-10 13:09:46 -05:00
Andrew Tridgell
196c45b834 r5309: removed ads.h from includes.h 2007-10-10 13:09:40 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
7607ddda3f r5080: patch from ronnie to make our samr IDL a little more consistent 2007-10-10 13:09:20 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Tridgell
e9dff03f79 r4745: remove the distinguishedName attribute adds from samr. See the
discussion on samba-technical about this.
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
29bc75ba28 r4715: alwys add the distinguishedName attribute
the w2k3 dc join needs that

metze
2007-10-10 13:08:47 -05:00
Andrew Bartlett
51e94fa26c r4703: Add support for EnumTrustDomain, and expand the testsuite.
Add my copyright to the SAMR server.

Andrew Bartlett
2007-10-10 13:08:45 -05:00
Andrew Bartlett
271c8faadf r4698: - Initial implementation of trusted domains in LSA.
- Use templates for Secrets and the new trusted domains

 - Auto-add modifiedTime, createdTime and objectGUID to records in the
   samdb layer.

Andrew Bartlett
2007-10-10 13:08:44 -05:00
Andrew Bartlett
5569db0f94 r4680: Make more efficient use of memory in SAMR:
Avoid a strdup, use a talloc_reference
 Use the shortest term memory context possible

Andrew Bartlett
2007-10-10 13:08:42 -05:00
Andrew Tridgell
fde042b3fc r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:

 - simplifies the dcerpc_handle handling, and all the callers of it

 - split out the context_id depenent state into a linked list of established contexts

 - fixed some talloc handling in several rpc servers that i noticed while doing the above
2007-10-10 13:08:38 -05:00
Andrew Tridgell
202470326d r4490: when implementing one rpc server call in terms of another call, you
must zero r.out before making the 2nd call if the 2nd call has any
non-ref out parameters. This is needed for the case where the 2nd call
fails, and the 1st call would then fill in its out fields based on
uninitialised memory.
2007-10-10 13:08:12 -05:00
Andrew Tridgell
1a4713bfd0 r4475: fixed smbd to work with the small changes in the ldb API (the most important
change was in the ldb_msg_add_*() routines, which now use the msg as a context,
and thus it needs to be a talloc ptr)
2007-10-10 13:07:55 -05:00
Volker Lendecke
04cf580ef3 r4417: Reply to samr_QueryDomainInfo with the same static value as level2 does.
Volker
2007-10-10 13:07:46 -05:00
Volker Lendecke
83d180c732 r4415: Implement samr_RemoveMemberFromForeignDomain. This is needed to delete a user
with usrmgr.exe.

To fix: Remove domain group membership attrib values when a user is deleted.

Volker
2007-10-10 13:07:46 -05:00
Volker Lendecke
cdec896113 r4414: Various bits&pieces:
* Implement samr_search_domain, filter out all elements with no "objectSid"
  attribute and all objects outside a specified domain sid.

* Minor cleanups in dcerpc_samr.c due to that.

* Implement srvsvc_NetSrvGetInfo level 100. A quick hack to get usrmgr.exe
  one step further.

* Same for samr_info_DomInfo1.

Volker
2007-10-10 13:07:46 -05:00
Volker Lendecke
9c62a239cd r4399: Implement samr_GetAliasMembership and samr_GetGroupsForUser. With these two,
usrmgr.exe seems to become usable. Some quirks, but it's worth a try.

Volker
2007-10-10 13:07:43 -05:00
Volker Lendecke
ae3c329e9d r4393: Trivial bugfix for a silly bug 2007-10-10 13:07:42 -05:00
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