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

94459 Commits

Author SHA1 Message Date
Christof Schmitt
7f2d12c4c0 Rename module init functions from samba_init_module
Some modules use samba_init_module as the name for the init functions,
others use a name based on the module name.

Rename the init functions from samba_init_module, to be consistent
across all modules. This change also allows to build idmap_tdb2 and
perfcount_test statically.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  2 08:50:04 CEST 2014 on sn-devel-104
2014-04-02 08:50:03 +02:00
Andrew Bartlett
014342746f libsmbclient: Wrap more function calls in talloc_stackframe() to protect against talloc_tos() calls
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8449

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  2 02:36:08 CEST 2014 on sn-devel-104
2014-04-02 02:36:08 +02:00
Andrew Bartlett
8f3a516acb pam_smbpass: Wrap calls in talloc_stackframe() to avoid warnings about leaking memory
Any code in source3 is permitted to use talloc_tos() at any point, so we must protect all the library interfaces
against memory leaks this way.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-02 00:31:48 +02:00
Andrew Bartlett
bc5bd4010e libsmb: Provide a talloc_stackframe() to external users of libsmb_setget.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-02 00:31:48 +02:00
Andrew Bartlett
1bdc635f1d selftest: Remove reduction in time window in delaywrite test
This causes flakey autobuilds from time to time.

The reduction in the time window to 30% was added in:

commit c2df97f57c
Author: Jeremy Allison <jra@samba.org>
Date:   Thu Nov 5 15:37:26 2009 -0800

    Fix up some of the timing constants for DELAYWRITE. Add some extra tests up test_delayed_write_update6
    to investigate what happens to a sticky write handle after a second handle close.
    Jeremy.

The original reduction to 75% was set in the new code

commit 0d0fddf8ae
Author: Jeremy Allison <jra@samba.org>
Date:   Fri Sep 5 14:24:36 2008 -0700

    Added tests that show that write time update is immediate
    when changing file size using SMBwrite of size zero,
    SET_END_OF_FILE, or SET_ALLOCATION_SIZE - no 2 second
    delay in these cases.
    Jeremy.
    (This used to be commit 3aa7523d77)

and in:

commit edb3a83a06
Author: Stefan Metzmacher <metze@samba.org>
Date:   Tue Apr 8 10:25:51 2008 +0200

    BASE-DELAYWRITE: use timeval_* and make it possible to spefic the writetime update delay

    metze
    (This used to be commit 751ab2992a)

