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

30138 Commits

Author SHA1 Message Date
Andrew Bartlett
6960f8e4c3 dsdb-repl_meta_data: Handle renames better, considering only the RDN as given, and then the parent as given
This ignores the full DN as given, because the parent compents might be out of date.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-28 16:20:08 +02:00
Andrew Bartlett
54e092bb31 dsdb-linked_attributes: Do not crash if the target GUID can not be found
Note that we must not give an error when we cannot find the object
that should hold the backlink, there really isn't anything we can do
in this case.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-28 16:20:08 +02:00
Andrew Bartlett
c6673b96a5 build: Remove binaries and libraries build groups
Build groups are used in Samba to ensure that even if the dependency
chain for a target is not perfect, that it builds reliably.  This
matters most in the early build stages, where we are building the asn1
compiler and autogenerating files.

Once we get to the main stage, dependencies between C files, libraries
and binaries are much clearer, because the C compiler and linker takes
these as inputs anyway.

Groups were added to our waf build for stability during early
development, as dependency information was first imported from the
previous autoconf/perl based build system.

I don't think we need this distinction in the main build of C files
into .o, and when linking these into binaries, because the invocation
of these tools is very well defined, and we will find any missing
inputs very quickly.

As such, I've removed the libraries and binaries targets,
consolidating them with 'main'

By making this change, a build of smbtorture only on a clean tree
drops from 3778 to 2489 targets, and much of the expensive linker
stage is skipped.  The time for a null build of smbtorture only also
drops from 4.673s to as low as 2.499s on my laptop.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-27 11:56:46 +10:00
Michael Adam
8bf311288b s4:idmap: break account_type check lines for readability in idmap_sid_to_xid()
Also makes code obey README.Coding, regarding line-length.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon May 27 00:05:19 CEST 2013 on sn-devel-104
2013-05-27 00:05:19 +02:00
Kai Blin
df43027bd8 dns: Support larger queries when asking forwarder
This should fix bug #9632

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-26 18:13:28 +02:00
Stefan Metzmacher
e24fe5705e libnet-vampire: make use of dsdb_repl_resolve_working_schema()
Pair-Programmed-With: Matthieu Patou <mat@matws.net>

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 23 14:18:03 CEST 2013 on sn-devel-104
2013-05-23 14:18:03 +02:00
Stefan Metzmacher
24fb281ea7 dsdb-repl: merge the logic from libnet_vampire_cb_apply_schema()
This way libnet_vampire_cb_apply_schema() is able to use
dsdb_repl_resolve_working_schema().

Pair-Programmed-With: Matthieu Patou <mat@matws.net>

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:26:32 +10:00
Stefan Metzmacher
9af430ec0b dsdb-repl: split out dsdb_repl_resolve_working_schema
This can be reused later in other places.

