1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

49 Commits

Author SHA1 Message Date
Gary Lockyer
d120d7fe84 provision: Changes to support encrypted_secrets module
Changes to provision and join to create a database with
encrypted_secrets enabled and a key file generated.

Also adds the --plaintext-secrets option to join and provision commands
to allow the creation of unencrypted databases.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-12-18 00:10:17 +01:00
Andrew Bartlett
45df61e943 Switch on the sortedLinks Flag on new databases
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Feb  9 07:07:43 CET 2017 on sn-devel-144
2017-02-09 07:07:43 +01:00
Stefan Metzmacher
ffaf9bb98b s4:provision: add pekList and msDS-ExecuteScriptPassword to @KLUDGEACL
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-30 17:17:21 +01:00
Matthias Dieter Wallnöfer
d6fde2d4c2 LDB/s4 - deny the "(dn=...)" syntax on search filters when in AD mode
Achieve this by introducing a "disallowDNFilter" flag.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-26 00:57:29 +02:00
Andrew Bartlett
401ba9c9cf s4:dsdb Move module configuration from each ldb into samba_dsdb.c
This makes getting the module order correct, the obligation of Samba4
developers, and not system administrators.  In particular, once an ldb
is updated to use only the 'samba_dsdb' module, no further changes to the
ldb should be required when upgrading to later Samba4 versions.

(thanks to metze for the suggestion of samba_dsdb as a long-term
stable name for the module)

Andrew Bartlett
2009-11-23 14:15:07 +01:00
Andrew Bartlett
d4048b2e17 s4:provision Set @OPTIONS in the provision_init.ldif
The new partitions code knows to copy these items in when creating a
new parition, so we can set it from the start.

Andrew Bartlett
2009-10-21 22:43:50 +11:00
Andrew Bartlett
1a97bd915d s4:provision Ensure that @OPTIONS is mirrored into each partition
The previous patches to the provision system cut down on the number of
reconnects, and disabled the partition handling for part of the
process.  This means we lost the setting of @OPTIONS as a replicated
attribute into the partitions.

Andrew Bartlett
2009-08-26 17:37:01 +10:00
Andrew Bartlett
a58b4f8cc2 s4:setup Don't manually set @ATTRIBUTES any more
We now set these as part of the schema load, and we now load the
schema before the provision loads the DB, so setting them here is
pointless

Andrew Bartlett
2009-08-17 09:50:57 +10:00
Andrew Bartlett
3038bc484e Mark clearTextPassword as a privilaged attribute 2008-10-20 20:07:09 +11:00
Andrew Bartlett
6e5f2454ac Apply attributes (and their syntax) from the schema into ldb
This changes the @ATTRIBUTES record to be for bootstrapping only,
before we find the schema.

Andrew Bartlett
(This used to be commit 358477fcc0)
2008-08-20 15:46:46 +10:00
Andrew Bartlett
44ea6a26fd rename sambaPassword -> userPassword.
This attribute is used in a very similar way (virtual attribute
updating the password) in AD on Win2003, so eliminate the difference.

This should not cause a problem for on-disk passwords, as by default
we do not store the plaintext at all.

Andrew Bartlett
(This used to be commit 1cf0d75149)
2008-07-12 15:26:42 +10:00
Andrew Bartlett
bd6a651b38 r25960: Enable checks on the validity of the search base on sam.ldb in Samba4.
Remove bogus check to return NO_SUCH_ENTRY in ldap_backend.c, as this
error is now correctly emited from ldb.

Andrew Bartlett
(This used to be commit ed57862b90)
2007-12-21 05:45:19 +01:00
Andrew Bartlett
09a5ef1384 r25203: Don't use subclasses in Samba4, as we always fill out the full
objectClass list.

Andrew Bartlett
(This used to be commit e882dcb7aa)
2007-10-10 15:06:51 -05:00
Stefan Metzmacher
43014e70c3 r21298: protect windows password attributes too
metze
(This used to be commit 5c779b3767)
2007-10-10 14:48:04 -05:00
Stefan Metzmacher
d0e221c4e0 r20568: split out the rootdse ldif
and set the isSyncronized = TRUE when we done

