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

25366 Commits

Author SHA1 Message Date
Andrew Tridgell
d738a0448d s4-ldb: better error message when we try to register a module twice
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-08 11:13:28 +11:00
Andrew Tridgell
cc5e231355 s4-pydrs: validate the DsGetNCChanges response
check that object_count matches up with first_object
2010-11-08 11:13:28 +11:00
Andrew Tridgell
e59bf5efb5 s4-join: modify join behaviour according to domain level
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Nov  7 23:32:16 UTC 2010 on sn-devel-104
2010-11-07 23:32:16 +00:00
Andrew Tridgell
fc5fecb0b7 s4-drs: allow override of the replica_flags 2010-11-07 22:50:05 +00:00
Andrew Tridgell
18085b1236 s4-dsdb: give the DN on a shema attribute failure 2010-11-07 22:50:05 +00:00
Matthias Dieter Wallnöfer
9ba7ce6acf s4:ldap.py - add more "objectGUID" related tests
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 21:12:03 UTC 2010 on sn-devel-104
2010-11-07 21:12:03 +00:00
Matthias Dieter Wallnöfer
225f102106 s4:objectguid LDB module - fix typo in output message 2010-11-07 21:30:16 +01:00
Matthias Dieter Wallnöfer
2c76be76d5 s4:objectguid LDB module - objectGUIDs cannot be specified on add operations 2010-11-07 21:30:16 +01:00
Matthias Dieter Wallnöfer
c89bc8394d s4:upgradeprovision - remove some "recalculate_sd" uses
We need "recalculate_sd" only when no external "nTSecurityDescriptor" change
is performed. Otherwise the recalculation is performed automatically.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 18:52:42 UTC 2010 on sn-devel-104
2010-11-07 18:52:42 +00:00
Matthias Dieter Wallnöfer
9057e603cf s4:descriptor LDB module - make the "nTSecurityDescriptor" attribute fully behave as in AD
- fix crash when provided "nTSecurityDescriptor" attribute is empty
- print out the correct error codes if it's provided multi-valued
- simplify the "recalculate_sd" control handling
2010-11-07 19:09:29 +01:00
Matthias Dieter Wallnöfer
786a76720c s4:ldb_modules/util.c - "dsdb_get_single_valued_attr" - support the attribute fetch also on LDB add operations
We've to completely ignore the flags in that case.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 11:10:23 UTC 2010 on sn-devel-104
2010-11-07 11:10:23 +00:00
Matthias Dieter Wallnöfer
d6d5f80348 ldb:ldb_pack.c - the "dn" attribute isn't allowed in the message part, only the "distinguishedName" one
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 10:11:02 UTC 2010 on sn-devel-104
2010-11-07 10:11:02 +00:00
Matthias Dieter Wallnöfer
dbf747b6ff s4:torture/dssync.c - remove unused variable 2010-11-07 10:27:24 +01:00
Matthias Dieter Wallnöfer
7813fc4a0e s4:descriptor LDB module - save a pointer to the request message on the temporary "ac" context
This prevents two calls of "ldb_msg_copy_shallow".
2010-11-07 10:27:24 +01:00
Matthias Dieter Wallnöfer
75ea7bd004 s4:descriptor LDB module - by "dsdb_next_callback" we don't need anymore the default operation callback implementations
Only customised ones still need to remain.
2010-11-07 10:27:24 +01:00
Matthias Dieter Wallnöfer
3b52902c19 s4:descriptor LDB module - remove a bit pointless memory context
For only one operation we do not need an additional "mem_ctx". "ac" should be
enough (see for example the samldb LDB module).
2010-11-07 10:27:24 +01:00
Matthias Dieter Wallnöfer
d58a4c55c1 s4:descriptor LDB module - remove a "ldb_msg_sanity_check" call
This check (the structural objectclass) is performed in the objectclass LDB
module.
2010-11-07 10:27:23 +01:00
Matthias Dieter Wallnöfer
f1a8fbfc98 s4:descriptor LDB module - don't ignore referrals if we are executing an ordinary external search operation
Referrals are valid results.
2010-11-07 10:27:23 +01:00
Jelmer Vernooij
4217734a51 credentials: Lowercase library name,
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov  7 01:48:44 UTC 2010 on sn-devel-104
2010-11-07 01:48:44 +00:00
Jelmer Vernooij
e28cec7817 ldbsamba: Lowercase library name. 2010-11-07 01:57:34 +01:00
Jelmer Vernooij
0878399bd5 samdb: Lowercase library name. 2010-11-07 01:52:13 +01:00
Jelmer Vernooij
e7c371996d samdb: Make private (at least for the moment). 2010-11-07 01:44:26 +01:00
Matthias Dieter Wallnöfer
3d443b3797 ldb:ldb_parse.c - "ldb_parse_hex2char" - always initialise "c"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov  6 21:04:58 UTC 2010 on sn-devel-104
2010-11-06 21:04:57 +00:00
Matthias Dieter Wallnöfer
39ed810feb s4:ldap.py - enhance the "distinguishedName" tests
The "dn" shortcut isn't supported by AD.
2010-11-06 21:10:40 +01:00
Matthias Dieter Wallnöfer
acb8a8d330 s4:update_keytab LDB module - we don't need to search for the "distinguishedName" attribute
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov  6 20:08:28 UTC 2010 on sn-devel-104
2010-11-06 20:08:28 +00:00
Matthias Dieter Wallnöfer
a093e10896 s4:operational LDB module - "canonicalName" doesn't make use of the "distinguishedName" attribute
It uses the DN from the returned message
2010-11-06 20:24:19 +01:00
Matthias Dieter Wallnöfer
1688b71ca4 ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentation 2010-11-06 20:24:19 +01:00
Matthias Dieter Wallnöfer
889fa1cac5 ldb:ldb_tdb.c - make "ltdb_add" more similar to "ltdb_modify"
And remove in "ltdb_add_internal" a cache loading call which has been present
twice.
2010-11-06 20:24:19 +01:00
Matthias Dieter Wallnöfer
9ff8428c6f s4:samr RPC server - "dcesrv_samr_RemoveMemberFromForeignDomain"
- Remove TODO comment: MS-SAMR 3.1.5.8.7 explicitly states:
  "The SamrRemoveMemberFromForeignDomain method removes a member from all
  aliases."