Pair-Programmed-With: Matthieu Patou <mat@matws.net>

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:26:28 +10:00
Matthieu Patou
d36e9118cb selftest: Improve test coverage of DRS (bug #8680)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:26:25 +10:00
Matthieu Patou
640c2ff575 dsdb-drs: when replicating schema object checks ask for removal of previous version if exists (bug #8680)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:26:22 +10:00
Matthieu Patou
c7d4b87512 libnet-vampire: add attributes and classes from the replicated schema to the bootstrap schema (bug #8680)
Replicated schema might have attributes and auxilary classes  on some
critical classes (ie.  top, user, computer ) that are not in the bootstrap
schema. Without those new attributes and classes, bootstrap schema is
unable to translate those critical classes in the schema constructed
from the replicated data. Without thoses classes new schema is useless
and can't be indexed properly.

In order to overcome this problem, we put all new attributes and classes
definitions into the bootstrap schema so that foundations classes can be
translated.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:26:17 +10:00
Matthieu Patou
fe85bc1fb9 dsdb-schema: make deduplication of class and schema possible (bug #8680)
When a class or an attribute is replicated it might already exists in
the existing schema, so while replicating the new version of this object
we want to get rid of the old version of the object is the current
validating schema so that we don't end up having duplicates.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:26:07 +10:00
Stefan Metzmacher
c524be1781 dsdb-schema: schema_fill_possible_inferiors() should rebuild everthing
commit cd7f3fd072 reverted the change
of commit c2853f55fc.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-23 20:25:59 +10:00
Günther Deschner
f80d56a1a0 s4-torture: No need to disable rpc.spoolss.win test when compiled with MIT kerberos.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon May 20 20:35:33 CEST 2013 on sn-devel-104
2013-05-20 20:35:33 +02:00
Günther Deschner
00ee6a648b s4-torture: add simple tests for spoolss_{Add|Delete}PrintProcessor.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:01 +02:00
Günther Deschner
e8797a3ecc s4-torture: also deal with "Microsoft XPS Document Writer v4" as default driver.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
cc153fe86f s4-torture: add ndr test for spoolss_RpcSetJobNamedProperty.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
c568a2e5c5 s4-torture: add ndr test for spoolss_GetCorePrinterDrivers.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
c51866eadf s4-torture: add simple test for spoolss_RpcSendRecvBidiData.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
aa1e5f29af s4-torture: add test for spoolss_RpcEnumJobNamedProperties.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
5a5ed68d0a spoolss: add idl for spoolss_RpcSendRecvBidiData.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
b072bb76db s4-torture: add missing NTSTATUS checks in test_AddJob().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Matthieu Patou
74fa70cdec smbtorture: Show the list of cracknames we expect to have and the result
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:07 +10:00
Matthieu Patou
6c4cf59fba smbtorture: fix a warning due to a set but unused var
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:07 +10:00
Matthieu Patou
d42a31d68f smbtorture: fix crash when the returning a crackname with an empty name
when a valid one was expected

Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:06 +10:00
Matthieu Patou
d5b440fa89 Fix warning by setting the variable from GUID to const GUID
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:06 +10:00
Matthieu Patou
373448804b Fix more unused vars
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:06 +10:00
Matthieu Patou
4cc3d065bc Fix a warning about a set but unused variable by actually using it
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:06 +10:00
Matthieu Patou
972417131d Fix warnings about set but unused variables
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:06 +10:00
Matthieu Patou
bfce9690bf Fix a warning about a shadowed variable by renaming the shadowing var
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:54:06 +10:00
Matthieu Patou
61989aee31 operational: remove double loops
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:52:41 +10:00
Matthieu Patou
cd7f3fd072 dsdb-schema: remove looping on all schema classes for system_possible_inferrior
The logic to populate possible inferriors and system possible inferriors
is the same so instead of looping twice we do both attributes (depending
on the type of the class) in the same loop

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-20 21:52:38 +10:00
Kai Blin
61a2ad3c02 swat: Remove swat.
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sat May 18 16:32:38 CEST 2013 on sn-devel-104
2013-05-18 16:32:38 +02:00
Kai Blin
a3a3086a2a dns: Also print packet information for DBGC_DNS
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sat May 18 12:48:15 CEST 2013 on sn-devel-104
2013-05-18 12:48:15 +02:00
Matthias Dieter Wallnöfer
1a7e181fb8 s4:dsdb python tests - set the executable flag
Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Fri May 17 15:11:29 CEST 2013 on sn-devel-104
2013-05-17 15:11:29 +02:00
Matthieu Patou
3f3576d642 drsuapi: Debug more clearly why NC is bad in updateRefs
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 17 04:17:14 CEST 2013 on sn-devel-104
2013-05-17 04:17:14 +02:00
Andrew Bartlett
9b24f6523e dsdb: Expand on what the error finding the ntSecurityDescriptor was in acl_read
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:04 +02:00
Andrew Bartlett
73628e9cd9 rpc_server-drsuapi: Include the failing DN when unable to convert DB objects to DRS
This is a very serious situation (it should not happen) so getting information on the
objects that this happens for would be very helpful.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:03 +02:00
Andrew Bartlett
11e716ae07 dsdb-schema: Print clear debug message when we find a OID in our local DB we cannot convert
We need to work out why we are unable to make a mapping for an OID in our database, because
we should not have been able to add it without such a mapping.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:03 +02:00
Andrew Bartlett
25402e06bc dsdb-repl: Allow the name attribute (and name-based schema lookups) to be skipped in dsdb_repl_make_working_schema()
This allows us to use a schema that may only be valid for attributeID based lookups, during the schema load.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:03 +02:00
Andrew Bartlett
9430310dc3 gensec: Make the no-hostname status message much less scary
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:00 +02:00
Kai Blin
4364a3faf6 dns: Add support for MX queries
Due to an oversight, the internal DNS server supports MX record updates,
but not MX record queries. Add support for MX queries and tests.

This should fix bug #9485

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
2013-05-16 21:40:35 +10:00
Kai Blin
2e9cf99bce dns: Also add a print-out for the out_packet
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
2013-05-16 21:40:19 +10:00
Kai Blin
f31bda6715 dns: Use new DNS debugclass in DNS server
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
2013-05-16 21:40:15 +10:00
Volker Lendecke
51533eedd7 winbind4: Fix bug 9832 -- talloc use after free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 16 13:37:41 CEST 2013 on sn-devel-104
2013-05-16 13:37:40 +02:00
Karolin Seeger
7ff3cbdabf source4/winbind/wb_samba3_cmd.c: Fix typo in comment.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 16 07:49:24 CEST 2013 on sn-devel-104
2013-05-16 07:49:24 +02:00
Karolin Seeger
b07d97d7f5 source4/dsdb/schema/schema_convert_to_ol.c: Fix typo in comment.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:42 -07:00
Karolin Seeger
7a06a93fdf source4/dsdb/samdb/ldb_modules/local_password.c: Fix typo in comment.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:42 -07:00
Karolin Seeger
30be42073a source4/auth/kerberos/kerberos-notes.txt: Fix typo.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:42 -07:00
Karolin Seeger
bf26c7ef40 source4/TODO: Fix typo.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:42 -07:00
Matthieu Patou
54f4536980 dsdb-drepl: create a new schedulable event for running pending operations
So instead of running dreplsrv_periodic_schedule when receiving a
DRS_REPLICA_SYNC request which will force the DC to look for changes
with all the DC it usually replicate to, we reduce it to the DC
specified in the DRS_REPLICA_SYNC request. It will allow also to do have the
correct options as set by the client who send the DRS_REPLICA_SYNC.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-15 14:31:40 +02:00
Matthieu Patou
3fda85276b selftests-drs: make our generated class subclass of classschema
Without this change objectclass=["top", "classSchema", "Foobar"] will
not be sorted correctly and will generated an error saying that class
Foobar is unreleated to classSchema (which is not true). It's mimicing what
other classes of the default schema are doing (ie. contact)

Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 14 07:07:19 CEST 2013 on sn-devel-104
2013-05-14 07:07:18 +02:00
Matthieu Patou
2bdf2c56cc dsdb: make the name of non related class more obvious
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-14 15:21:31 +12:00
Christian Ambach
392b01f53c s4:torture fix a build break on AIX
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May  9 08:05:12 CEST 2013 on sn-devel-104
2013-05-09 08:05:12 +02:00
Alexander Werth
9018aa82c7 s4-smbtorture: Set result message when failing the inheritance test.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Andrew Bartlett
d87b81fa30 build: Move nfs4acl to the top level
This is to create IDL-stored NFSv4 ACLs, just as we use for posix ACLs
to permit better testing.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:20 +02:00
Richard Sharpe
76bffc27a3 Tests processing an oplock break within a compound SMB2 request.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue May  7 19:45:36 CEST 2013 on sn-devel-104
2013-05-07 19:45:36 +02:00
Volker Lendecke
5f82641553 libsmb: Use sizeof instead of explicit numbers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 30 16:02:19 CEST 2013 on sn-devel-104
2013-04-30 16:02:19 +02:00
Volker Lendecke
b8c1e30a6f libsmb: Use smb2_lease_push in smb2_create_send
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-30 14:14:44 +02:00
Volker Lendecke
96a8f6e0fb libsmb: Move "struct smb2_lease" to common
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-30 14:13:41 +02:00
Volker Lendecke
c672ef11b1 winbind4: Fix bug 9832 -- talloc use after free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-30 09:11:15 +02:00
Volker Lendecke
b7765fe63f torture: Only test leases if supported
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>

Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Sat Apr 27 18:09:37 CEST 2013 on sn-devel-104
2013-04-27 18:09:36 +02:00
Volker Lendecke
27e9115eb0 torture: Use ZERO_STRUCTPN instead of explicit deref
Signed-off-by: Volker Lendecke <vl@samba.org>
2013-04-27 07:22:33 -07:00
Sam Lang
727c611fe3 source4/libcli: Only set ctemp set on success
If open fails ctemp.out.name probably won't be valid and strdup
will cause a segv.  Only set the path if open succeeds.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 24 23:58:44 CEST 2013 on sn-devel-104
2013-04-24 23:58:43 +02:00
Matthieu Patou
77f7a46e18 s4:dsdb: Fix warnings about not set / set but unused / shadowed variables
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Apr 19 13:15:40 CEST 2013 on sn-devel-104
2013-04-19 13:15:40 +02:00
Stefan Metzmacher
d496ccdb90 s4:torture/smb2: add v2 lease requests
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-18 15:11:48 +02:00
Stefan Metzmacher
3c9846cafd s4:torture/smb2: add smb2_lease_v2_create_share() helper
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-18 15:11:48 +02:00
Stefan Metzmacher
6c81893b34 s4:libcli/smb2: add support for SMB2 LEASES v2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-18 15:11:48 +02:00
Stefan Metzmacher
1bfc7e863e s4:torture/smb2: add NTCREATEX_SHARE_ACCESS_DELETE in smb2_generic_create_share()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-18 15:11:48 +02:00
Gregor Beck
87685b30d7 s4:torture:smb2 delete temp memory context in test_durable_open_oplock_disconnect
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Apr 18 15:10:31 CEST 2013 on sn-devel-104
2013-04-18 15:10:29 +02:00
Michael Adam
2ef02e4f5a s4:torture:smb2:durable_v2: remove an unused variable
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18 13:15:14 +02:00
Richard Sharpe
b08c0b317c Add a test that shows the difference between Windows and Samba with respect to DeleteOnClose.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 16 00:46:54 CEST 2013 on sn-devel-104
2013-04-16 00:46:53 +02:00
Guenter Kukkukk
f67ae788cf samba-tool - MX records cannot be deleted (part2)
I missed this one, also a wrong compare of MX vs. SRV record

Signed-off-by: Guenter Kukkukk <kukks@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Apr 14 22:43:07 CEST 2013 on sn-devel-104
2013-04-14 22:43:07 +02:00
Guenter Kukkukk
3434140c09 samba-tool - MX records cannot be deleted (error in called C-program)
Only matching UNION-members should be compared. MX vs. SRV record

Signed-off-by: Guenter Kukkukk <kukks@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Apr 14 08:46:07 CEST 2013 on sn-devel-104
2013-04-14 08:46:07 +02:00
Rusty Russell
ed6a4e04e1 source4/cluster and source4/ntvfs: convert to dbwrap, add ntdb option.
This makes the code use dbwrap_local_open(), so it can handle
NTDB.

brlock.tdb, notify.tdb and openfiles.tdb can now be brlock.ntdb,
notify.ntdb and openfiles.ntdb, if 'use ntdb' is set.

Cc: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-12 14:59:42 -07:00
Jean Raby
afd291b1de Avoid leaking temp file if an exception is raised
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Apr 11 06:06:03 CEST 2013 on sn-devel-104
2013-04-11 06:06:03 +02:00
David Disseldorp
ed76e65172 ntvfs: support setfileinfo with FULL_EA_INFORMATION
Use existing unmarshall and set helper functions. This allows the
smb2.setinfo.setinfo test to run against the ntvfs file server.

Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr  3 16:14:33 CEST 2013 on sn-devel-104
2013-04-03 16:14:32 +02:00
Jeremy Allison
7bee3ef684 Add a test to show that zero-length EA's are never returned over SMB2.
Zero length EA's only delete an EA, never store. Proves we should
never return zero-length EA's even if they have been set on the
POSIX side.

ntvfs server doesn't implement the FULL_EA_INFORMATION setinfo
call, so add to selftest/knownfail.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02 20:06:38 +02:00
Jeremy Allison
b96bc9fa26 Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF
Ensure ntvfs server never returns zero length EA's.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02 20:06:38 +02:00
Andrew Bartlett
30adf0cdba scripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement or Dn
This avoids the need to fix it up again in samba_upgradedns.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Mar 25 13:25:30 CET 2013 on sn-devel-104
2013-03-25 13:25:30 +01:00
Andrew Bartlett
9040e26841 scripting: Move get_diff_sds from samba.upgradehelpers to samba.descriptor
This helps avoid a dependency loop when we use get_diff_sds in dbcheck.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 10:33:37 +01:00
Andrew Bartlett
a113ddbf88 scripting: Modify samba.descriptor.get_wellknown_sds() use samdb calls only
We need this routine not to use the names context as this is tied to
provision, and we end up in a circular dependency if we use that in
dbcheck.

Andrew Bartlett
2013-03-25 10:32:34 +01:00
Andrew Bartlett
352aff8ed7 scripting: Move samba.provision.descriptor to samba.descriptor
This will allow dbcheck to import it, without a cirucular dependency via
samba.provision importing dbcheck.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 10:32:11 +01:00
Andrew Bartlett
e81a97dd6f scripting: Make samba.provision.descriptor.get_wellknown_sds() return ldb.Dn objects
As we look to use this function in more places, it does not make sense to constantly create
Dn objects from the strings.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 10:29:26 +01:00
Andrew Bartlett
3da89b01fa scripting: Move the list of well known SDs to samba.provision.descriptor
This will allow us to call this from dbcheck.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 10:27:58 +01:00
Stefan Metzmacher
599a699ade s4:torture: let raw.read accept larger reads than 0x10000
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 20 21:53:20 CET 2013 on sn-devel-104
2013-03-20 21:53:20 +01:00
Stefan Metzmacher
c9066b057a s4:torture: raw.read fix large reads against windows
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20 10:07:42 -07:00
Stefan Metzmacher
5a05e687ce s4:smb_server: fix large read_andx requests
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20 09:32:26 -07:00
Andrew Bartlett
21f18d0205 s4-ntvfs: Cast getpid() result to unsigned int for GNU/Solaris build
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15 10:38:36 -07:00
Andreas Schneider
fa6992eae5 torture: Update ndr README.
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Mar 15 13:51:51 CET 2013 on sn-devel-104
2013-03-15 13:51:51 +01:00
Andreas Schneider
56328c0ccb torture: Add ntprinting latin1 test.
Reviewed-by: Günther Deschner <gd@samba.org>
2013-03-15 12:11:03 +01:00
Andrew Bartlett
389197e7c3 scripting: No longer install samba_upgradeprovision
This tool is an important part of the toolkit a Samba Team member can
use to assist a user with the upgrade of a very old Samba 4.0 AD DC
installation.

However, like all powerful tools, it has sharp edges, and these need
to have more protection added before we recommend the tool be used.

The WHATSNEW already indicated that this tool should not be used but a
large number of users have run it, and due to lack of testing in the
past, some have run into bugs.

While this tool can be run in debug modes, by default it simply fixes
the database following a series of internal rule.  This does a good
job much of the time, but does not request permission in the way that
dbcheck does, and will create extra objects for things like the DNS
partitions.

By removing this from the installed binaries, we provide another
signal that it should not be used right now, until these matters are
fixed and some clear documentation on how to safely use the tool can
be written.

Andrew Bartlett

Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Mar 12 02:51:23 CET 2013 on sn-devel-104
2013-03-12 02:51:23 +01:00
Stefan Gohmann
666a5630ef s4-dns: dlz_bind9: Check result to avoid segfault
We saw this issue in a customer environment with many CNF objects. I
wasn't able to reproduce it, but I got the following core dump:

 (gdb) directory samba4-4.0.0~rc6/source4/dns_server/
 Source directories searched: /root/samba4-4.0.0~rc6/source4/dns_server:$cdir:$cwd
 (gdb) bt
 #0  0xb4b0bc13 in dlz_lookup_types (state=0x9648e48, zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", lookup=0xb6db7588, types=0x0) at ../source4/dns_server/dlz_bind9.c:830
 #1  0xb4b0bdb8 in dlz_lookup (zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", dbdata=0x9648e48, lookup=0xb6db7588) at ../source4/dns_server/dlz_bind9.c:875
 #2  0x080b43d8 in dlopen_dlz_lookup ()
 #3  0xb7701755 in findnode () from /usr/lib/libdns.so.81
 #4  0xb7701d22 in find () from /usr/lib/libdns.so.81
 #5  0xb7639e5f in dns_db_find () from /usr/lib/libdns.so.81
 #6  0x08075476 in query_find ()
 #7  0x0807acb9 in ns_query_start ()
 #8  0x08060712 in client_request ()
 #9  0xb743022b in run () from /usr/lib/libisc.so.81
 #10 0xb7216955 in start_thread () from /lib/i686/cmov/libpthread.so.0
 #11 0xb706c1de in clone () from /lib/i686/cmov/libc.so.6
 (gdb) f 0
 #0  0xb4b0bc13 in dlz_lookup_types (state=0x9648e48, zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", lookup=0xb6db7588, types=0x0) at ../source4/dns_server/dlz_bind9.c:830
 830             el = ldb_msg_find_element(res->msgs[0], "dnsRecord");
 (gdb) p res->msgs
 $1 = (struct ldb_message **) 0x0
 (gdb) p res->count
 $2 = 0
 (gdb)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09 06:30:21 +01:00
Andreas Schneider
90cbfc96d1 Make sure to set umask() before calling mkstemp().
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Mar  6 01:16:34 CET 2013 on sn-devel-104
2013-03-06 01:16:34 +01:00
Andreas Schneider
7a50f089e0 s4-libregistry: Improve NULL handling of name.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:30:11 +01:00
Andreas Schneider
17424588c5 dsdb: Check for pointers before we deference them.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:30:08 +01:00
Andreas Schneider
ceb1d8b84a gensec: recv_handler can't be NULL at that point.
We probably want to segfault here if it is NULL.

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:30:05 +01:00
Andreas Schneider
cab969d5ec s4-libregistry: Fix path check and improve while loops.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:30:03 +01:00
Andreas Schneider
2aca90b9a0 s4-libregistry: Make sure we don't dereference a NULL pointer.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:30:01 +01:00
Andreas Schneider
1e4f4f6d92 s4-client: Make sure entry is a valid string.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:29:58 +01:00
Andrew Bartlett
50b42d1c5b s4-lib/socket: Return the original EMSGSIZE when sendto() and setsockopt() both fail
This ensures that should we be unable to increase the socket size, we return an
error that the application layer above might expect and be able to make
as reasonable response to (such as switching to a stream-based transport).

This fixes up c692bb02b0.

As suggested by metze in https://bugzilla.samba.org/show_bug.cgi?id=9697#c4

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:38:23 +01:00
Andrew Bartlett
b9b6375699 selftest: Remove output directories to save disk space
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:35:05 +01:00
Andrew Bartlett
d5d88bd82b samba_upgradeprovision: Do not reset every DN when changing an SD
SD propogation is handled by an LDB module, we do not need to touch each
and every DN to make it happen.

Now that we do not need to put this via a hash, the dnToRecalculate
list is changed to be a list of Dn objects, not strings so that:

if dn in listWellknown

is handled using a schema comparison (avoiding different case forms
tripping it up).

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:57 +01:00
Andrew Bartlett
0f247dce00 samba_upgradeprovision: do not maintain dnNotToRecalculate as a list
We only need a boolean indication, not the actual values.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:51 +01:00
Andrew Bartlett
9bc32bfd65 samba_upgradeprovision: only run rebuild_sd in --full mode
This is a potentially destructive routine, and should not be run by default.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:41 +01:00
Andrew Bartlett
81cda856fa samba_upgradeprovision: Remove alwaysRecalculate, this is too dangerous
I am unclear on why this was added, but the idea that we ever always reset data
in the directory is not reasonable to me, so I am removing it.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:33 +01:00
Andrew Bartlett
09b82d5fdc samba_upgradeprovision: Remove unused checkKeepAttributeOldMtd
lastProvisionUSNs is never None, instead the code requries the administrator to populate this
attribute in the directory.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:26 +01:00
Andrew Bartlett
5074b98714 scripting: Rework samba.upgradehelpers.get_diff_sddls to be get_diff_sds
This moves the SDDL conversion inside the get_diff_sds function and prepares
for removing inherited ACEs from the SD before comparison.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:08 +01:00
Andrew Bartlett
787a6aacc3 samba_upgradeprovision: Remove auto-detection of pre-alpha9 databases
These are incredibly rare, and administrators running such databases
not only ask the Samba Team for help personally, they can read --help.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:04 +01:00
Andrew Bartlett
9d6af4938f selftest: Rename samba4.blackbox.upgradeprovision.py to samba4.blackbox.upgradeprovision.current
This name matches the other upgradeprovision tests for older saved provisions.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:32:49 +01:00
Andrew Bartlett
d7936ee20c selftest: Add ldapcmp to ensure upgradeprovision of a fresh DB is a no-op
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:32:21 +01:00
Andrew Bartlett
f1f36ad351 selftest: Add in a provision from 4.0.0 to run tests against
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:32:11 +01:00
Landon Fuller
c692bb02b0 Handle EMSGSIZE on UNIX domain sockets.
On some systems (eg, FreeBSD) the default SO_SNDBUF for UNIX
domain sockets is to small, and EMSGSIZE is returned. Other
systems provide a larger default send buffer, but there is
still no guarantee that the buffer will be sized appropriately.

This patch modifies the sendto() path to attempt to resize
the SO_SNDBUF dynamically upon an EMSGSIZE failure, and then
retry the send.

This fixes local DCE/RPC errors on FreeBSD, eg:

https://lists.samba.org/archive/samba-technical/2013-January/089881.html

Signed-Off-By: Landon Fuller <landonf@bikemonkey.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  2 23:34:03 CET 2013 on sn-devel-104
2013-03-02 23:34:03 +01:00
Landon Fuller
2cfbfa6337 Remove incomplete check for IPv6 link-local addresses.
This has been superceded by a check for link-local
addresses in get_interfaces()

Signed-Off-By: Landon Fuller <landonf@bikemonkey.org>
Reviewed-By: Richard Sharpe <realrichardsharpe@gmail.com>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  2 08:38:54 CET 2013 on sn-devel-104
2013-03-02 08:38:54 +01:00
Jelmer Vernooij
87afc3aee1 Move python modules from source4/scripting/python/ to python/.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  2 03:57:34 CET 2013 on sn-devel-104
2013-03-02 03:57:34 +01:00
Andrew Bartlett
2d13532cb3 build: Rename samba_python waf node to avoid duplicate name
This makes it clearer when debuging build issues.

Andrew Bartlett
2013-03-02 02:16:52 +01:00
Stefan Metzmacher
1b75475ade s4:lib/events: make use of samba_tevent_set_debug()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28 12:12:36 +01:00
Stefan Metzmacher
8ec4d9cb00 s4:pyregistry: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28 12:07:31 +01:00
Stefan Metzmacher
5aee3a45e4 s4:pygensec: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28 12:07:04 +01:00
Michael Adam
f14ba6460a s4:winbindd: fix spacing and line length in cmd_getpwnam_recv_domain()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 28 03:54:41 CET 2013 on sn-devel-104
2013-02-28 03:54:41 +01:00
Michael Adam
bb0e4cbc3c s4:winbindd: do not drop the workgroup name in the getgrgid call
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 27 05:44:39 CET 2013 on sn-devel-104
2013-02-27 05:44:39 +01:00
Michael Adam
ecd0b10d2f s4:winbindd: do not drop the workgroup name in the getgrnam and getgrent calls.
Signed-off-by: Michael Adam <obnox@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-27 14:01:59 +11:00
Andreas Schneider
6213606771 s4-lib: Don't leak plugin handle on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
aa6cc31ef9 s4-policy: Fix memory leaks in push_recursive().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
82e9ff81cf s4-cifsdd: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
f4d1e8c1e2 s4-registry: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
66ee744ccb s4-registry: Don't leak memory on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
cf8be08968 s4-client: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
6ac1435ab3 torture: Don't leak file resource handle in spoolss test.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
b91a20f704 s4-client: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
34ad9756d7 s4-client: Don't leak resource handle.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
e762858a05 torture: Make sure we don't overrun the buffer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
1d24fa6919 torture: Fix memcmp of short buffer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
aff301d9eb torture: Fix array access in spoolss test.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
5207d456f1 s4-libcli: Check return value of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
9e6e9c7707 pyauth: Check return value of lpcfg_from_py_object().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
318ecbc208 s4-libcli: Check return code of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Andreas Schneider
a3ac48d07f s4-libcli: Add null check for ndr functions in rap.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Andreas Schneider
742296d3c3 torture: Fix samsync domain_name checks.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Andrew Bartlett
e4d85fa73d dsdb-descriptor: Avoid segfault copying an SD without an owner or group
This is an unusual SD, but it does exist is some very old upgraded databases.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 22 11:06:17 CET 2013 on sn-devel-104
2013-02-22 11:06:17 +01:00
Andrew Bartlett
87db2331fc dsdb-descriptor: Spell out security descriptor flags as constants
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-22 09:19:41 +01:00
Andrew Bartlett
a166a3484a torture-drs: Fix comment in replica_sync test
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-22 09:19:41 +01:00
Andrew Bartlett
59e8321324 torture-drs: Make the samba4.drs.repl_schema.python emit failures, not errors on add failure
This then allows this particular failure to be masked with a knownfail.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-22 09:19:41 +01:00
Rusty Russell
2f4b21bb57 ntdb: switch between secrets.tdb and secrets.ntdb depending on 'use ntdb'
Since we open with dbwrap, it auto-converts old tdbs (which it will
rename to secrets.tdb.bak once it's done).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Wed Feb 20 07:09:19 CET 2013 on sn-devel-104
2013-02-20 07:09:19 +01:00
Stefan Metzmacher
7fb720502f s4:lib/com: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:45 +01:00
Stefan Metzmacher
5d2574edd2 s4:auth/kerberos: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:45 +01:00
Andrew Bartlett
2cf83f7c64 samba_upgradeprovision: Use tdb_util.tdb_copy not shutil.copy2
This is really important, because copying a file will both ignore
locks held by another process and break any locks we hold (due to
POSIX brain-damage regarding multiple fds on one file in a process).

By leaving this to tdbbackup in a child, both of these issues are avoided.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 19 07:48:18 CET 2013 on sn-devel-104
2013-02-19 07:48:18 +01:00
Andrew Bartlett
3c51e18a0c samba_upgradeprovision: Do not update privileges.ldb any more (unchanged since 2009)
This update was only a total oblitoration of the existing database
and not a merge, and the shutil.copy would both disregard and break
locks on the database that are held at this point.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-19 06:08:19 +01:00
Andrew Bartlett
396df64ef6 scripting: Make tdb_copy a common util function in samba.tdb_util
This will allow samba_upgradeprovision to also call it.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-19 06:08:19 +01:00
Andrew Bartlett
2c2759e408 scripting: Make tdb_copy use the python subprocess module
This makes the code more robust to spaces in the file names (etc).

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-19 06:08:19 +01:00