metze
(This used to be commit 5875ce1ac6)
2007-10-10 14:37:02 -05:00
Stefan Metzmacher
8f0a0ebcb3 r20557: use ${DOMAINDN} instead of ${BASEDN}
metze
(This used to be commit 2a6e6a2695)
2007-10-10 14:36:56 -05:00
Stefan Metzmacher
2c266fb217 r20554: - use ${ROOTDN} for the rootDomainNamingContext
- the ${CONFIGDN} is a child of the ${ROOTDN}

metze
(This used to be commit ebbd8a83c9)
2007-10-10 14:36:55 -05:00
Stefan Metzmacher
8b70764038 r20553: add ${CONFIGDN} and ${SCHEMADN} instead of using hardcoded paths
under ${BASEDN}

metze
(This used to be commit 09ca6aae12)
2007-10-10 14:36:54 -05:00
Stefan Metzmacher
28b078ea03 r20551: use variable instead of hardcoded value for the default site
metze
(This used to be commit 21f433018a)
2007-10-10 14:36:53 -05:00
Andrew Bartlett
d70fbdbefa r19258: Don't delete the contents of the partitions twice, and in particular
don't delete their contents until we have specified the new partition
locations.

However, preserve the important part of tridge's change, that is to
ensure that no database index is present when the mass delete occours.
In my testing, it is best to leave the index until the provision is
compleated.

Andrew Bartlett
(This used to be commit 962219df7d)
2007-10-10 14:20:58 -05:00
Andrew Tridgell
557ca55ed7 r19253: its not so useful to index on objectclass. Much better to search on
objectCategory

provision now takes 2.4 secs, down from 24s on my laptop
(This used to be commit 3d3144cc06)
2007-10-10 14:20:58 -05:00
Andrew Bartlett
736e797983 r18979: With these extra indexes (also added for the normal case) and a
DB_CONFIG file, we now get reasonable enought performance to pass
'make test' against OpenLDAP.

We do have to double the maximum runtime for the torture client however.

Andrew Bartlett
(This used to be commit 5b3c8cc036)
2007-10-10 14:20:26 -05:00
Simo Sorce
6c48dc8612 r18440: "builtinDomain" is not a child of "domain"
(This used to be commit b34646f202)
2007-10-10 14:18:30 -05:00
Andrew Bartlett
49b335c756 r17600: Finish the schema conversion tool, and add a mapping file, used to map
OIDs and skip built-in attributes.

Andrew Bartlett
(This used to be commit cb2b9d800d)
2007-10-10 14:16:16 -05:00
Simo Sorce
71041a5007 r17504: Do not use the invented unixID but use the rfc2307 uidNumber and gidNumber attributes instead
Do not change unixName right now, we don't have an attribute to use in the posixGroup class,
and I think we should remove its usage altogether and look up users and groups by their uid/gid only.

Simo.
(This used to be commit d57b521aad)
2007-10-10 14:15:30 -05:00
Andrew Bartlett
7b99b2048e r17330: Enable the partitions module.
This module redirects various samdb requests into different modules,
depending on the prefix.  It also makes moving to an LDAP backend
easier, as it is just a different partition backend.

This adds yet another stage to the provision process, as we must setup
the partitions before we setup the magic attributes.

Andrew Bartlett
(This used to be commit 31225b9cb6)
2007-10-10 14:15:15 -05:00
Andrew Bartlett
2ab5bafd72 r16082: Index objectCategory like objectClass, as it is searched on a lot.
Andrew Bartlett
(This used to be commit 954785db03)
2007-10-10 14:08:57 -05:00
Andrew Bartlett
b31c685ec2 r16028: Re-add the objectclass module, in the new async scheme.
Add a test to show that we need this, and to prove it works (for add
at least).

Andrew Bartlett
(This used to be commit f72079029a)
2007-10-10 14:08:51 -05:00
Simo Sorce
0c7b82e5f6 r15942: Remove the sync internal ldb calls altogether.
This means that some modules have been disabled as well as they
have not been ported to the async interface