- Remove the search attributes since they aren't strictly needed.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov  6 18:07:57 UTC 2010 on sn-devel-104
2010-11-06 18:07:57 +00:00
Stefan Metzmacher
0980a3471e s4:DRS-RPC-DSSYNC: don't try to decrypt secret attributes twice
dsdb_extended_replicated_objects_convert() already decrypts the
attributes in place.

This fixes the usage of --option="dssync:print_pwd_blobs=yes".

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Nov  6 13:30:16 UTC 2010 on sn-devel-104
2010-11-06 13:30:15 +00:00
Andrew Tridgell
ce203c001d s4-cldap: fixed debug message to match content
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Nov  6 04:26:45 UTC 2010 on sn-devel-104
2010-11-06 04:26:45 +00:00
Andrew Tridgell
2d52eea028 s4-join: fixed SPNs, invocationId and dnshostname and python join
- we need the GN/ SPN for replication. 
- fixed the string form of the invocationId
- lowercase the dnshostname

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-06 14:36:26 +11:00
Andrew Tridgell
a162b1a2d8 s4-join: switch over to the new DC join in make test 2010-11-06 14:36:26 +11:00
Andrew Tridgell
724599de63 samba-tool: deprecate samba-tool vampire command 2010-11-06 14:36:26 +11:00
Andrew Tridgell
11ae1046a0 s4-join: fixed secure_channel_type
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Nov  5 13:24:32 UTC 2010 on sn-devel-104
2010-11-05 13:24:32 +00:00
Andrew Tridgell
351312d8b8 s4-join: don't print all the NDR packets by default 2010-11-05 23:42:09 +11:00
Andrew Tridgell
158ae8a148 s4-cldap: print all the DNS servers found
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-05 23:42:09 +11:00
Andrew Tridgell
eaabb5950f s4-ldb: much more memory efficient msg filtering
this ensures we don't leave unnecessary attributes in returned ldb
objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-05 23:42:09 +11:00
Andrew Tridgell
5fcb426d9a s4-drs: reduce the memory usage of the getncchanges server
we now keep just a list of GUIDs around between getncchanges calls,
instead of an entire db search. This makes the overhead of having a
pending getncchanges call much smaller.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-05 23:42:09 +11:00
Andrew Bartlett
14f455ba99 s4-kerberos Mention the remote address we fail to contact the KDC on 2010-11-05 23:42:08 +11:00
Andrew Tridgell
0a2642c7dc s4-ldb: show the reason for module initialization failure 2010-11-05 23:42:08 +11:00
Andrew Tridgell
34ce183d6c s4: net -> samba-tool 2010-11-05 23:42:08 +11:00
Andrew Tridgell
506ffcf86f s4-join: added DC join to the python join code
this will replace the old vampire code
2010-11-05 23:42:08 +11:00
Andrew Tridgell
278778c927 s4-pydrs: added rodc option to python drs replication 2010-11-05 23:42:08 +11:00
Andrew Tridgell
cbded38ed5 s4-pydsdb: added DsReplicaAttribute()
this allows us to form a DsReplicaAttribute structure from python
2010-11-05 23:42:08 +11:00
Matthias Dieter Wallnöfer
6d53d9f2ce s4:password_hash LDB module - fix indentation
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Nov  5 12:31:28 UTC 2010 on sn-devel-104
2010-11-05 12:31:28 +00:00
Matthias Dieter Wallnöfer
90b3bf8f62 ldb:ldb.h - reorder extended operations list
We always define the controls and operations with a comment block. The data
structure definitions lie a bit below.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Nov  5 08:44:14 UTC 2010 on sn-devel-104
2010-11-05 08:44:14 +00:00
Stefan Metzmacher
578a37e806 s4:dsdb/drepl_notify: reuse dreplsrv_notify_operation structures
Otherwise we'll requeue the same notify events on and on.

