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

25882 Commits

Author SHA1 Message Date
Kamen Mazdrashki
9c78bdfd47 s4-test/repl_schema: Make sure every object is with unique name
This way, test writer don't have to be careful to choose
unique objects suffix
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
dda73b85e6 s4-dsdb_schema: Handle remote ATTIDs based on msDs-IntId value
If we get such an msDs-IntId value, then we should just use it,
there is no mapping available for such values
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
52f7e38d6a s4-schema_syntax: Log error message when _dsdb_syntax_OID_oid_drsuapi_to_ldb() fails
I haven't found a way to test this function during replication so far,
but when I do, it will be useful to notice this error in the log file
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
0a9f780d26 s4-drepl: We won't need a working schema for empty replicas sent.
Without this check, receiving empty replica leads to a situation
where we left with a working_schema attached to the ldb.

The problem here is that working_schema is not fully functional
schema cache and keeping it attached to the ldb may lead
to modules failing to accomplish their jobs
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
2b74838c14 s4-dsdb_schema: We need base_dn in Schema's shallow copy too 2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
3a8fa09c4f s4-schema_syntax: We should use make_ATTID function when converting remote-ATTID to local one
We may have no prefix for the remote ATTID (remote OID strictly speaking)
So this is the place for us to update our local prefixMap
adding a prefix for the numeric OID we've recived
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
18744a9531 s4-drepl: User working schema for commiting objects when replicating Schema NC 2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
c94e5d4438 s4-repl: Allow dsdb_replicated_objects_commit() to use different schema while committing objects
working_schema is to be used while committing a Schema replica.

