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

35 Commits

Author SHA1 Message Date
Michael Hanselmann
601afd6903 regfio: Improve handling of malformed registry hive files
* next_record: A malformed file can lead to an endless loop.
* regfio_rootkey: Supplying a malformed registry hive file to the
  registry hive I/O code can lead to out-of-bounds reads.

Test cases are included. Both issues resolved have been identified using
AddressSanitizer.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13840

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-20 05:26:18 +00:00
Douglas Bagnall
8760168aa8 python/traffic: remove duplicate test file
The other one is python/samba/tests/blackbox/testdata/traffic-sample-very-short.model

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08 23:55:31 +01:00
Puran Chand
3904c26ac8 Added smbc_SetConfiguration which lets the user set the smb.conf for libsmbclient code
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13229

Signed-off-by: Puran Chand <pchand@vmware.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-01-21 07:08:23 +01:00
Gary Lockyer
7057abcfcd scripts: Scripts to replay and generate samba traffic
Scripts to generate representative network traffic and replay this to a
samba instance.  For load testing, performance profiling and capacity
planning.

traffic_learner  process a file generated by traffic_summary and
                 generate a model that can be used by traffic_replay to
                 generate samba network traffic.

traffic_replay   Replay a summary file generated by traffic_summary, or
                 use a model created by traffic_learner to generate
                 network traffic.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Tim Beale <timbeale@catalyst.net.nz>
2017-08-17 04:06:06 +02:00
Andreas Schneider
5c178ebc96 s3:tests: Add test for smbspool
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-07-25 09:14:19 +02:00
Douglas Bagnall
779ea4c1b5 selftest: ndr_pack/unpack performance test
This just does a lot of packing and unpacking of various structures.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-03-02 04:35:14 +01:00
Clive Ferreira
70b9f8308d KCC: unconnected graph test
Uses a unconnected 5 DC single site database to test Douglas Bagnalls
patch which corrected a mix up between a str and an object which caused
infinite recursion and a method call on a None type.

This test patch originally triggered an edge case bug. This bug is
triggered by code to create additional edges which normally never ran.
In normal cases, the leftover connections made during a join would
prevent these additional edges from being created.

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:24 +01:00
Douglas Bagnall
6965ed844d KCC: add multisite ldif file for KCC tests
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-05-30 21:05:24 +02:00
Nadezhda Ivanova
13a10d4314 s4-samldb: Do not allow deletion of objects with RID < 1000
According to [MS-SAMR] 3.1.5.7 Delete Pattern we should not allow deletion
of security objects with RID < 1000. This patch will prevent deletion of
well-known accounts and groups.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by:   Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Mon Oct 14 13:31:50 CEST 2013 on sn-devel-104
2013-10-14 13:31:50 +02:00
Andrew Bartlett
61f7f01554 s4-s3upgrade: Add my wins.dat and fix the parsing error
The issue was that the numbers at the end of the lines are space
padded.

Andrew Bartlett
2012-06-16 08:18:10 +02:00
Rusty Russell
08019a0973 tdb2: don't use TDB2 versions of test tdb files.
Now tdb2 handles tdb1 files, we don't need most of commit
5eecc85423 which added TDB2 versions of
all the testing tdbs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec 12 06:33:44 CET 2011 on sn-devel-104
2011-12-12 06:33:44 +01:00
Amitay Isaacs
7017e6b882 testdata: Set netbios name in the samba3 configuation
To correctly find the domain sid, passdb api uses netbios name to
look up secrets database. If no nebios name is configured, passdb uses
current hostname and adds entry for hostname in secrets and uses that
instead of the intended one.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:33 +10:00
Rusty Russell
5eecc85423 tdb2: create tdb2 versions of various testing TDBs.
Soon, TDB2 will handle tdb1 files, but until then, we substitute.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:36 +02:00
Matthias Dieter Wallnöfer
0fb9671a01 s4:setup/provision_rootdse_add.ldif - provide informations in the right order
Doesn't change much - but nicer to read.

Btw: is the testdata/samba3 stuff still needed ("provision_samba3sam.ldif"...)?
It seems a bit outdated.
2010-10-05 16:06:05 +00:00
Matthias Dieter Wallnöfer
0a19290ca7 testdata/samba3/provision_samba3sam.ldif - update also here the maximum domain controller functionality
And we do support also LDAPv2.
2010-09-13 21:24:53 +02:00
Andrew Bartlett
285edf6a59 s4:samba3sam Remove extra newlines that broke samba3sam test
The python ldif parser was changed to be stricter (perhaps too
strict), and the extra newlines broke it.

The problem was masked earlier because errors parsing the LDIF were
considered to be 'end of file', and so no error was raised.

Andrew Bartlett
2009-07-29 09:29:50 +10:00
Jelmer Vernooij
aa09d8a75f Move ndrdump tests closer to the code they test. 2008-09-16 18:16:49 +02:00
Andrew Bartlett
2a02f4dcab Fix samba3sam test.
sAMAccountType is blocked by the samldb module.