(gdb) p *((struct dreplsrv_service *) 0x1b52190)->ops.notifies
$8 = {prev = 0xe4cb30, next = 0x1a25440, service = 0x1b52190, uSN = 123905,
source_dsa = 0x164c100, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *) 0x1b52190)->ops.notifies->next
$9 = {prev = 0x80e000, next = 0x1b7bf70, service = 0x1b52190, uSN = 123589,
source_dsa = 0x1a2d930, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *) 0x1b52190)->ops.notifies->next->next
$10 = {prev = 0x1a25440, next = 0x1d0c310, service = 0x1b52190, uSN = 1587,
source_dsa = 0x13d3210, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *) 0x1b52190)->ops.notifies->next->next->next
$11 = {prev = 0x1b7bf70, next = 0x1ba1420, service = 0x1b52190, uSN = 123905,
source_dsa = 0x164c100, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *)
0x1b52190)->ops.notifies->next->next->next->next
$12 = {prev = 0x1d0c310, next = 0x1c43510, service = 0x1b52190, uSN = 123589,
source_dsa = 0x1a2d930, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *)
0x1b52190)->ops.notifies->next->next->next->next->next
$13 = {prev = 0x1ba1420, next = 0xed97b0, service = 0x1b52190, uSN = 1587,
source_dsa = 0x13d3210, is_urgent = false, replica_flags = 29}
(gdb) p *((struct dreplsrv_service *)
0x1b52190)->ops.notifies->next->next->next->next->next->next
$14 = {prev = 0x1c43510, next = 0xe4ce80, service = 0x1b52190, uSN = 123905,
source_dsa = 0x164c100, is_urgent = false, replica_flags = 29}

We can reuse this operations, while they're not yet started.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Nov  5 07:15:04 UTC 2010 on sn-devel-104
2010-11-05 07:15:04 +00:00
Anatoliy Atanasov
211f6d5f55 s4/auth: Add logon_parameters to authenticate_username_pw
We need to be able to set the logon parameters in the same way as in the
ntlm server so we can handle openldap simple authentication call correctly.

Autobuild-User: Anatoliy Atanasov <anatoliy@samba.org>
Autobuild-Date: Fri Nov  5 06:32:43 UTC 2010 on sn-devel-104
2010-11-05 06:32:43 +00:00
Anatoliy Atanasov
d952f6c391 s4/test: Added test for simple bind with machine account
Samba4 returns error on simple bind, when we do it using openldap
simple_bind_s api.
2010-11-05 07:50:17 +02:00
Jelmer Vernooij
cd172e7724 talloc: Add python talloc module, move convenience functions to it.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Nov  5 02:48:21 UTC 2010 on sn-devel-104
2010-11-05 02:48:21 +00:00
Jelmer Vernooij
c9756cac05 waf: Put private libraries in a separate directory when building.
Thanks to Tridge for pointing out what exactly I had to change. :-)
2010-11-05 02:06:06 +00:00
Jelmer Vernooij
228a9c10d0 selftest: Allow some tests to output empty subunit data. 2010-11-05 02:06:05 +00:00
Andrew Bartlett
4000ec24aa s4-ldap_server Don't DEBUG() at level 2 every time a caller disconnects
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Nov  5 00:12:37 UTC 2010 on sn-devel-104
2010-11-05 00:12:37 +00:00
Andrew Tridgell
4f8b59edbc s4: don't run etags over .inst files
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov  4 22:51:06 UTC 2010 on sn-devel-104
2010-11-04 22:51:06 +00:00
Matthias Dieter Wallnöfer
83f78a30a0 s4:ldap.py/passwords.py - just use objectclass "user" for users
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Nov  4 21:09:00 UTC 2010 on sn-devel-104
2010-11-04 21:09:00 +00:00
Stefan Metzmacher
8516fad3b4 s4:dsdb/objectclass_attrs: not all objects have delete protected attributes as must contain
Before we got the following error, while starting samba after a
'samba-tool vampire':

