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

98798 Commits

Author SHA1 Message Date
Martin Schwenke
b38137a389 ctdb-doc: Move --listen documentation from debugging options
There are valid real-world use cases.  Improve the documentation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-04-27 03:32:11 +02:00
Martin Schwenke
0ae57588eb ctdb-scripts: Simplify a command pipeline
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-04-27 03:32:11 +02:00
Martin Schwenke
1092f9755f ctdb-scripts: Replace uses of "ctdb pnn" with ctdb_get_pnn()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-04-27 03:32:10 +02:00
Martin Schwenke
09b5e4978a ctdb-scripts: Changed uses of "ctdb xpnn" to ctdb_get_pnn()
"ctdb xpnn" does not work when sysctl net.ipv4.ip_nonlocal_bind=1,
since it determines the node by attempting to bind to each addres in
the nodes file.  The solution is to not use "ctdb xpnn".  After the
initial call, ctdb_get_pnn() will be more efficient that "ctdb xpnn".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-04-27 03:32:10 +02:00
Martin Schwenke
af93ae1a54 ctdb-tests: New function ctdb_set_pnn() to change PNN
ctdb_get_pnn() incorrectly caches to the same file regardless of what
node is selected via FAKE_CTDB_PNN.

Instead, set the PNN using new function ctdb_get_pnn(), which also
makes CTDB_VARDIR point to a node-specific subdirectory.  This means
that ctdb_get_pnn() will correctly cache to the node-specific
directory.

Fake tickle and TDB files/directories used by the ctdb stub need to be
the same across all PNNs, so change these to use
$EVENTSCRIPTS_TESTS_VAR_DIR instead of node-specific $CTDB_VARDIR.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-04-27 03:32:10 +02:00
Martin Schwenke
579dda6858 ctdb-scripts: New function ctdb_get_pnn() does cached retrieval of PNN
This avoids the expense of establishing a client connection to the
daemon just to get the PNN of the current node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-04-27 03:32:10 +02:00
Ralph Boehme
ec085fe8b3 Revert "wafsamba: flags from enviroment are put before our own internal versions"
This reverts commit b2bb6aeb80.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun Apr 26 18:40:39 CEST 2015 on sn-devel-104
2015-04-26 18:40:39 +02:00
Jeremy Allison
49030649db s4: rpc: Refactor dcesrv_alter() function into setup and send steps.
Fixes bug:

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

Based on code from Julien Kerihuel <j.kerihuel@openchange.org>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 25 02:43:22 CEST 2015 on sn-devel-104
2015-04-25 02:43:22 +02:00
Christof Schmitt
e4f2fa2c67 sharesec: Use common parse_ace function
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
cea5045412 sharesec: Print ACEs in similar format as expected in input
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
9e10ddd00e util_sd: Make server conncection optional
If cli is not set, only attempt numeric conversions.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
42c46ab642 smbcacls: Move sec_desc_print to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
541ddde872 smbcacls: Move print_ace and parse_ace to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
a519b3e6c6 smbcacls: Move StringToSid to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
7eeca44f03 smbcacls: Move SidToString to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:23 +02:00
Christof Schmitt
9e1ebdc7ec smbcacls: Use defines for security flags
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:23 +02:00
Christof Schmitt
d0c4969581 smbcacls: Make 'numeric' a local variable
This will allow moving code to a shared file without relying on a global
variable.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:23 +02:00
Michael Adam
3e5d527766 docs: correctly depend on used xsl files and catalog for building manpages.t
So changes in (e.g.) our man.xsl will trigger a rebuild of the manpages.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Apr 24 15:39:31 CEST 2015 on sn-devel-104
2015-04-24 15:39:31 +02:00
Andreas Schneider
86652c0208 s4-setup: Add saltPrincipal to secrets_dns.ldif
This adds the correct salt principal to the secretsdb so that we
generate a valid keytab entries for AES and DES keys. The test doesn't
fails with Heimdal cause it always uses RC4 which doesn't have a salt.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Apr 24 13:02:37 CEST 2015 on sn-devel-104
2015-04-24 13:02:37 +02:00
Petr Viktorin
78cdd5ea7d buildtools: Use all of pyext_PATTERN in map_shlib_extension
In Python 3, C extension module filenames have an ABI tag;
the pyext_PATTERN is e.g. "%s.cpython-34m.so".
The build system was only using the last dot-separated element
of that extension (the ".so").

Use the whole extension when constructing the final filename.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Fri Apr 24 04:26:45 CEST 2015 on sn-devel-104
2015-04-24 04:26:45 +02:00
Petr Viktorin
cc491fb080 buildtools: Honor LDVERSION when looking for Python library
Since Python 3.2, Python .so files are tagged for ABI compatibility,
so the library name is something like libpython3.4m.so (note the 'm').
This information is found in distutils.sysconfig.get_config_var('LDVERSION')