Andrew Bartlett
(This used to be commit d15ca7e38b)
2008-04-17 14:51:30 +02:00
Jelmer Vernooij
0a6dc21955 Remove tests for Samba 3 EJS code.
(This used to be commit 7aff2ddd8c)
2008-02-11 13:38:07 +01:00
Andrew Bartlett
777ea0d434 r25952: Add in new data file required by samba3sam test.
Andrew Bartlett
(This used to be commit f36a35dd69)
2007-12-21 05:45:15 +01:00
Andrew Bartlett
58f9b5702a r25948: Fix up the samba3sam test (which is very fragile) to work with the new
restrictions imposed by the samldb module.

This module is worth keeping, because when we go back to do more
extensive backend mapping, the testing of this module shows it is
still possible.

Andrew Bartlett
(This used to be commit a10d2554dc)
2007-12-21 05:45:13 +01:00
Andrew Bartlett
56fb8d3c00 r25759: catch up the samba3sam tests with the change from cn=rootdse to @ROOTDSE
Andrew Bartlett
(This used to be commit 84a14973ce)
2007-12-21 05:43:46 +01:00
Jelmer Vernooij
ac2a701483 r24882: Use the torture API in BASE-CHARSET.
(This used to be commit 93910d92cd)
2007-10-10 15:03:27 -05:00
Jelmer Vernooij
99fb785ea1 r21673: Fix Samba 3 data read tests. I can't figure out why the upgrade one is broken, so that one is still disabled.
(This used to be commit ef794f03d5)
2007-10-10 14:49:08 -05:00
Andrew Bartlett
ca6a8c5f0b r20458: This data is invalid, and causes the samba3sam test to fail, because
we now convert these values.

Andrew Bartlett
(This used to be commit a0b401d41a)
2007-10-10 14:35:50 -05:00
Andrew Bartlett
3ecfa9958e r17545: I forgot to commit this file, a source file for the the samba3sam
tests, by mkhl.

Andrew Bartlett
(This used to be commit f6844d04e3)
2007-10-10 14:15:36 -05:00
Andrew Bartlett
027583e6de r17525: This is a merge from the Google Summer of Code 2006 project by Martin Kühl
<mkhl@samba.org>.

Martin took over the work done last year by Jelmer, in last year's
SoC.  This was a substanital task, as the the ldb modules API changed
significantly during the past year, with the addition of async calls.

This changeset reimplements and enables the ldb_map ldb module and
adapts the example module and test case, both named samba3sam, to the
implementation.

The ldb_map module supports splitting an ldb database into two parts
(called the "local" and "remote" part) and storing the data in one of
them (the remote database) in a different format while the other acts
as a fallback.
This allows ldb to e.g. store to and load data from a remote LDAP
server and present it according to the Samba4 schema while still
allowing the LDAP to present and modify its data separately.

A complex example of this is the samba3sam module (by Jelmer
Vernooij), which maps data between the samba3 and samba4 schemas.

A simpler example is given by the entryUUID module (by Andrew
Bartlett), which handles some of the differences between AD and
OpenLDAP in operational attributes.  It principally maps objectGUID,
to and from entryUUID elements.  This is also an example of a module
that doesn't use the local backend as fallback storage.

This merge also splits the ldb_map.c file into smaller, more
manageable parts.
(This used to be commit af2bece4d3)
2007-10-10 14:15:33 -05:00
Jelmer Vernooij
e2e2508b58 r9899: Be more conservative about what is sent to the remote server in ldb_map.
(This used to be commit 76e943d441)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
0712cbdab4 r9834: More tests for the upgrade from Samba3
(This used to be commit d2db164d6f)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
2f23a8cec1 r9830: Fix support for importing registry values. Extended the examplre registry tdb.
(This used to be commit 11e2a19389)
2007-10-10 13:36:16 -05:00
Jelmer Vernooij
a0e672af9e r9828: Fix path to testdata (tests are always run from source/)
(This used to be commit 76666d4010)
2007-10-10 13:36:16 -05:00
Jelmer Vernooij
40f85ace04 r9813: Conver testsuite for samba3sam module to EJS
(This used to be commit 77f24ed131)
2007-10-10 13:35:04 -05:00
Jelmer Vernooij
81952ea4e8 r9806: Some more test data
(This used to be commit 96a511b6de)
2007-10-10 13:35:03 -05:00
Jelmer Vernooij
cf016f972b r9805: Add 'data' property to param EJS object
Write out new smb.conf file. Parameters that have disappeared
between Samba 3 and 4 will optionally be prefixed with 'samba3:'
(This used to be commit 27eefbd905)
2007-10-10 13:35:03 -05:00
Jelmer Vernooij
391f9aaf05 r9785: Add some testdata
(This used to be commit 721431cff7)
2007-10-10 13:35:00 -05:00