Failed to store repsFrom - objectclass_attrs: delete protected attribute
'objectSid' on entry 'DC=ForestDnsZones,DC=alpha,DC=sz,DC=salzgitter-ag,DC=lab'
missing!

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Nov  4 17:01:59 UTC 2010 on sn-devel-104
2010-11-04 17:01:59 +00:00
Stefan Metzmacher
60691c1322 s4:dsdb/samdb: optimize samldb_prim_group_change()
We should only do searches when we have to.

metze
2010-11-04 17:13:02 +01:00
Stefan Metzmacher
a94fbb9ed5 s4:dsdb/common: fix memory leak in samdb_ntds_settings_dn()
fetch and set should use the same name!

metze
2010-11-04 17:13:01 +01:00
Stefan Metzmacher
e3276b3ab3 s4:dsdb/kcc: fix memory leak in kcctpl_copy_output_edges()
metze
2010-11-04 17:13:01 +01:00
Kamen Mazdrashki
78b05a3116 s4-ldb_module.h: use LDB error code for ldb_error() macro rather than LDB_DEBUG_FATAL
We end up calling ldb_error_at() which expects an LDB error,
but LDB_DEBUG_FATAL is not such code. It is actually equal to LDB_SUCCESS.

Thus the effect is that we report a *fatal* error, but return
LDB_SUCCESS in many places.

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Thu Nov  4 12:57:33 UTC 2010 on sn-devel-104
2010-11-04 12:57:33 +00:00
Kamen Mazdrashki
e7aa7a0c33 s4-devel: Verify prefixMap is saved correctly in LDB on disk 2010-11-04 12:16:04 +00:00
Jelmer Vernooij
c4dab7d545 urgent_replication: forbid empty subunit output.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Nov  4 12:13:47 UTC 2010 on sn-devel-104
2010-11-04 12:13:47 +00:00
Jelmer Vernooij
b6cef24463 selftest: Allow some tests to output empty subunit data. 2010-11-04 11:30:04 +00:00
Andrew Bartlett
28f1228b01 s4-dsdb Fix urgent_replication test not to set an invalid userAccountControl
A userAccountControl value of 0 or 1 is invalid, you must include one of
the account types.

Andrew Bartlett
2010-11-04 11:30:04 +00:00
Jelmer Vernooij
fea02db10f urgent_replication: Fix syntax error. 2010-11-04 11:30:04 +00:00
Andrew Tridgell
81e5321f5e s4-dsdb: use LDB_FLAG_MOD_REPLACE for isDeleted
isDeleted could have been set to FALSE previously

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov  4 10:18:10 UTC 2010 on sn-devel-104
2010-11-04 10:18:10 +00:00
Andrew Tridgell
c5f07d33ae s4-dsdb: use LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK in dsdb
when we are creating linked attributes with multiple values (some
deleted), use LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK to disable
that checking.
2010-11-04 20:35:44 +11:00
Andrew Tridgell
e606298631 s4-ldb: implement LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK
this disables the single value checking for one attribute. It is much
more specific than a general RELAX control, and also more efficient. I
think we should try to have more precise overrides like this, rather
than using RELAX as a general purpose override
2010-11-04 20:35:44 +11:00
Andrew Tridgell
1ab7bd1bfb s4-ldb: don't load modules from the same directory twice
this prevents samba dying if you do a 'make install' while it is
running. Otherwise the make install changes the inode numbers of the
modules in the modules directory, causing them to reload, which causes
multiple modules of the same name to try and load
2010-11-04 20:35:44 +11:00
Andrew Tridgell
6a22d8938c s4-ldb: honor controls on search in ldbedit 2010-11-04 20:35:44 +11:00
Andrew Tridgell
cf37c29cd0 Move the checking of single valued attributes back into the tdb backend.
The backend is the only place that can do this properly. It makes no
sense to do it anywhere else. As a result of it moving out of the
backend we ended up with some bugs causing multiple values in single
valued attributes (eg. isDeleted), which can really damage the
inregrity of the database.