One of them is the ugly objectclass module.
I hope that the change in samldb module will make the MMC happy
without the need of this crappy module, we need proper handling
in a decent schema module.

proxy and ldb_map have also been disabled
ldb_sqlite3 need to be ported as well (currenlty just broken).
(This used to be commit 51083de795)
2007-10-10 14:08:43 -05:00
Simo Sorce
8081e4f402 r15795: Try to use the async code by default
It passess all my tests, but I still need to work on a lot of stuff.
Shouldn't impact anybody else work, so I want to commit now and see what happens

Will work to remove the old code from modules and backends soon, and make some
more restyling in ldb internals.

So, if there is something you don't like in this desgin please speak now.

Simo.
(This used to be commit 8b2a563e71)
2007-10-10 14:08:21 -05:00
Andrew Bartlett
ca7f7a4615 r14313: Add comments describing some of the dependencies here.
Andrew Bartlett
(This used to be commit a79a185b6a)
2007-10-10 13:57:11 -05:00
Andrew Bartlett
87cfc4ea24 r13907: By ordering things this way, we allow the password_hash module to set
the pwdLastSet time on new users (with passwords) correctly.

Andrew Bartlett
(This used to be commit e1b346b8e0)
2007-10-10 13:52:22 -05:00
Simo Sorce
b56282dec7 r13369: let's have a way to show the samba4 version through ejs
and use it in provisioning to fullfill rfc 3045 requirements
(This used to be commit 3fb9571a76)
2007-10-10 13:51:50 -05:00
Simo Sorce
3725b1817f r12941: Add Attribute Scoped Search control
want to see what it does ?

do aq make test and try:
./bin/ldbsearch -H st/private/sam.ldb --controls=asq:1:member -s base -b 'CN=Administrators,CN=Builtin,DC=samba,DC=example,DC=com' 'objectclass=*'

have fun.
simo.
(This used to be commit 900f4fd343)
2007-10-10 13:51:11 -05:00
Andrew Bartlett
8c9d212f2a r12762: Simo correctly asked that the policy logic (which attributes contain
passwords) be moved into the database, and not be hard-coded in the
module source.

Andrew Bartlett
(This used to be commit 1fbe09ce81)
2007-10-10 13:49:51 -05:00
Andrew Bartlett
a8eec31354 r12746: An initial version of the kludge_acls module.
This should be replaced with real ACLs, which tridge is working on.
In the meantime, the rules are very simple:

- SYSTEM and Administrators can read all.

- Users and anonymous cannot read passwords, can read everything else

- list of 'password' attributes is hard-coded

Most of the difficult work in this was fighting with the C/js
interface to add a system_session() all, as it still doesn't get on
with me :-)

Andrew Bartlett
(This used to be commit be9d0cae89)
2007-10-10 13:49:48 -05:00
Simo Sorce
b51fe793c7 r12745: Initial work to support a syntax to pass over controls via
command line to ldbsearch. Very rough work, no checks are
done on the input yet (will segfault if you make it wrong).
Controls are passed via the --controls switch an are comma
separated (no escaping yet).

General syntax is <ctrl_name>:<criticality>
<ctrl_name> is a string
<criticality> is 1 or 0

Current semi-parsed controls are:

server_sort
syntax: server_sort:1:0:attributename

	1st parm: criticality
	2nd parm: reversed
	3rd parm: attribute name to be used for sorting

todo:	still missing suport for multiple sorting
	  attributes and ordering rule
	no check on result code

paged_results
syntax: paged_results:1:100

	1st parm: criticality
	2nd parm: number of results to be returned

todo:	ldbsearch will return only the first batch
	  (missing code to cycle over conditionally)
	no check on result code

extended_dn
syntax: extended_dn:1:0

	1st parm: criticality
	2nd parm: type, see MS docs on meaning

Simo.
(This used to be commit 4c685ac0d1)
2007-10-10 13:49:48 -05:00
Andrew Bartlett
ff90c1c5c3 r12720: By metze's request, rename the ntPwdHistory attribute to
sambaNTPassword.  Likewise lmPwdHistory -> sambaLMPwdHistory.

