1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

672 Commits

Author SHA1 Message Date
Andrew Bartlett
39b8f31d66 s4:dsdb Load objectGUID and extended DN defaultObjectCategory into the schema
The load of defaultObjectCategory as an extended DN means we need to
use the common parsing functions I just split out, rather than the
GET_DS_DN macro.

The objectGUIDs are loaded so that we can create the extended DN when
we load from LDIF (and are loaded for the other cases for
consistency).

Also adapt callers to API changes needed for common parsing code

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Andrew Bartlett
df7546ac16 s4:dsdb/repl Split the 'convert' or 'commit' stages in the DRS import
This will allow us in future to do tests on the LDB values we generate
from the DRS replication.

Andrew Bartlett
2009-11-12 16:34:10 +11:00
Andrew Bartlett
d053584443 s4:vampire Print error message when we fail on the CLDAP ping
Andrew Bartlett
2009-11-12 16:34:08 +11:00
Matthias Dieter Wallnöfer
dae1258acd s4:libnet_passwd - fix pointer type 2009-11-06 22:05:12 +01:00
Kamen Mazdrashki
ba4d87f817 s4/drs: dsdb_map_int2oid() replaced by dsdb_schema_pfm_oid_from_attid()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:43 +01:00
Kamen Mazdrashki
ddab9d1fe7 s4/drs: dsdb_verify_oid_mappings_drsuapi() replaced by dsdb_schema_pfm_contains_drsuapi_pfm()
dsdb_schema_pfm_contains_drsuapi_pfm() is part of reimplemented
prefixMap interface.

This name was choosen to clearly show, that this a week verification
in case we want to determine if remote schema is changed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:42 +01:00
Kamen Mazdrashki
a83385303b s4/drs: dsdb_load_oid_mappings_drsuapi() -> dsdb_load_prefixmap_from_drsuapi()
Also, dsdb_load_oid_mappings_drsuapi() was reimplemented to use
dsdb_schema_pfm_from_drsuapi_pfm() function to load
drsuapi_prefixMap into schema->prefixmap

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:41 +01:00
Andrew Tridgell
3050f83288 s4-python: we need to include Python.h first
If we don't include Python.h first then we get a pile of warnings due
to broken redefines of XOPEN_SOURCE in the Python includes.
2009-10-23 16:23:01 +11:00
Andrew Tridgell
4ad0397d8a s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.

The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
2009-10-23 14:52:17 +11:00
Andrew Tridgell
89ba043c7d s4-libnet: fixed privilege handling in samsync to use the right db
I only noticed this one because of Karolins spelling fix :-)
2009-10-19 20:03:12 +11:00
Karolin Seeger
fa08d0b44b Fix typo.
privilage -> privilege

Karolin
2009-10-19 09:47:33 +02:00
Matthias Dieter Wallnöfer
44df2488e3 s4: fix various warnings (not "const" related ones) 2009-10-02 15:33:48 +02:00
Andrew Tridgell
5c07c7eac2 s4-libnet: give sane error messages when functional levels don't match
It is nice to tell the user why their command failed :-)
2009-10-02 15:09:59 +10:00
Matthias Dieter Wallnöfer
45a237ce88 s4:libnet_become_dc - add checks for valid domain/forest function levels
Add checks to make sure that we join only supported AD domains (we agreed that
those are >= (Windows) 2003 Native per default - this is changeable with the
"ads:function level" option).
Add also checks to make sure that we cannot join domains which have a bigger
function level than our DC capable function level (e.g. a (Windows) 2008 DC
cannot join a (Windows) 2008 R2 domain).
2009-10-02 14:22:01 +10:00
Andrew Tridgell
808585b4fe s4-libnet: fixed debug formatting 2009-09-28 10:25:31 +10:00
Andrew Tridgell
a9188f7e10 s4-libnet: allow the functional level of becomeDC to be specified
Use
   ads:functional level = 4
for DS_DC_FUNCTION_2008_R2

See libds/common/flags.h
2009-09-24 10:34:53 -07:00
Andrew Tridgell
3cd0f9e264 s4-libnet: avoid a steal with references error 2009-09-24 10:33:36 -07:00
Matthias Dieter Wallnöfer
32f4afd617 s4:libnet_become_dc - bump down the level requested by abartlet 2009-09-21 11:59:07 +02:00
Andrew Bartlett
bfddb6816f s4:provision Use code to store domain join in 'net join' as well
This ensures we only have one codepath to store the secret, and
therefore that we have a single choke point for setting the
saltPrincipal, which we were previously skipping.

Andrew Bartlett
2009-09-20 16:29:38 -07:00
Andrew Tridgell
92786aebf1 s4-resolve: fixed a crash bug on timeout
We were creating the name resolution context as a child of lp_ctx,
which meant when we gave up on a connection the timer on name
resolution kept running, and when it timed out the callback crashed as
the socket was already removed.
2009-09-19 08:23:03 -07:00
Matthias Dieter Wallnöfer
4445cdfad2 s4:libnet_become_dc - Fix some uninitialised variables 2009-09-17 18:27:31 +02:00
Matthias Dieter Wallnöfer
0c202e403f s4/domain behaviour flags: Fix them up in various locations
Additional notes:
- Bump the level to Windows Server 2008 R2 (we should support always the latest
  version - if we provision ourself)
- In "descriptor.c" the check for the "domainFunctionality" level shouldn't be
  needed: ACL owner groups (not owner user) are supported since Windows 2000
  Server (first AD edition)
  - I took the argument from: http://support.microsoft.com/kb/329194