For the override of single valued values needed for deleted linked
attributes we should use attribute flags.

This reverts commit 1949864417.
2010-11-04 20:35:44 +11:00
Andrew Tridgell
f3ad867ab5 s4-test: fixed quoting in deletetest.py 2010-11-04 20:35:44 +11:00
Andrew Tridgell
003a36eb5e s4-auth: unconditionally set previous_ev
we need the caller to know when the previous_ev was NULL

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-04 20:35:43 +11:00
Zahari Zahariev
832cd99ea7 Speed test with user objects
This is a modest speed test that aims to show performance difference
between Samba4 vs MS Active Directory. It should be used with Samba-style
credentials and no arguments like every other python unittest.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>

Autobuild-User: Anatoliy Atanasov <anatoliy@samba.org>
Autobuild-Date: Thu Nov  4 00:11:20 UTC 2010 on sn-devel-104
2010-11-04 00:11:20 +00:00
Andrew Tridgell
14718a725b build: a more portable way of finding waf in makefiles
this avoids using the non-portable shell command in makefiles

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 22:44:59 UTC 2010 on sn-devel-104
2010-11-03 22:44:59 +00:00
Jelmer Vernooij
fdcbc087c0 selftest/tests.py: Fix typos.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Nov  3 19:55:55 UTC 2010 on sn-devel-104
2010-11-03 19:55:55 +00:00
Jelmer Vernooij
6bd903ebe0 provision: Look for in source setup data first, in case an older version
of samba 4 is installed in the system.
2010-11-03 19:13:36 +00:00
Jelmer Vernooij
654fdce6a2 samba: Make in_source_tree() public. 2010-11-03 19:13:36 +00:00
Jelmer Vernooij
4bf6a3e72c urgent_replication: Fix formatting 2010-11-03 19:13:36 +00:00
Jelmer Vernooij
46bca5e7b7 possibleinferiors: Report subunit. 2010-11-03 19:13:35 +00:00
Jelmer Vernooij
9ae3c822d1 possibleinferiors: Fix formatting. 2010-11-03 19:13:35 +00:00
Stefan Metzmacher
05088fb855 s4:dsdb/samldb: avoid nested unindexed searches in samldb_member_check()
With 20000 objects in the database it's no fun to add members...

