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

49851 Commits

Author SHA1 Message Date
Stefan Metzmacher
504f8816e3 s4:lib/events: move to toplevel directory as lib/tevent/
This commit will not compile on its own.

metze
2008-12-17 13:31:28 +01:00
Volker Lendecke
09e6dfb8e8 net lua
This adds a lua command line interpreter with some sample code how to build
your own data types based on our internal data types.

Not meant as the final word, but as a playground for experiments for people.
Might be removed later when we find this turns out to be too awkward.
2008-12-17 12:57:19 +01:00
Volker Lendecke
5659f18b86 Compile liblua 2008-12-17 12:57:18 +01:00
Volker Lendecke
390f19b649 Add the Lua distibution from http://www.lua.org/ftp/lua-5.1.4.tar.gz
Available under the MIT license.

Adding it to see how the build farm likes it. They claim to be 100% pure
ANSI C and compile everywhere. Lets see. If it breaks badly, we can remove
it again.
2008-12-17 12:57:18 +01:00
Stefan Metzmacher
081f8883ba s4: fix LIBEVENTS dependencies and use more forward declarations
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'

metze
2008-12-17 11:04:45 +01:00
Karolin Seeger
675b363b71 docs: Fix TOC of generated HTML docs.
This fixes bug #5968.
Thanks to Christian Perrier <bubulle@debian.org> for reporting!

Karolin
2008-12-17 09:17:26 +01:00
Tim Prouty
735b3e1c0c s3/s4: Fix DCOM idl bug
A build warning uncovered a bug where a pointer was being passed in
instead of the dereferenced value of the pointer.
2008-12-16 23:24:13 -08:00
Andrew Bartlett
fc7e41d6ff s4:testprogs: improve extended dn testing of the ldb blackbox tests
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:30 +11:00
Andrew Bartlett
eb3714acfa s4:ldb: add some python tests for extended dns
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:29 +11:00
Andrew Bartlett
12a7eeeaf4 s4:dsdb: remove normalise module
The extended_dn_out module provides the functionality now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:29 +11:00
Andrew Bartlett
ebe1e923c8 s4:provision: use extended_dn_out_ldb or extended_dn_out_dereference depending on the backend
This just changes the existing stratagy of loading different modules
for the OpenLDAP backend to also include extended_dn_out_*

When we provision the OpenLDAP backend, we make sure to include the
'deref' overlay (which must be made available by the OpenLDAP build)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
Andrew Bartlett
1f28541a24 s4:dsdb: split extended_dn into extended_dn_in, extended_dn_out and extended_dn_store.
By splitting the module, the extended_dn_in and extended_dn_store
moudles can use extended_dn_out to actually get the extended DN.  This
avoids code duplication.

The extended_dn_out module also contains a client implementation of
the OpenLDAP dereference control (draft-masarati-ldap-deref-00).

This also introduces a new control
'DSDB_CONTROL_DN_STORAGE_FORMAT_OID' to ask the extended_dn_out module
to return whatever the 'storage format' is.  This allows us to work
with both OpenLDAP (which performs a dereference at run time) and LDB
(which stores the GUID and SID on disk).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
Andrew Bartlett
911cf5d625 s4:dsdb: Make the linked_attributes module set an extended dn
This means that linked attributes will always have the same case form
as the actaul entry, as we search for that entry.  We then also use
the GUID and SID found on that entry to fill in the extended DN on disk.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
Andrew Bartlett
d68ad8218f s4:rootdse: fix the logic to indentify a rootdse search
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
Andrew Bartlett
596fe759e1 s4:ldb: make it possible to return per entry controls
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:27 +11:00
Andrew Bartlett
18ef32f4ce s4:selftest: lower debug level for slapd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:27 +11:00
Andrew Bartlett
74f304ec30 s4:setup: fix cut-n-paste error Builtin-Domain => Samba4-Local-Domain
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:27 +11:00
Andrew Bartlett
f0418a1600 s4:setup: don't set objectCategory: CN=Domain-DNS,${SCHEMADN}
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:27 +11:00
Andrew Bartlett
3ef91c9b02 s4:torture: add ldb tests
These tests are for both the new extended DN functionality (and were
vital in finding bugs during implementation) and for the normal DN
parsing and comparison routines.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:26 +11:00
Andrew Bartlett
e4ccd69d49 s4:ldap_server: return the extended dn to the LDAP client if available
This uses an early peek at the extended_dn_control (in the request) to see what output
format to use.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:26 +11:00
Andrew Bartlett
408a752a63 s4:ldb-samba: register samba specific extended dn handlers
This provides the two extended DN handlers for the GUID and SID types,
and makes the parsing more strict (where possible, it uses
ndr_pull_struct_blob_all(), to cause an error if trailing data is
found).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:26 +11:00
Andrew Bartlett
1107021f3a s4:samldb: make use of dom_sid_split_rid()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:26 +11:00
Andrew Bartlett
b65f1a0977 s4:samldb: improve error strings
When things go wrong with LDB, this routine seems to be particularly
sensitive to it.  This extra debugging should help the next poor soul who
breaks LDB.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:25 +11:00
Andrew Bartlett
ced158d250 s4:ldb.i: hang the dn on the NULL context as the python destructor will free it
This fixes a bug in the ldb.i python wrapper, that showed up under valgrind.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:25 +11:00
Andrew Bartlett
f7c53e0add s4:ldb: use try to print the extended dn in the ldif output
This allows searches with the extended DN control to still print the
extended DN in ldif output (it would otherwise be parsed and hidden in
the structure).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:25 +11:00
Andrew Bartlett
30ae74d399 s4:dsdb: add support for DSDB_OPENLDAP_DEREFERENCE_CONTROL
Encode and decode the OpenLDAP dereference control (draft-masarati-ldap-deref-00)