2009-09-17 12:40:33 +02:00
Andrew Tridgell
458dda1f15 s4-repl: don't do double replication
When we replicate from a remote DC, we need to note the new uSN that
the local changes have resulted in, and modify the uSN that the notify
task uses to determine if it should send a ReplicaSync message back to
the remote DC. Otherwise we end up always triggering a ReplicaSync
every time we replicate from another DC
2009-09-15 18:45:43 -07:00
Andrew Tridgell
557cc460f2 s4/vampire: fixed i/j index mixup in vampire code 2009-09-10 01:26:34 +10:00
Andrew Tridgell
3cb1caf0ef s4: allow repl:RODC=true/false to set ourselves as a RODC
I think this is what windows DCs use to see that we are read-only, but
I am not sure. Needs more testing.
2009-09-09 12:36:51 +10:00
Andrew Tridgell
9a3db7e331 s4: fixed updaterefs options bitmap 2009-09-08 11:52:45 +10:00
Andrew Tridgell
86f3a2ea09 s4: fixed the secrets.ldb construction in libnet
on a vampire join we were not putting the right attributes and
objectclass on the secrets.ldb record
2009-09-07 10:33:47 +10:00
Andrew Tridgell
7dbe0797b1 show more reasonable object counts during a vampire
We now show the total number of objects we have processed, which gives
the user a better idea of how much has been done. A vampire on a large
domain can take an hour or more (which needs to be fixed btw, it is a
problem with the lack of scalability of the ltdb index code). Watching
the same msg for an hour makes you wonder if any progress is being
made!
2009-09-03 18:36:09 +10:00
Andrew Tridgell
69802b3a3b wrap the entire vampire operation in a transaction
We want to grab the whole database, or none of it.
This is also needed to get linked attributes right
2009-09-02 18:19:55 +10:00
Stefan Metzmacher
ff37d6631c s4:libnet: use talloc_strdup() instead of talloc_reference()
metze
2009-07-31 14:42:03 +02:00
Andrew Bartlett
4e049b0a1c Fix compile of py_net.c 2009-07-28 18:00:46 +10:00
Andrew Bartlett
058cd95c88 s4:libnet Add in a 'credentials' parameter for python libnet_Join 2009-07-28 16:06:05 +10:00
Andrew Bartlett
47a7a2e442 s4:kerberos Add 'net export keytab' command for wireshark decryption
It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
<keytab name>' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett
2009-07-28 08:52:43 +10:00
Stefan Metzmacher
b7c003c09c Revert "s4:kerberos Add 'net export keytab' command for wireshark decryption"
This reverts commit a40ce5d0d9.

This breaks the build...

Andrew, please repush it, when it's fixed:-)

metze
2009-07-27 17:41:11 +02:00
Andrew Bartlett
a40ce5d0d9 s4:kerberos Add 'net export keytab' command for wireshark decryption
It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
<keytab name>' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett
2009-07-27 22:41:42 +10:00
Jelmer Vernooij
28d155499a Add missing includes. 2009-07-19 13:39:38 +02:00
Stefan Metzmacher
722765213b s4:libnet: rename uint => uint32_t because uint is not portable
metze
2009-07-15 20:47:00 +02:00
Günther Deschner
8db45607f8 libds: share UF_ flags between samba3 and 4.
Guenther
2009-07-13 15:36:06 +02:00
Andrew Tridgell
865ca9be64 the settings structure needs to be initialised 2009-07-02 14:55:38 +10:00
Andrew Tridgell
27620c85e7 use a talloc_reparent in a very ugly way
this works around some terrible use of talloc in the libnet code
2009-07-01 15:15:37 +10:00
Andrew Tridgell
0534ae012b use the new talloc_reparent in two places 2009-07-01 15:15:37 +10:00
Andrew Bartlett
58e8db912d s4:libnet Allow 'net password change' to work on expired passwords
We need to pass down flags to the DCE/RPC layer to allow fallback to
anonymous connections, as we can't log in with an expired password.

The anonymous connection can then change the password with SAMR.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Tridgell
4dcc058ea1 fixed the client side password change code
The client side code was not falling back to older routines correctly
as it didn't check for the operation range error appropriately. It
also used the old rpc semantics.
2009-05-25 13:40:52 +10:00
Andrew Bartlett
aa5cee2288 s4:libnet Use str_list_make_single() in resolv code 2009-05-14 05:56:59 +10:00
Andrew Bartlett
5095d7b1c8 Rework Samba4 to use the new common libcli/auth code
In particular, this is the rename from creds_ to netlogon_creds_, as
well as other links to use the new common crypto.

Andrew Bartlett
2009-04-14 16:23:44 +10:00
Andrew Bartlett
df8e1908ef Use common samsync delta decryption functions in libnet_samsync.c
Andrew Bartlett
2009-04-14 16:23:43 +10:00
Andrew Tridgell
9539e2b508 major upgrade to the ldb attribute handling
This is all working towards supporting the full WSPP schema without a
major performance penalty.

We now use binary searches when looking up classes and attributes. We
also avoid the loop loading the attributes into ldb, by adding a hook
to override the ldb attribute search function in a module. The
attributes can thus be loaded once, and then saved as part of the
global schema. 

Also added support for a few more key attribute syntaxes, as needed
for the full schema.
2009-04-02 16:42:21 +11:00
Stefan Metzmacher
c600e8ef42 s4:cldap: rewrite the cldap library based on tsocket
metze
2009-03-19 16:25:59 +01:00
Jelmer Vernooij
94069bd274 s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
Jelmer Vernooij
9ffb6d2d9e Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
2009-03-01 06:33:40 +01:00