1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-21 03:33:16 +03:00
Commit Graph

682 Commits

Author SHA1 Message Date
Andrew Bartlett
9a1466abbd Remove pointless cast 2008-03-25 16:36:13 +11:00
Andrew Bartlett
bc607c334f Remove useless extra argument to samdb_result_account_expires().
Andrew Bartlett
2008-03-25 15:25:13 +11:00
Andrew Bartlett
2f2b110fb8 More kludge ACLs!
Rather than killing off the nasty 'kludge ACLs' stuff, this patch
extends it, to ensure that LSA secrets and the registry are also
protected.

Andrew Bartlett
2008-03-20 12:12:10 +11:00
Andrew Bartlett
d2b5f40d80 Indent
Andrew Bartlett
2008-03-19 12:06:37 +11:00
Andrew Bartlett
db3b5f16ec Allow more 'domain' objects when looking for a unqiue SID.
Andrew Bartlett
2008-03-14 12:32:07 +11:00
Andrew Bartlett
a3e1f28306 Don't use 'dn', this attribute does not exist with the LDAP backend,
or in AD.

Andrew Bartlett
2008-03-13 16:35:53 +11:00
Andrew Bartlett
7e85f318b5 Bail out, rather than segfault on no domain sid.
Andrew Bartlett
2008-03-13 14:12:50 +11:00
Andrew Bartlett
7c80cd18d5 Correctly normalise records against OpenLDAP.
Fixing this simple typo allows more of the ldap.js test to pass.

Andrew Bartlett
2008-03-13 14:12:18 +11:00
Andrew Bartlett
52947fc0c0 Don't search the whole tree for the domains's sid
This change removes a dependency on objectclass=domainDNS, and avoids
a subtree search when we really know exactly where this record is.

Andrew Bartlett
2008-03-13 14:11:06 +11:00
Andrew Bartlett
bda6a38b05 Rework to have member server 'domains' be CN=NETBIOSNAME
This reworks quite a few parts of our provision system to use
CN=NETBIOSNAME as the domain for member servers.

This makes it clear that these domains are not in the DNS structure,
while complying with our own schema (found by OpenLDAP's schema
validation).

Andrew Bartlett
2008-03-13 11:36:58 +11:00
Andrew Bartlett
5a92771fb5 Don't segfault on invalid objectClass input.
If the objectClass found does not include a defaultSecurityDescriptor,
then we should not segfault in the SDDL parser.

Andrew Bartlett
2008-03-13 10:27:09 +11:00
Andrew Kroeger
d28f2cb678 Treat maxPwdAge == 0 as passwords never expire. 2008-03-07 05:59:56 -06:00
Andrew Kroeger
7ce5575a3a Add samdb_result_account_expires() function.
Windows uses 2 different values to indicate an account doesn't expire: 0 and
9223372036854775807 (0x7FFFFFFFFFFFFFFFULL).

This function looks up the value of the accountExpires attribute and if the
value is either value indicating the account doesn't expire,
0x7FFFFFFFFFFFFFFFULL is returned.

This simplifies the tests for account expiration.  There is no need to check
elsewhere in the code for both values, therefore a simple greater-than
expression can be used.
2008-03-07 05:59:55 -06:00
Andrew Bartlett
1169e8d7be Make Samba4 pass the NET-API-BECOMEDC test against Win2k3 (again).
To make Samba4, using the python provision system, pass this test
required some major rework.  Untested code is broken code, and some of
the refactoring for a seperate provision test (which also now passes)
broke things.

Similarly, the iconv work has compiled, but these codepaths have never
been run (NULL pointer de-reference).

In working to use a local, rather than global, loadparm context, and
to support using a target directory, a few things needed to be
reworked, particularly around path handling.

Andrew Bartlett
2008-03-06 21:55:26 +11:00
Andrew Bartlett
cdff1b0802 The DN in objectCategory should, if possible, be returned pretty...
This avoids going via the canonicalise_fn(), which will upper case the DN