Change-Id: I8ff9fb8a8b66308f6d784351a0f43b5b234889d1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-02 00:31:48 +02:00
Andreas Schneider
547f682c15 s3-smbd: Align debug level for the same information.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10388

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr  1 23:16:19 CEST 2014 on sn-devel-104
2014-04-01 23:16:19 +02:00
Andreas Schneider
c7c969439d s3-nmbd: Align debug level for the same information.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10388

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2014-04-01 21:15:36 +02:00
Gregor Beck
6cdde2711b ctdb:daemon avoid goto ctdb_remove_orphaned_ifaces()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Apr  1 02:59:05 CEST 2014 on sn-devel-104
2014-04-01 02:59:05 +02:00
Gregor Beck
dd56afc7df ctdb:daemon take a shortcut in all_nodes_are_disabled()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-04-01 00:55:45 +02:00
David Disseldorp
d550acf24a rpcclient: abort shadow-copy set on commit failure
Use similar behaviour to the diskshadow.exe FSRVP client, which aborts
the shadow-copy set if it receives a failed commit response.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr  1 00:54:06 CEST 2014 on sn-devel-104
2014-04-01 00:54:05 +02:00
David Disseldorp
cbc6082ec7 torture: test FSRVP UNCs with and without trailing slashes
The trailing slash should not make a difference, unless the target share
is hidden.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
David Disseldorp
d9bc82d90d rpcclient: append a trailing slash to FSRVP request UNCs
The Windows Server 2012 FSRVP server exhibits strange behaviour when
exposing hidden shadow copy shares. If the hidden share UNC in the
AddToShadowCopySet request includes a trailing backslash (e.g.
"\\server\share$\"), then the new shadow-copy share will also be hidden
(e.g. "\\server\share$@{ShadowCopy.ShadowCopyId}$").
However, if the UNC does not include a trailing backslash, which until
now was rpcclient's default behaviour, then the exposed shadow-copy
share is not hidden.

Thanks to the MS Open Specifications team for helping me track down this
one.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
cb435fd493 messaging4: Simplify irpc_namedb_open a bit
It does not really need the msg_ctx, and it also removes the implicit talloc
hierarchy.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
1f43a4ccaf messaging4: Remove lp_ctx from imessaging_context
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
27d2cd4daa messaging4: Store a names_db handle in the imessaging_context
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
da8b009ff7 messaging4: Add some NULL checks
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
193bd7d976 messaging4: Add "goto fail" to imessaging_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
d6db35d7a5 tdb_wrap: Remove tdb_wrap_open_ again
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:14 +02:00
Volker Lendecke
f995c6e6d4 ntvfs: Avoid passing lp_ctx to tdb_wrap_open in py_wrap_setxattr
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
328afb8d3e mutex: Avoid passing lp_ctx to tdb_wrap_open in grab_named_mutex
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
994d75574b dbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_ctdb
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
604b970d67 serverid: Avoid passing lp_ctx to tdb_wrap_open in serverid_parent_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
801b947e12 vfs: Avoid passing lp_ctx to tdb_wrap_open in posix_eadb_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
12b8df1ba2 messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_parent_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
d169d0d9e2 messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
acbc1ed703 dbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_tdb
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
db630a5253 imessaging: Avoid passing lp_ctx to tdb_wrap_open in irpc_namedb_open
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
0b59f05de7 ntvfs: Avoid passing lp_ctx to tdb_wrap_open in py_wrap_getxattr
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
3a0ea071ad ntvfs: Avoid passing lp_ctx to tdb_wrap_open in pvfs_setup_options
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
2ae3565a55 torture: Avoid passing lp_ctx to tdb_wrap_open in test_tdb_speed
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
eee3723df0 dsdb: Avoid passing lp_ctx to tdb_wrap_open in partition_metadata_open
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
76318acc60 dsdb: Avoid passing lp_ctx to tdb_wrap_open in schema_metadata_open
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
92d20d77b1 secrets: Avoid passing lp_ctx to tdb_wrap_open in randseed_init
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
e2e06b342a param: Add lpcfg_tdb_flags()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
6008e8f944 param: Add lpcfg_tdb_hash_size()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
66e6ffd666 lib: Add interim tdb_wrap_open_ without lp_ctx
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
ccec132502 lib: Pull up lp_ctx use one level
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Volker Lendecke
a9ebe2f71a lib: Fix blank line endings
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Guenter Kukkukk
07b495b271 fix 2 typos
Signed-off-by: Guenter Kukkukk <linux@kukkukk.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:13 +02:00
Gregor Beck
465bb58fed s3:rpcclient: fix build without HAVE_IPV6
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-31 22:52:12 +02:00
Amitay Isaacs
7667da6590 ctdb-readonly: Do not use hard-coded value for readonly revoke timeout
In case of control timeouts, readonly revoke code currently aborts.  This
needs to be fixed.  Meanwhile, using control_timeout instead of 5 seconds,
increases the timeout to 60 seconds.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Mar 31 07:20:48 CEST 2014 on sn-devel-104
2014-03-31 07:20:48 +02:00
Stefan Metzmacher
a2c3479878 Revert "s4:tls_tstream: allow mode of SSL keyfile to be 0400, not only 0600"
This reverts commit 05c1fe5055.

This was discussed here:
https://bugzilla.samba.org/show_bug.cgi?id=10392#c11

This generated warnings like:
invalid permissions on file
'/memdisk/metze/W/b138235/samba/bin/ab/promoted_dc/private/tls/key.pem': has
0600 should be 0400'.

I think we need a better way. Maybe file_check_permissions()
should get allow_perms and deny_perms. And we would call it
with allow_perms = 0400 and deny_perms = 0177. And bits in none
of them are ignored.

For now we revert this and wait for a better fix.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Mar 28 12:37:17 CET 2014 on sn-devel-104
2014-03-28 12:37:17 +01:00
Stefan Metzmacher
0dd648a54e s4:librpc/rpc: remember "ncalrpc_dir" on the dcerpc_pipe->binding
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): Fri Mar 28 10:34:51 CET 2014 on sn-devel-104
2014-03-28 10:34:51 +01:00
Stefan Metzmacher
d29c143fae pidl:Samba4/Python: add interface.abstract_syntax() to each interface
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
6d6427b7c8 s4:pyrpc: add base.transfer_syntax_ndr*()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
ae02bf6f06 s4:pyrpc: add py_dcerpc_syntax_init_helper()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
4f0d5981f1 s4:librpc: compile python bindings for dcerpc.idl
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
eabdbc8860 dcerpc.idl: hide (ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT) logic behind a define
This way we can alter the define depending on the generated code.

E.g python bindings won't have an 'ndr' struct available.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
f73ef3028c dcerpc.idl: fix dcerpc_bind_nack definition
The version array is always present.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
97302100d0 dcerpc.idl: fix typo s/ist/int
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:24 +01:00