metze
2010-11-03 18:31:16 +00:00
Stefan Metzmacher
54d4ba7103 s4:dsdb/tests/python/sam.py: test with member: <SID=...>
metze
2010-11-03 18:31:16 +00:00
Matthias Dieter Wallnöfer
4b79a74c1b s4:descriptor LDB module - a bit cleanup
- add more OOM checks where needed
- remove message of an error which cannot happen anymore (since now the
  structural objectclass is always checked by the objectclass LDB module)

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov  3 18:30:52 UTC 2010 on sn-devel-104
2010-11-03 18:30:52 +00:00
Matthias Dieter Wallnöfer
53d9d4ee0e s4:sam.py - assign valid values when performing the special-attributes constraint checks
The problem is that s4 per construction does the checks in a different order. It
first checks for validity (pre-operation trigger in samldb LDB module) and then
for the schema (post-operation trigger in objectclass_attrs LDB module).
constraints (post-operation trigger
2010-11-03 17:48:18 +00:00
Matthias Dieter Wallnöfer
b78bf4d721 s4:samldb LDB module - improve the "get_single_valued_attr" call and move it into "ldb_modules/util.c"
It will be used by other LDB modules as well.
2010-11-03 17:48:18 +00:00
Matthias Dieter Wallnöfer
4311438528 s4:objectclass_attrs LDB module - introduce the hardcoded delete-protected attributes list
This is a hardcoded list in AD of attributes, which can never be deleted.
2010-11-03 17:48:18 +00:00
Jelmer Vernooij
0baa1fb4e4 pydsdb: Import testtools before subunit for those that don't have
testtools installed.

Also, cleanup some imports.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Nov  3 17:47:55 UTC 2010 on sn-devel-104
2010-11-03 17:47:54 +00:00
Matthias Dieter Wallnöfer
9d4eeaeb19 s4:objectclass LDB module - the structural objectclass has always to be specified
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov  3 16:20:55 UTC 2010 on sn-devel-104
2010-11-03 16:20:55 +00:00
Matthias Dieter Wallnöfer
d873fb72bc s4:objectclass_attrs LDB module - refactor the "dSHeuristics" checker
The checks are done when there are more than 0 values. The other checks should
be performed by the other parts of the module.
2010-11-03 16:36:50 +01:00
Matthias Dieter Wallnöfer
b841d12a13 s4:objectclass_attrs LDB module - simplify the invoke of the "dSHeuristics" checker
It's always invoked on add and modify operations.
2010-11-03 16:36:42 +01:00
Nadezhda Ivanova
3f4380993e s4-tests: Tests for the dSHeuristics attribute value restrictions
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Nov  3 13:58:42 UTC 2010 on sn-devel-104
2010-11-03 13:58:42 +00:00
Nadezhda Ivanova
b6fe5cdfdd s4-dsdb: Implemented value restrictions for the dSHeuristics attribute 2010-11-03 15:15:24 +02:00
Andrew Tridgell
a12c3305b3 s4-server: cleanup allocation of process models
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 10:40:52 UTC 2010 on sn-devel-104
2010-11-03 10:40:52 +00:00
Andrew Tridgell
6614f847e0 s4-ldb: fixed sorting of module names
this should also fix a valgrind error on freebsd

thanks to Matthieu for spotting this
2010-11-03 20:39:53 +11:00
Matthias Dieter Wallnöfer
598b565980 s4:objectguid LDB module - remove "objectguid_find_attribute"
It's exactly the same as "ldb_msg_find_element".

In addition remove a comment which points out a "fixme" for a semi-async call
since we started to permit them again.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov  3 09:29:46 UTC 2010 on sn-devel-104
2010-11-03 09:29:46 +00:00
Matthias Dieter Wallnöfer
4902b71a60 s4:RPC server - always set the response pad data in base of the request one
Otherwise it could remain uninitialised - should fix bug #7769.
2010-11-03 09:30:00 +01:00
Matthias Dieter Wallnöfer
5516191e72 s4:RPC server - cosmetic fixes - indentation, comments 2010-11-03 09:23:00 +01:00
Philip M. White
cb9d048f90 s4:waf - fix the build on Gentoo platforms
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-11-03 08:22:54 +01:00
Andrew Tridgell
b028f55880 s4-test: if using a system version of ldb, override the ldb modules path
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 04:13:22 UTC 2010 on sn-devel-104
2010-11-03 04:13:22 +00:00
Andrew Tridgell
c1cc1568b8 s4-ldb: make ldbtest depend on ldb 2010-11-03 01:34:04 +00:00
Andrew Tridgell
f0a472a2d6 waf: added reconfigure targets to our libraries
This allows you to do "make reconfigure" to re-run configure only if
needed
2010-11-03 01:34:04 +00:00
Andrew Tridgell
553029b88b s4-build: use -Wl,--as-needed if supported
this makes our runtime load times smaller, and also means we find bugs
that this may cause on gentoo. gentoo uses this by default

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 00:35:56 UTC 2010 on sn-devel-104
2010-11-03 00:35:56 +00:00
Andrew Tridgell
b3fb311173 s4-ldb: give the user a hint as to what may be wrong
when a backend or module can't be found, give a hint about
the LDB_MODULES_PATH environment variable

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Nov  2 21:28:22 UTC 2010 on sn-devel-104
2010-11-02 21:28:22 +00:00
Andrew Tridgell
4a08b2d172 s4-dsdb: removed the use of ldb_private.h from s4
this will allow s4 to use a system version of ldb
2010-11-03 07:43:57 +11:00
Andrew Tridgell
8a2142773f s4-ldb: expose some more ldb module functions
this exposes enough functions for s4 to not need ldb_private.h any
more.
2010-11-03 07:43:57 +11:00
Andrew Bartlett
46e70a2100 s4-selftest Run RPC-PAC against all the DC environments.
This is important, as it will validate that the PAC handling is
correct with the different encryption types.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov  2 11:45:50 UTC 2010 on sn-devel-104
2010-11-02 11:45:50 +00:00
Andrew Bartlett
a26d9194ff s4-process_model Fix valgrind-found use of un-initialised variable
The relloc didn't zero the structure for the new process modal, and so
m->initialised wasn't initialised.

Andrew Bartlett
2010-11-02 22:00:54 +11:00
Andrew Bartlett
41999761f1 s4-torture Add tests for DES-only accounts PAC behaviour/validation.
Previously we didn't support DES-only in a Samba4 domain.  This is
important for some legacy systems that have not yet migrated from this
weak crypto.

Andrew Bartlett
2010-11-02 22:00:54 +11:00
Andrew Bartlett
18732b1a4b heimdal Add handling for PAC signatures over all encryption types
There are exceptions from the expected behaviour of 'checksum type
matches key type' that we must deal with here, or else we can't serve
DES-only servers.

Andrew Bartlett
2010-11-02 22:00:46 +11:00
Andrew Bartlett
ad7b551edc s4-torture Remove torture/locktest2.c (no longer compiled and unused)
This is a left-over of a speculative approach to lock testing that
didn't go anywhere.

Andrew Bartlett
2010-11-01 23:34:06 +00:00
Andrew Tridgell
7e23363455 s4-ldb: removed ldb_includes.h
it causes problems with the openchange build as it is not installed

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  1 21:49:47 UTC 2010 on sn-devel-104
2010-11-01 21:49:47 +00:00
Matthias Dieter Wallnöfer
8770c8fe2f s4:samldb LDB module - the "sAMAccountName" cannot be substituted by nothing
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Nov  1 14:36:24 UTC 2010 on sn-devel-104
2010-11-01 14:36:24 +00:00
Matthias Dieter Wallnöfer
2f9480407d s4:sam.py - additional testing for "servicePrincipalName" updates 2010-11-01 14:53:25 +01:00
Matthias Dieter Wallnöfer
1b2f4c11a0 s4:samldb LDB module - support now the full "servicePrincipalName" update trigger
With "dNSHostName" and/or "sAMAccountName" updates
2010-11-01 14:53:25 +01:00
Matthias Dieter Wallnöfer
3eb0311aa6 s4:samldb LDB module - "sAMAccountName" checker
We need a "talloc_steal" for the retrieved "sAMAccountName" since the
memory is afterwards freed using the "talloc_free" call.
2010-11-01 14:53:25 +01:00
Andrew Tridgell
9b0f8a8e5f s4-ldb: use ldb_set_modules_dir() to load additional ldb modules
this allows ldb_wrap to enable s4 modules in a standalone ldb install
without any additional installation

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  1 13:47:33 UTC 2010 on sn-devel-104
2010-11-01 13:47:33 +00:00
Andrew Tridgell
9103047782 s4-ldb: enable version checking in dsdb ldb modules 2010-11-01 13:05:04 +00:00
Andrew Tridgell
a386ca8559 s4-ldb: enable ldb module version checking 2010-11-01 13:05:04 +00:00
Andrew Tridgell
8366bb495a s4-ldb: added support for ldb module version checking 2010-11-01 13:05:04 +00:00
Matthias Dieter Wallnöfer
05d7524736 s4:setup/spn_update_list - the DNS SPN is only used in DNS mode
Not all DCs are automatically DNS servers.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Nov  1 12:20:36 UTC 2010 on sn-devel-104
2010-11-01 12:20:36 +00:00
Matthias Dieter Wallnöfer
02547de5f9 s4:ldap.py/sam.py - simplify the objectclass specifications
- For user accounts we only need to specify "user" ("person" is an inherited
  objectclass)
- Don't use the brackets when we have only one objectclass specified
2010-11-01 12:34:51 +01:00
Matthias Dieter Wallnöfer
6f2001efa5 s4:sam.py - test "objectSid" modification lockdown 2010-11-01 12:34:51 +01:00
Matthias Dieter Wallnöfer
7da84bc7b6 s4:samldb LDB module - unify objectSid assignment error messages 2010-11-01 12:34:48 +01:00
Matthias Dieter Wallnöfer
7ca6b3ee6d s4:samldb LDB module - deny "objectSid" modifications
The same as with Windows
2010-11-01 12:34:21 +01:00
Matthias Dieter Wallnöfer
7578e04fb8 s4:provision - adapt the "provision" so that SIDs are only set on entry creation
SID modifications are denied.
2010-11-01 12:25:24 +01:00
Matthias Dieter Wallnöfer
2a25f7515a s4:torture - suppress printf "%llu" on uint64_t variables warnings
The signed/unsignedness does match (always unsigned). The bitlength (64 bit) on
all regular platforms does also. Therefore simply add a cast to
"unsigned long long".
2010-11-01 11:31:33 +01:00
Matthias Dieter Wallnöfer
c8bcf82119 ldb:tools/ldbtest.c - fix build warning
Cause was an incomplete declaration.
2010-11-01 11:31:32 +01:00
Andrew Tridgell
e59a8a563b s4-ldb: fixed build of paged searches
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Nov  1 09:41:27 UTC 2010 on sn-devel-104
2010-11-01 09:41:27 +00:00
Andrew Tridgell
952ce1521c s4-ldb: fixed build of oLschema2ldif 2010-11-01 18:55:20 +11:00
Andrew Tridgell
6f2c4abadd s4-ldb: convert existing ldb tools to use new command line hooks
the usage() function needs to take a ldb context, as the popt_options
is specific to the ldb context

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:20 +11:00
Andrew Tridgell
f924a022cb s4-ldb: added ldb command line hook support
ldb modules can now add hooks to the command line processing for ldb
tools

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:20 +11:00
Andrew Tridgell
fd8815335d s4-ldb: added samba_extensions ldb module
this module hooks into the ldb command line processing, to add extra
command line options and initialisation of samba4 internal subsystems
such as gensec

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:20 +11:00
Andrew Tridgell
cdf19ec5e2 s4-ldb: moved the ldb_ildap backend into lib/ldb-samba
this backend is samba4 specific
2010-11-01 18:55:20 +11:00
Andrew Tridgell
d103f2d346 s4-ldb: added support for general ldb hooks in modules
this allows a ldb module to register a hook function called at various
stages of processing. It will be initially used for ldb command line
hooks, but should work generally.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01 18:55:19 +11:00
Andrew Tridgell
c74601e0b3 s4-ldb: added an override flag to ldb_register_backend()
this will be used to allow a system ldb build with an ldb backend to
have its ldap handler overridden by the s4 one
2010-11-01 18:55:19 +11:00
Andrew Tridgell
05b37385fc s4-ldb: it is not an error for the modules directory to not exist 2010-11-01 18:55:19 +11:00
Andrew Tridgell
28c1e4d3eb s4-modules: get rid of the remaining static prototypes for modules
the waf build now generates the prototype declarations for us
2010-11-01 18:55:19 +11:00
Andrew Tridgell
7eb2eed156 s4-dsdb: convert the rest of the ldb modules to the new module type 2010-11-01 18:55:19 +11:00
Andrew Tridgell
43f7c9ca26 s4-test: we don't need to set LDB_MODULES_PATH any more 2010-11-01 18:55:19 +11:00
Andrew Tridgell
6db57658a9 s4-ldb: removed the old ldb module loading style
this gets rid of some particularly obscure cpp macros for module lists
2010-11-01 18:55:19 +11:00
Andrew Tridgell
be8e91d9ca s4-ldb: convert the rest of the ldb modules to the new style 2010-11-01 18:55:19 +11:00
Andrew Tridgell
b887b69151 s4-process_model: use the static module prototyping
remove the manual prototyping of static init functions
2010-11-01 18:55:19 +11:00
Andrew Tridgell
014a90f6ef s4-dsdb: convert the simple_ldap_map module to the new module style 2010-11-01 18:55:19 +11:00
Andrew Tridgell
cea4bdb467 s4-dsdb: convert the extended_dn_out module to the new ldb module style 2010-11-01 18:55:19 +11:00
Andrew Tridgell
e8f0e3aca9 s4-ldb: convert the openldap ldb backend to the new style of module 2010-11-01 18:55:19 +11:00
Andrew Tridgell
efdcedb6b1 s4-ldb: convert the ildap module to the new type of ldb module
this gets rid of the module aliases, which caused issues on some
systems (eg. gentoo).
2010-11-01 18:55:18 +11:00
Andrew Tridgell
8b63ff52e2 s4-ldb: support a new type of ldb module loading
this supports module loading in ldb which uses the approach of "load
all modules in a directory". This is much more flexible than the
current module loading, as it will allow us to load modules for
command line parsing and authentication.

Modules are loaded from a colon separated path, in the environment
variable LDB_MODULES_PATH. If unset, it defaults to LDB_MODULESDIR.

Within each directory modules are loaded recursively (traversing down
the directory tree). The device/inode number of each module is
remembered to prevent us loading a module twice.

Each module is checked for a ldb_init_module() function with
dlsym(). If found, it is called with the ldb module version as an
argument.
2010-11-01 18:55:18 +11:00
Kamen Mazdrashki
a2d787d95d s4-dsdb_schema: Use DRSUAPI_ATTID_INVALID instead of 0xFFFFFFFF magic value
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Mon Nov  1 00:36:20 UTC 2010 on sn-devel-104
2010-11-01 00:36:20 +00:00