Andrew Bartlett
2008-03-04 13:40:50 +11:00
Jelmer Vernooij
2f7ff409e8 Change remaining prototype headers to be private. 2008-02-29 14:36:51 +01:00
Jelmer Vernooij
6c659689ed Move public header accumulation out of the perl code.
Never install generated prototype files. It's easier to break the
API when using them and they're not easily readable for 3rd party users.

Conflicts:

	source/auth/config.mk
	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/config_mk.pm
	source/build/smb_build/main.pl
	source/build/smb_build/makefile.pm
	source/dsdb/config.mk
	source/lib/charset/config.mk
	source/lib/tdr/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/torture/config.mk
2008-02-29 14:23:38 +01:00
Jelmer Vernooij
2b408e9ed4 Fix typo. 2008-02-29 01:03:31 +01:00
Andrew Bartlett
cda4642a93 Simplify the 'password must change' logic
This takes the previous patches further, so we catch all the cases
(the KDC looked at the time directly).

Andrew Bartlett
2008-02-29 08:47:42 +11:00
Andrew Bartlett
acda1f69bc Generate ACB_PW_EXPIRED correctly
More correctly handle expired passwords, and do not expire machine accounts.

Test that the behaviour is consistant with windows, using the RPC-SAMR test.

Change NETLOGON to directly query the userAccountControl, just because
we don't want to do the extra expiry processing here.

Andrew Bartlett
2008-02-28 08:50:00 +11:00
Andrew Bartlett
447d5a7954 Users and computers now share the same template.
Slowly work away at the samldb module again, it is clear that AD does
not use much of a templating system.  samAccountType is managed, as
far as I can tell, when groupType or userAccountControl changes.

Andrew Bartlett
2008-02-28 08:43:10 +11:00
Jelmer Vernooij
ce332130ea Fix use of some modules (needed _PUBLIC_). 2008-02-20 04:33:43 +01:00
Jelmer Vernooij
85c96a3258 Use struct-based rather than function-based initialization for ldb modules everywhere. 2008-02-20 01:54:32 +01:00
Jelmer Vernooij
d0dfdab85a Fix accidently introduced bug - thanks metze. 2008-02-19 14:25:20 +01:00
Jelmer Vernooij
8238415f3c Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-trivial 2008-02-19 13:45:17 +01:00
Jelmer Vernooij
138aaef078 Remove uses of global_loadparm. 2008-02-19 13:39:27 +01:00
Andrew Bartlett
837eb8a0bc Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-abartlet 2008-02-19 14:45:23 +11:00
Andrew Bartlett
69af290c91 Explain that these OIDs are DNs
Andrew Bartlett
2008-02-19 09:36:56 +11:00
Jelmer Vernooij
0e1d0a874a Rename include to mkinclude to emphasize it is different from make's include. 2008-02-18 20:04:18 +01:00
Andrew Bartlett
26108eb66b Give a more useful error when the templates.ldb can't be found.
Andrew Bartlett
2008-02-09 14:02:14 +11:00
Andrew Bartlett
57b4b43b65 Reset error strings
Avoid leaking error strings up to the application, when we are ignoring them.
2008-02-08 17:09:49 +11:00
Kai Blin
16466b543b sidmap: Some source code cleanups. 2008-02-05 11:42:39 +01:00
Andrew Bartlett
9c9a4731ca Remove useless layer of indirection, where every service called
task_service_init() manually.  Now this is called from service.c for
all services.

Andrew Bartlett
2008-02-04 21:58:29 +11:00
Andrew Bartlett
0d830580e3 Rework service init functions to pass down service name. This is
needed to change prefork behaviour based on what service is being
started.

Andrew Bartlett and David Disseldorp
2008-02-04 17:48:51 +11:00
Jelmer Vernooij
1163c2ad54 ldb: Add ldb_oom() calls in a couple of places. 2008-01-26 23:49:33 +01:00
Stefan Metzmacher
ba495f9d19 repl_meta_data: add some TODOs to replmd_modify_originating()
metze
2008-01-25 08:08:50 +01:00
Andrew Bartlett
e8fb5da5a1 Use the repl_meta_data module by default.
This means that, except when we back onto LDAP, when it will be
replaced with the mapping backend, we will keep this codepath tested.