When we replicate Schema, then we most probably won't be
able to convert all replicated objects using the current
Schema cache (as we don't know anything about those new objects).

Thus, during Schema replication, we make a temporary
working_schema that contains both our current Schema +
all objects we get on the wire.
When we commit those new objects, we should use our working_schema
(by setting it to the ldb), and after all changes are commited,
we can refresh the schema cache so we have a brand new,
full-featured Schema cache
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
afee8a28c4 s4-schema_syntax: Use remote prefixMap to map remote ATTID to local one
in dsdb_attribute_drsuapi_to_ldb() function.

drsuapi_DsReplicaAttribute *in parameter come from remote DC
so we can't rely on in->attid to map it directly to an
dsdb_attribute in our local schema cache
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
efcc3c0d79 s4-test/repl_schema: use 'top' as default base class for our test classSchema objects
Otherwise we will end up passing whole inheritance chain
every time we create some new fancy classSchema object
(as the 'cls-A' and 'cls-B' ones in test_classWithCustomAttribute test)
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
1379075762 s4-test/repl_schema: New test to test a classSchema with custom attribute
Create new Attribute and a Class,
that has value for newly created attribute.

This should check code path that searches for
AttributeID_id in Schema cacheThis test.

It also tests how we replicate a leaf classSchema that
inherits from a new classSchema with attribute added
- tests both dsdb_attribute_drsuapi_to_ldb() and
_dsdb_syntax_OID_obj_drsuapi_to_ldb() syntax handler
2010-12-15 00:51:19 +01:00
Kamen Mazdrashki
79e1a71e56 s4-dsdb_schema: Seize using global_schema when referencing new schema for an LDB
Without this change, when a schema is set to ldb, the
effect is that dsdb_get_schema() returns global_schema
preferably.

Thus we end up with two schemas in effect:
- global one, which is the old one and it is still used everywhere
- new one, which is just cached in ldb, but can't be used, as
  there is no way to access it
2010-12-15 00:51:18 +01:00
Günther Deschner
0990f6342e s4-smbtorture: paranoia check for architectures in request and reply for enumdrivers test.
Guenther
2010-12-14 22:42:17 +01:00
Stefan Metzmacher
f126cb9eea s4:gensec/spnego: only look at the optimistic token if we support the first mech
As a server only try the mechs the client proposed
and only call gensec_update() with the optimistic token
for the first mech in the list.

If the server doesn't support the first mech we pick the
first one in the clients list we also support.
That's how w2k8r2 works.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Dec 14 16:50:50 CET 2010 on sn-devel-104
2010-12-14 16:50:49 +01:00
Matthieu Patou
8c90287198 build do not add -no-undefined on openbsd 2010-12-14 15:58:11 +03:00
Stefan Metzmacher
4ec66529e5 s4:dsdb:password_hash: verify content if the BYPASS_PASSWORD_HASH control is used
Make it much harder to import bad data into the password attributes.
This isn't 100% safe, but much better than no checks.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 13 16:17:36 CET 2010 on sn-devel-104
2010-12-13 16:17:36 +01:00
Stefan Metzmacher
a762e9cab7 s4:ldap_controls: allow DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID over sockets.
The DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID control has to data attached to it.
So we can allow it to be send over LDAP.

We'll accept this control over the privileged ldapi socket only.

metze
2010-12-13 15:32:04 +01:00
Stefan Metzmacher
b85a0d9297 s4:ldap_server: don't call ldb_req_mark_untrusted() on the privileged ldapi socket
metze
2010-12-13 15:32:04 +01:00
Stefan Metzmacher
9a1fb1351f s4:ldap_server: rename helper functions to ldapsrv_ prefix and pass ldapsrv_call
metze
2010-12-13 15:32:04 +01:00
Stefan Metzmacher
d7c536b8e4 s4:dsdb:util: dsdb_get_single_valued_attr() only needs a const ldb_messages
metze
2010-12-13 15:32:04 +01:00
Stefan Metzmacher
1865bdc0f0 s4:heimdal_build: replace '+' by '_' for vscripts in HEIMDAL_LIBRARY()
metze
2010-12-13 13:07:22 +01:00
Matthieu Patou
61d9aa5a3e build: remove -no-undefined and -as-needed on openbsd
This is causing problems with linker

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Dec 13 00:25:38 CET 2010 on sn-devel-104
2010-12-13 00:25:38 +01:00
Matthias Dieter Wallnöfer
a910d0cc64 s4:dsdb/pydsdb.c - don't throw another exception on "PyObject_AsDn"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 23:40:17 CET 2010 on sn-devel-104
2010-12-12 23:40:17 +01:00
Matthias Dieter Wallnöfer
e4b22702b6 ldb:pyldb.h - revert to the previous header behaviour
"ldb_private.h" is private and therefore might not always be available.
2010-12-12 22:55:14 +01:00
Matthias Dieter Wallnöfer
4c373d2013 s4:scripting/python/pyglue.c - add a OOM handling
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 20:50:55 CET 2010 on sn-devel-104
2010-12-12 20:50:55 +01:00
Matthias Dieter Wallnöfer
13da83be60 s4:scripting/python/pyglue.c - optimise includes 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
c5deda5d85 s4:param/provision.c - optimise includes 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
34c5bdc1c3 s4:libcli/finddc.h - fix header dependancies
And optimise includes
2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
721c3b1c4b s4:libcli/finddcs_nbt.c - optimise headers 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
f9b87352f4 s4:libnet/py_net.c - add checks for OOM conditions 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
c8d888772a s4:dsdb/pydsdb.c and web_server/wsgi.c - remove accidentally introduced Py_RETURN_NONE
This was only thought for Python 2.3 which we generally no longer support (only
pyldb in the LDB library is an exception).
2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
65bcde2334 s4:lib/ldb-samba/pyldb.c - optimise includes 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
b974966cc2 s4:dsdb/pydsdb.c - clean up memory handling
- Remove memory contexts when not really useful (if only one allocation)
- Try to find out OOM conditions and return correct error codes
- Move the parameter parsing always to the beginning (to prevent
  unneeded allocations in case of errors)
2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
b56a6f2eda ldb:pyldb - optimise includes 2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
05706e1801 s4:web_server/*.c - optimise includes
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 18:23:05 CET 2010 on sn-devel-104
2010-12-12 18:23:05 +01:00
Matthias Dieter Wallnöfer
978a14d40c s4:web_server/wsgi.c - fix a counter type 2010-12-12 17:27:36 +01:00
Matthias Dieter Wallnöfer
f05ddcfbe6 s4:web_server/wsgi.c - add missing Python compatibility code 2010-12-12 17:27:09 +01:00
Matthias Dieter Wallnöfer
136a5d7a26 s4:kdc/*.c - minimise includes
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 15:20:46 CET 2010 on sn-devel-104
2010-12-12 15:20:46 +01:00
Matthias Dieter Wallnöfer
faa7ae47d6 s4:smbd/process*.c - fix PID warnings on Solaris
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 13:21:13 CET 2010 on sn-devel-104
2010-12-12 13:21:13 +01:00
Matthias Dieter Wallnöfer
c7b2ec6fbb s4:kdc/proxy.c - optimise includes in order to fix a build warning on Tru64 2010-12-12 12:15:51 +01:00
Matthias Dieter Wallnöfer
6b2a19d50b s4:param/loadparm.c - fix a warning by introducing a "const" cast 2010-12-12 12:07:24 +01:00
Matthias Dieter Wallnöfer
3c38166cdb s4:kdc/kpasswdd.c - don't return an uninitialised NT_STATUS
Discovered by Tru64 build
2010-12-12 11:58:59 +01:00
Jelmer Vernooij
6bc6c004fa selftest-s4: Support listing smbtorture4 tests.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 19:32:07 CET 2010 on sn-devel-104
2010-12-11 19:32:07 +01:00
Jelmer Vernooij
13bb9e7046 smbtorture: Default to listing all tests if no prefix was specified. 2010-12-11 18:48:05 +01:00
Jelmer Vernooij
1f5f4e912d smbtorture: Implement --list argument. 2010-12-11 18:48:05 +01:00
Stefan Metzmacher
21d02c0626 s4:selftest: use correct name for the test "ECHO-UDP" => "echo.udp"
I wonder how commit 35fbc7bbda
(s4-smbtorture: Make test names lowercase and dot-separated)
ever passed make test.

metze
2010-12-11 11:06:56 +01:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
James Peach
7ef1de3973 smbtorture: correct error handling in BASE-OPEN.
There are a number of cases in BASE-OPEN where an initial failure cascades
into multiple failures due to lack of cleanup between test phases. Fix
all these so that they close open file handles correctly. Replace
torture_comment with torture_result where appropriate so that the results
output contains a useful diagnostic.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 11 03:19:39 CET 2010 on sn-devel-104
2010-12-11 03:19:39 +01:00
Matthieu Patou
533ba5a919 heimdal: unset SLIST_ENTRY only if we are with windows
This is needed because otherwise on some OS like netbsd,openbsd,MacOSX.

The preprossessing of ./heimdal/lib/gssapi/mech/cred.h on this plateform
is broken because mechqueue.h's definition won't be used as SLIST_HEAD
is already defined.
The definition occurs when net/if.h is included as it includes
sys/queue.h

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat Dec 11 00:34:51 CET 2010 on sn-devel-104
2010-12-11 00:34:51 +01:00
Matthieu Patou
6875a611a7 build: add a function to test if -lc is needed
This is needed on openbsd as some linking flags makes mandatory to
specify the libc for the linking
2010-12-10 23:22:28 +03:00