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

204 Commits

Author SHA1 Message Date
Andrew Bartlett
044b509472 r26419: Add a module to implement 'ambigious name resolution' by munging the
incoming LDAP filter.

Warning: Any anr search will perform a full index search.  Untill ldb
gets substring indexes, this is unavoidable.

Also implement a testsutie to show we match AD behaviour for this
important extension (used in the Active Directory Users and Computers
MMC plugin, as a genereral 'find').

This will also be useful to OpenChange, as their server needs to
implement this.

Andrew Bartlett
2007-12-21 05:49:48 +01:00
Jelmer Vernooij
d0d5c1a823 r26352: Don't make lp_load create a new context. 2007-12-21 05:48:56 +01:00
Jelmer Vernooij
4c7e3843a0 r26317: Fix typos. 2007-12-21 05:48:31 +01:00
Andrew Bartlett
ba23dac031 r26304: More work to remove silly error printouts.
Andrew Bartlett
2007-12-21 05:48:18 +01:00
Andrew Bartlett
1fb8c31a3d r26303: Fix up error reporting during the delete of previous entries in the
provision, and ignore 'no such entry' as an error (it is normal, and
just means the partition is compleatly empty).

Andrew Bartlett
2007-12-21 05:48:18 +01:00
Andrew Bartlett
a7595d009a r26302: Print the error string for failed rootdse searches.
Andrew Bartlett
2007-12-21 05:48:17 +01:00
Andrew Bartlett
b0de08916e r26298: Use metze's schema loading code to pre-initialise the schema into the
samdb before we start writing entries into it.

In doing so, I realised we still used 'dnsDomain', which is not part
of the standard schema (now removed).

We also set the 'wrong' side of the linked attributes for the
masteredBy on each partition - this is now set in provision_self_join
and backlinks via the linked attributes code.

When we have the schema loaded, we must also have a valid domain SID
loaded, so that the objectclass module works.  This required some ejs
glue.

Andrew Bartlett
2007-12-21 05:48:15 +01:00
Andrew Bartlett
f6e0e15fa5 r26246: Make it easier to debug assert()s in the provision, if messages are
suppressed with --quiet.  Hopefully this will be easier with python.

Andrew Bartlett
2007-12-21 05:47:24 +01:00
Andrew Bartlett
d67e5c7896 r26245: Make it easier to handle the LDAP backend, with it's differing needs,
by seperating the modules list into parts.  That way, we can remove
the modules that the backend will provide.

Andrew Bartlett
2007-12-21 05:47:24 +01:00
Andrew Bartlett
c789a91e00 r26244: Add a module (sans tests for the moment) that implements ranged
results, as used particularly by MMC's Active Directory Users and
Computers to list group members.

This may be used on any attribute, but is useful to obtain attributes
that may be lengthy in 'pages'.  The implementation presumes that
attributes will always be returned by the DB in the same order.

Andrew Bartlett
2007-12-21 05:47:23 +01:00
Andrew Bartlett
3136dccd54 r26139: Based on a report by Theodor Chirana, don't assert() on invalid
netbios names at this point, the calling order has changed, and we
have a more informative place to do it.

Andrew Bartlett
2007-12-21 05:46:20 +01:00
Andrew Bartlett
a71414ec3e r25950: Enable seperate module to prevent subtree deletes.
Andrew Bartlett
2007-12-21 05:45:15 +01:00
Andrew Bartlett
f1ab90c88c r25940: Rework the samldb and templates handling.
Templates just don't belong in the sam.ldb, as they don't obey any of
the other rules.  This moves them to a seperate templates.ldb.

In samldb, this patch reworks the duplicate SID and Name detection
code, to use ldb_search_exp_fmt() rather than gendb_search.  This
returns far more useful errors, which we now handle and report better.

The call to samdb_search_for_parent_domain() has been moved in samldb,
to allow both the account and SID uniqueness checks to be in the same
domain.  This function also returns better errors.

dcesrv_drsuapi.c is updated for the new prototype of
samdb_search_for_parent_domain()

Andrew Bartlett
2007-12-21 05:45:10 +01:00
Stefan Metzmacher
c6d959e52c r25936: provision/newuser: don't try to set the 'memberOf' attribute
metze
2007-12-21 05:45:09 +01:00
Andrew Bartlett
54f4c8ba61 r25921: Now also listen on ldapi by default in the LDAP server
Create a phpLDAPadmin configuration file example to use ldapi to talk
to Samba4

Andrew Bartlett
2007-12-21 05:45:03 +01:00
Andrew Bartlett
c0a0c69ac5 r25750: Update the objectclass module to improve consistency in Samba4.
The aim here is to ensure that if we have

CN=Users,DC=samba,DC=example,DC=com

that we cannot have a DN of the form

cn=admin ,cn=useRS,DC=samba,DC=example,DC=com

This module pulls apart the DN, fixes up the relative DN part, and
searches for the parent to copy the base from.

I've used the objectclass module, as I intend to also validate the
placement of child objects, by reading the allowedChildClasses virtual
attribute.

In the future, I'll also force the attribute names to be consistant
(using the case from the schema).