Andrew Bartlett
2008-01-24 14:28:25 +11:00
Andrew Bartlett
948ee9b7ac Get more information from ldb when reporting a failed replication.
Andrew Bartlett
2008-01-23 15:44:02 +11:00
Andrew Bartlett
7b87a58502 Fix DRSUAPI replication test - NET-API-BECOME-DC.
The main change here is to work with the current module stack,
replacing only the objectGUID module, rather than a number of modules.

However, two changes were key:
 - Fixing a typo search_req->handle -> change_req->handle
 - Allowing an error of NO_SUCH_OBJECT - it is quite valid
   for the object not to exist when being replicated in.

Other small changes were required to the ejs provision to match
changes in that code.

Andrew Bartlett
2008-01-23 15:43:14 +11:00
Andrew Bartlett
e8081333b8 Fix segfaults in codepaths only tested by the NET-API-BECOME-DC test.
(I presume this has resulted from the global variable elimination)

Perhaps the iconv handle argument to ndr_push_struct needs to be
marked as 'not NULL' or similar?

Andrew Bartlett
2008-01-23 15:34:44 +11:00
Andrew Bartlett
669f137f0e ranged_results: fix use of uninitialised variable (end)
This matches the range parsing in the search and callback - end was
uninitilaised, causing occasional failures in make test.

Andrew Bartlett
2008-01-23 08:57:16 +11:00
Andrew Bartlett
45f6ccefda Only set showOnlyInAdvancedView: TRUE when adding default values.
False is the default, so only set this when the schema requires the
hiding behaviour.

Andrew Bartlett
2008-01-18 18:08:49 +11:00
Andrew Bartlett
51422414be Merge commit 'origin/v4-0-test' into 4-0-local 2008-01-18 17:05:17 +11:00
Andrew Bartlett
673f180500 Add showInAdvancedViewOnly to every new object
Unless already set, the default value for this comes from the
defaultHidingValue in the schema.

Andrew Bartlett
2008-01-18 16:56:41 +11:00
Andrew Bartlett
35148fd51f Search for memberOf when clients ask for a wildcard against OpenLDAP
The memberOf module in OpenLDAP make this attribute operational, so we
need to add it here or clients won't get it when using *.

Andrew Bartlett
2008-01-18 13:27:05 +11:00
Andrew Bartlett
d427cf4fa6 Correct authorship of instanceType module
Andrew Bartlett
2008-01-18 12:16:27 +11:00
Andrew Bartlett
2a418f3370 Add in a new module to handle instanceType
This code raided from the repl_meta_data module, which probably needs
to be downsized to just handling the replication data.

Andrew Bartlett
2008-01-18 10:13:43 +11:00
Andrew Bartlett
ee93b4e2ee ldb_map objectClass munging: Don't hard-code 'extensibleObject'.
This allows objectClass munging to be removed, or modified to not
include adding an objectClass, or for that objectClass to be something
different.

Andrew Bartlett
2008-01-17 08:53:18 +11:00
Andrew Bartlett
8c88e4eb1c Rework linked_attributes module for the REPLACE case.
This moves to a smarter 'find the delta' based operation of the linked
attributes module, when the caller asks for a 'replace' of the link
source.  Previously we would spray operations all over the database,
even if the net result was just to modify one record.

This also means we need the transaction safety less, which may be
useful for some LDAP backends that don't provide this functionality on
the LDAP server.

Andrew Bartlett
2008-01-16 15:14:05 +11:00
Andrew Bartlett
fc57a119f5 Rework control handling to remove the 'domain_scope' control
Also remove the search_options control earlier, before, rather than
after duplicating the request.

When we generate referalls in the partition module, the domain_scope
control with suppress them.

Andrew Bartlett
2008-01-16 08:49:54 +11:00