The idea here is to avoid having conflicting formats when we get to
replication.  We know the base data matches, but we may need to use a
module to munge formats.

Andrew Bartlett
(This used to be commit 8e608dd4bf)
2007-10-10 13:49:45 -05:00
Andrew Bartlett
4bfe2907e7 r12719: Rename unicodePwd -> sambaPassword.
Because we don't know the syntax of unicodePwd, we want to avoid using
that attribute name.  It may cause problems later when we get
replication form windows.

I'm doing this before the tech preview, so we don't get too many
supprises as folks upgrade databases into later versions.

Andrew Bartlett
(This used to be commit 097d9d0b7f)
2007-10-10 13:49:45 -05:00
Andrew Bartlett
bedfb06326 r12686: Push the real SASL list into the rootdse.
Get this out of the server credentials, and push it down to ldb via an
opaque pointer.

Andrew Bartlett
(This used to be commit 61700252e0)
2007-10-10 13:49:38 -05:00
Andrew Bartlett
4ff20fcd31 r12600: Add a new module to sort the objectclass attribute on store. The
module is perhaps not the most efficient, but I think it is
reasonable.

This should restore operation of MMC against Samba4 (broken by the
templating fixes).

Andrew Bartlett
(This used to be commit 41948c4bdb)
2007-10-10 13:49:01 -05:00
Andrew Bartlett
c82c9fe7bb r12599: This new LDB module (and associated changes) allows Samba4 to operate
using pre-calculated passwords for all kerberos key types.
(Previously we could only use these for the NT# type).

The module handles all of the hash/string2key tasks for all parts of
Samba, which was previously in the rpc_server/samr/samr_password.c
code.  We also update the msDS-KeyVersionNumber, and the password
history.  This new module can be called at provision time, which
ensures we start with a database that is consistent in this respect.

By ensuring that the krb5key attribute is the only one we need to
retrieve, this also simplifies the run-time KDC logic.  (Each value of
the multi-valued attribute is encoded as a 'Key' in ASN.1, using the
definition from Heimdal's HDB.  This simplfies the KDC code.).

It is hoped that this will speed up the KDC enough that it can again
operate under valgrind.
(This used to be commit e902274321)
2007-10-10 13:49:01 -05:00
Andrew Bartlett
2dc21b833a r12384: I can't spell...
(This used to be commit 566bbfd067)
2007-10-10 13:47:33 -05:00
Andrew Bartlett
4a56399798 r12383: Fixes for Apple's AD client. Don't segfualt in the KDC, and they
require the isSynchronized flag in the rootDSE.

Andrew Bartlett
(This used to be commit e48464c884)
2007-10-10 13:47:33 -05:00
Andrew Tridgell
4ccadc164e r11954: add the static rootdse content to the sam ldb,and enable the rootdse
module in @MODULES
(This used to be commit cfab88fcc2)
2007-10-10 13:46:50 -05:00
Andrew Tridgell
3572073491 r10916: - finished the 'operational' ldb module
- removed the timestamps module, replacing it with the operational module

- added a ldb_msg_copy_shallow() function which should be used when a module
  wants to add new elements to a message on add/modify. This is needed
  because the caller might be using a constant structure, or may want to
  re-use the structure again

- enabled the UTC time attribute syntaxes in the operational module
(This used to be commit 61e8b01022)
2007-10-10 13:39:42 -05:00
Andrew Tridgell
18cf9ccba7 r8778: index on nCName in sam.ldb. This was costing us about 75% of the time in each smb login
(This used to be commit f6d24d063a)
2007-10-10 13:30:04 -05:00
Andrew Bartlett
2a0cf520e3 r8667: Further simply the provision script, by removing the 'name' attribute.
This is now calculated on the fly for every add and modify.

Andrew Bartlett
(This used to be commit ed1f2e029c)
2007-10-10 13:29:52 -05:00
Andrew Bartlett
24d2107324 r8650: Use the timestamps and a new objectguid module rather than placing
boilerplate attributes in every entry in provision.ldif.

The next step will be to use templates.

Andrew Bartlett
(This used to be commit 940ed9827f)
2007-10-10 13:29:50 -05:00