This fixes waf issue 1405 (https://code.google.com/p/waf/issues/detail?id=1405)

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-04-24 01:50:11 +02:00
Petr Viktorin
8ac21ec4aa pytalloc: Add tests
Add tests for pytalloc.

Since talloc objects can't be created from Python, a C extension
with helpers is added.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-04-24 01:50:11 +02:00
Petr Viktorin
50311c7606 wafsamba: Add install argument to SAMBA_PYTHON
This allows building Python modules that are only used for testing.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-04-24 01:50:11 +02:00
Petr Viktorin
8ac9c860de pytalloc: Fix comparison of disparate types
When fed Python objects of different types, pytalloc_default_cmp
compared pointers to PyType objects that weren't part of an array,
resulting in undefined behavior.

This makes things a bit better (though it still casts ptrdiff_t to int).

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-04-24 01:50:11 +02:00
Michael Adam
51ae17b070 docs: overhaul the description of "smb encrypt" to include SMB3 encryption.
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): Fri Apr 24 00:53:20 CEST 2015 on sn-devel-104
2015-04-24 00:53:20 +02:00
Richard Sharpe
471744a32d Make sure we initialize conn to NULL, because a routine we call may give an error and not touch conn, and then we get an error when trying to TALLOC_FREE it.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-23 22:17:12 +02:00
Volker Lendecke
79dc084dcb torture: Add smb2.notify.rmdir
We need to cancel a pending FileChangeNotify with DELETE_PENDING if the
directory watched is about to be deleted.

I know I just deleted a bool parameter, but to me torture is different :-)

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 Apr 23 01:36:48 CEST 2015 on sn-devel-104
2015-04-23 01:36:48 +02:00
Volker Lendecke
50a1247927 smbd: Cancel pending notifies if the directory goes away
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-22 23:00:20 +02:00
Volker Lendecke
b0d4a7daa1 smbd: Remove bool arg from set_delete_on_close_lck
We now have reset_delete_on_close_lck, this was called with "true"
everywhere now.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-22 23:00:20 +02:00
Volker Lendecke
1f3735a28c smbd: Use reset_delete_on_close_lck directly
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-22 23:00:20 +02:00
Volker Lendecke
d75a0a589f smbd: Introduce reset_delete_on_close_lck
Boolean flags passed down make things more complex than necessary...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-22 23:00:20 +02:00
Ralph Boehme
9e7cf87a30 s3:smbd: use smbd_reinit_after_fork
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-22 23:00:20 +02:00
Ralph Boehme
b4a0864f64 s3:smbd: add wrapper around reinit_after_fork
smbd_reinit_after_fork is a simple wrapper around reinit_after_fork that
should be used after forking from the main smbd.

At the moment the only additional step it performs is resetting
am_parent to NULL.

A subsequent commit will make use of this function.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-22 23:00:20 +02:00
Günther Deschner
2e2ff8bbea s4-torture: add one more test for witness_RegisterEx() and invalid sharenames.
Guenther

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

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Apr 22 20:21:18 CEST 2015 on sn-devel-104
2015-04-22 20:21:18 +02:00
Günther Deschner
e99150c872 s4-torture: fix invalid dereference of binding handle in mgmt test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Günther Deschner
5e52f73f75 s4-torture: do some additional length checks for the mgmt_inq_princ_name test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Günther Deschner
94844d58cc s4-torture: use torture_assert() macros in mgmt test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Günther Deschner
b21be0fa87 s4-torture: use torture_comment instead of printf in mgmt test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Günther Deschner
3e1230e34a s4-torture: pass down struct torture_context to some more calls in mgmt test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Günther Deschner
8e16fea41a s4-torture: use tctx torture_context argument consistently.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Günther Deschner
3e7a15846a s4-torture: strip trailing whitespace.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-04-22 17:43:21 +02:00
Michael Adam
464f4b95c6 param: remove two unused #defines
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Wed Apr 22 16:37:12 CEST 2015 on sn-devel-104
2015-04-22 16:37:12 +02:00
Michael Adam
40c9cc150a s3:param: remove arg save_defaults from lp_load_with_registry_shares()
This is only used in command line contexts, especially for testparm
which relies on safe defaults. The only changed use is in sharesec,
but it does not harm to also safe the defaults there.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
0e0d77519c s3:param: remove arg initialize_globals from lp_load_with_registry_shares()
This is only ever called in client context, and only called once.
So there is no point at all in requesting reinit_globals.
Set it to false.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
55bf0d0a2b s3:param: rename arg initialize_globals->reinit_globals in lp_load()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
3a8952e3e7 s3:param: rename arg initialize_globals->reinit_globals in lp_load_ex()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
8b7acbbc80 s3:param: fix a comment
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
af539f44a9 s3:param: use GLOBAL_SECTION_SNUM in lp_enforce_ad_dc_settings()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
3dbff676ea s3:param: factor lp_enforce_ad_dc_settings() out of lp_load_ex()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
db60f1d956 s3:param: in lp_load_initial_only(), make sure to save defaults.
This is the initial loading of the config in the daemons (and some tools).
So we should save the defaults here. This should especially take into account
some dynamic defaults like log file and maybe some changed values
handed in via the command line.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00