Andrew Bartlett
2007-12-21 05:43:43 +01:00
Andrew Bartlett
2ba99d58e9 r25747: Implement linked attributes, for add operations.
Much more work is still required here, particularly to handle this
better during the provision, and to handle modifies and deletes, but
this is a start.

Andrew Bartlett
2007-12-21 05:43:41 +01:00
Andrew Bartlett
4f47e687e5 r25694: Move subtree_rename above the partitions module. The next step is to
built a linked_attributes module under this.

Andrew Bartlett
2007-12-21 05:43:17 +01:00
Andrew Bartlett
daca0cfd2f r25693: Implement the rest of subtree renames, now that tridge waved his magic
over the ldb_tdb part of the problem.

Andrew Bartlett
2007-12-21 05:43:17 +01:00
Andrew Tridgell
f61a9b7068 r25691: make "server role" case insensitive 2007-12-21 05:43:15 +01:00
Andrew Bartlett
5093ea1cef r25383: Patch from Amin Azez <azez@ufomechanic.net> to give better message
when a template file is missing.

Andrew Bartlett
2007-10-10 15:07:22 -05:00
Andrew Bartlett
dd1cb33591 r25304: Thankyou to Amin Azez <azez@ufomechanic.net> for pointing out that I
used subobj.ROLE and not subobj.SERVERROLE as the rest of the code
does.

Andrew Bartlett
2007-10-10 15:07:10 -05:00
Andrew Bartlett
4cc4ed7719 r25299: Modify the provision script to take an additional argument: --server-role
This must be set to either 'domain controller', 'domain member' or 'standalone'.

The default for the provision now changes to 'standalone'.

This is not because Samba4 is particularlly useful in that mode, but
because we still want a positive sign from the administrator that we
should advertise as a DC.

We now do more to ensure the 'standalone' and 'member server'
provision output is reasonable, and try not to set odd things into the
database that only belong for the DC.

Andrew Bartlett
2007-10-10 15:07:09 -05:00
Andrew Bartlett
cda965e908 r25051: Move SWAT back to the old-style form-submit modal.
The Web 2.0, async client tools were really interesting, but without
developer backing they remain impossible to support into a release.

The most interesting app was the LDB browser, and I intend to replace
this with phpLdapAdmin, preconfigured for Apache during provision.

This also removes the need to 'compile' SWAT on SVN checkouts.

Andrew Bartlett
2007-10-10 15:05:50 -05:00
Andrew Bartlett
9f18a97117 r24911: Make better use of substituted variables in example named.conf
Andrew Bartlett
2007-10-10 15:03:36 -05:00
Andrew Bartlett
64cc31642f r24793: The subtree_rename module is a work of fiction. An resemblance to a
working module, live or dead, is purely co-incidental.

Andrew Bartlett
2007-10-10 15:03:10 -05:00
Andrew Bartlett
13908a8cb4 r24761: Permit subtree renames in Samba4.
The module is scary: On a rename, it does a search for all entries
under that entry (including itself), and fires off a seperate rename
call for each result.  This will fail miserably on an LDAP backend,
but I'll need to work on using hdb for OpenLDAP, and hope Fedora DS
can implement subtree renames at some point.

Andrew Bartlett
2007-10-10 15:03:05 -05:00
Andrew Bartlett
876003f6c6 r24760: Ensure we base64 encode any password being put into LDIF, to avoid
provision failures when some of the random password values are illigal
LDIF.

Andrew Bartlett
2007-10-10 15:03:05 -05:00
Andrew Bartlett
af4d331eef r24729: First try and publishing a DNS service account, for folks to play with.
The keytab in dns.keytab should (I hope) do the job.

Andrew Bartlett
2007-10-10 15:02:58 -05:00
Jelmer Vernooij
67ad556b73 r24703: Use standard registry diff files when provisioning rather than
LDIF files for the registry files.
2007-10-10 15:02:50 -05:00
Andrew Bartlett
8f02ade1b2 r24640: Add a suggested BIND configuration snippit, to help with DNS configuration.
When we sort out GSS-TSIG on the server, we can expand this to have
the 'right stuff'.

Andrew Bartlett
2007-10-10 15:02:28 -05:00
Andrew Bartlett
07a9db1438 r23907: Fix bug 4790 reported by mwallnoefer@yahoo.de:
Before the provisioning enters to the function provision_default_paths (in
scripting/libjs/provision.js), the variable subobj.DNSDOMAIN isn't properly set
(for example for the filename of the DNS zonefile).

Andrew Bartlett
2007-10-10 15:01:09 -05:00
Andrew Bartlett
923d67ea9d r23875: As pointed out by mwallnoefer@yahoo.de:
On default Active Directory installations, the NETLOGON share isn't
an indipendent directory. In fact it's mapped to the subdirectory
"scripts" from the share SYSVOL under <Domain name>.

Andrew Bartlett
2007-10-10 15:01:06 -05:00
Andrew Bartlett
45cadf3bc0 r23859: Work to have Group Policy work 'out of the box' in Samba4.
This involves creating the SYSVOL and NETLOGON shares at provision
time, and creating the right subdirectories.