At this time, the ldb_controls infrustructure does not handle request
and reply controls having different formats, so this is purely the
client implementation (ie, there is no decode of the client->server
packet, and no encode of the server->client packet).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:24 +11:00
Andrew Bartlett
fc61ef2afc s4:libcli/ldap: split out a ldap_decode_attribs_bare() function
The OpenLDAP dereference control (draft-masarati-ldap-deref-00) uses
an attribute list, as found in the search reply, but without one
enclosing ASN1_SEQUENCE(0)

This allows the dereference control parsing code to use this as a
helper function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:24 +11:00
Andrew Bartlett
7a7573d570 s4:ldb_ildap: try to pass extended DNs to the server
Whenever we pass a DN to the LDAP server, we now use
ldb_dn_get_extended_linearized().  This allows us to send the extended
DN if set, and therefore allows searches of the form
'<GUID=aaa45ea0-94cd-45e9-8753-abe455d9a8f1>'.

We actually use the '0' format (GUID=aaa45ea094cd45e98753abe455d9a8f1)
because it is more widely supported (by Win2k in particular).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:24 +11:00
Andrew Bartlett
aa3eab70d5 s4:ldb: add infrastructure for extended dn handlers
This introduces a new set of pluggable syntax, for use on the
extended DN, and uses them when parsing the DN.

If the DN appears to be in the extended form, we no longer return the
full DN 'as is', but only return the normal part from
ldb_dn_get_linearized().

When validating/parsing the DN we validate not only the format of the
DN, but also the contents of the GUID or SID (to ensure they are
plausable).

We also have functions to set and get the extended components on the DN.

For now, extended_dn_get_linearized() returns a newly constructed and
allocated string each time.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:23 +11:00
Andrew Bartlett
8ce5640fbf Add hint to use passwordAttributes in @KLUDGE_ACL in future
This module is not used at the moment, but if we do use it again, we
should try to avoid duplicate lists.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:23 +11:00
Andrew Bartlett
56d39e1711 Make greater use of 'GUID_from_data_blob'
This avoids accidentily running off the end of a string, and uses a
single 'guess which type of GUID I have' algorithm.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:23 +11:00
Andrew Bartlett
d2ec925c63 Fix sequence number generation against OpenLDAP
It seems that in 2deeb99fff adding the
partition control to this request was missed out.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:23 +11:00
Stefan Metzmacher
99f7f73735 nsswitch: fix compiler warnings in winbind_nss_linux.c
metze
2008-12-17 00:31:36 +01:00
Jelmer Vernooij
af138af9e2 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-16 22:59:18 +01:00
Jelmer Vernooij
97f3720038 Don't write out forward declarations for enums, as some compilers don't
seem to like it.
2008-12-16 22:58:10 +01:00
Kai Blin
3144e45085 (Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NAS-BASIC server). 2008-12-16 13:40:38 -08:00
Jeremy Allison
cf96098a48 Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba 2008-12-16 13:35:44 -08:00
Jeremy Allison
3edbc14405 Revert "Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NASBASIC server)."
Error in commit !

This reverts commit bbd5824140.
2008-12-16 13:31:52 -08:00
Jelmer Vernooij
cc2d1eb743 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-16 22:22:15 +01:00
Jelmer Vernooij
b3c926376c Fix header installation after move of gen_ndr headers. 2008-12-16 22:20:21 +01:00
Kai Blin
bbd5824140 Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NASBASIC server). 2008-12-16 13:19:15 -08:00
Andrew Tridgell
1b3a084d60 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-17 07:17:54 +11:00
Andrew Tridgell
e294c4799b an experimental patch for fixing ldb bloat
ldb indexing can cause huge files, and huge memory usage. This
experiment allows us to keep indexes in memory during a transaction,
then to write the indexes to disk when the transaction completes. The
result is that the db is much smaller (we have seen improvements of
about 100x in file size) and memory usage during large transactions is
also greatly reduced

Note that this patch uses the unusual strategy of putting pointers
into a ldb (and thus into a tdb). This works because the pointers are
only there during a transaction, so the pointers are not exposed to
any other users of the database. The pointers allow us to avoid some
really bad allocation problems with tdb record allocation during the
re-indexing.
2008-12-17 07:15:29 +11:00
Jelmer Vernooij
54dc421f58 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-16 19:51:35 +01:00
Jelmer Vernooij
d59a79e5bb Use py_* files to check whether generated files are out of date / not
present.

ndr_*.c files are in git (required for Samba 3), py_*.c files are not.
2008-12-16 19:46:43 +01:00
Jelmer Vernooij
f1773a9187 Ignore generated files. 2008-12-16 19:43:52 +01:00
Jelmer Vernooij
e0016b8833 Remove ndrdump - it's available in merged build mode as bin/ndrdump4 and uses the exact same object files there. 2008-12-16 19:08:36 +01:00
Jelmer Vernooij
53c82ae7a3 Remove use of C++ keywords. 2008-12-16 19:07:02 +01:00
Jelmer Vernooij
b5a0c4cefe Share object files for gen_ndr. 2008-12-16 18:56:21 +01:00
SATOH Fumiyasu
4c3aea3f62 commit b520befe6f51644d20434add9864d7a2fa30aa2e
Author: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date:   Wed Dec 17 00:42:25 2008 +0900

    libsmbclient: Fix SIGBUS on non-x86 CPUs

    We must align the struct smbc_dirent in the struct
    SMBC_internal_data because the struct smbc_dirent
    has numeric values that require alignment.

Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
2008-12-16 12:20:40 -05:00