This also changes the behaviour of lp.get("foo") in ejs - we now
return undefined, rather than syntax error, if the parameter doesn't
exist (perhaps because the share isn't defined).

Andrew Bartlett
2007-10-10 15:01:05 -05:00
Andrew Bartlett
49ff929be6 r23720: Allow the member server to work against an LDAP Backend. Another case
where LDB isn't as strict as OpenLDAP, the self join record contains
duplicate servicePrincipalNames once the DNS name and domain name are
made equal.  (Easier to just skip the useless self-join).

Andrew Bartlett
2007-10-10 14:59:08 -05:00
Andrew Bartlett
fbcb1ec141 r23717: We need to remove the _ in LDAP_MANAGERPASS for the
--ldap-manager-pass= option to work.

Andrew Bartlett
2007-10-10 14:59:07 -05:00
Andrew Bartlett
17dad5d8c3 r23716: Clarify LDAP Manager DN and fix slapd startup syntax.
Andrew Bartlett
2007-10-10 14:59:06 -05:00
Andrew Bartlett
cc7900210a r23715: Make the provision-backend script print out the exact commands to run,
to set up the LDAP backend.

Andrew Bartlett
2007-10-10 14:59:06 -05:00
Andrew Bartlett
3111bbdf64 r23703: Start to get Samba4 to again work with LDAP backends, after I turned
on metze's schema work.

Andrew Bartlett
2007-10-10 14:59:06 -05:00
Andrew Bartlett
dcff83ebe4 r23560: - Activate metze's schema modules (from metze's schema-loading-13 patch).
- samba3sam.js: rework the samba3sam test to not use objectCategory,
  as it's has special rules (dnsName a simple match)
- ldap.js: Test the ordering of the objectClass attributes for the baseDN
- schema_init.c: Load the mayContain and mustContain (and system...) attributes when
  reading the schema from ldb
- To make the schema load not suck in terms of performance, write the
  schema into a static global variable
- ldif_handlers.c: Match objectCategory for equality and canonicolisation
  based on the loaded schema, not simple tring manipuation
- ldb_msg.c: don't duplicate attributes when adding attributes to a list
- kludge_acl.c: return allowedAttributesEffective based on schema results
  and privilages

Andrew Bartlett
2007-10-10 14:53:27 -05:00
Andrew Bartlett
bb583463bf r23361: Merge from SAMBA_4_0_RELEASE:
Print the smb.conf path being created in provision.

Andrew Bartlett
2007-10-10 14:53:11 -05:00
Andrew Bartlett
430c998dc9 r23351: Merge from SAMBA_4_0_RELEASE:
Fix a nasty issue we had with SWAT.  We could not provision into a
different domain, as we didn't re-calcuate the DOMAINDN after the user
changed it in the form.

Andrew Bartlett
2007-10-10 14:53:11 -05:00
Andrew Bartlett
f687bc92ae r23264: Make it more clear what this is actually setting up 2007-10-10 14:53:07 -05:00
Andrew Bartlett
0f457b1d2e r23189: Work towards a totally scripted setup of LDAP backends, so others can
easily try this out.

I also intend to use this for the selftest, but I'm chasing issues
with the OpenlDAP (but not Fedora DS) backend.

Andrew Bartlett
2007-10-10 14:53:02 -05:00
Andrew Bartlett
01d54d13dc r23177: Add in a new provision-backend script. This helps set up the OpenLDAP or Fedora DS backend.
This required a new mkdir() call in ejs.

We can now provision just the schema for ad2oLschema to operate on
(with provision_schema(), without performing the whole provision, just
to wipe it again (adjustments to 'make test' to come soon).

Andrew Bartlett
2007-10-10 14:53:00 -05:00
Andrew Bartlett
5b6f704b24 r23032: Remove calls to println(), and ensure we print the ldb errstring().
Andrew Bartlett
2007-10-10 14:52:42 -05:00
Andrew Tridgell
b9f8650b20 r23012: we need a POLICYGUID in provision 2007-10-10 14:52:39 -05:00
Andrew Bartlett
ee7b06fc83 r22756: Make it easier to setup an LDAP replica. Provision with
--partitions-only (suggestions for a better name welcome) will setup
the partitions records, but no any data in those partitions.  This can
then point at the already configured remote LDAP server.

Andrew Bartlett
2007-10-10 14:52:15 -05:00
Andrew Bartlett
860dfa4ea1 r22478: Update the LDAP backend code to handle initialisation of multiple
partitions onto the target LDAP server.

Make the LDAP provision run before smbd starts, then stop the LDAP
server.  This ensures this occurs synchronously, We then restart it
for the 'real run' (with slapd's stdin being the FIFO).

This required fixing a few things in the provision scripts, with more
containers being created via a add/modify pair.

Andrew Bartlett
2007-10-10 14:51:31 -05:00
Jelmer Vernooij
ef794f03d5 r21673: Fix Samba 3 data read tests. I can't figure out why the upgrade one is broken, so that one is still disabled. 2007-10-10 14:49:08 -05:00