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

104998 Commits

Author SHA1 Message Date
Günther Deschner
23f404b7f5 spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes
This change makes automatic mapping for PAR->RPRN opcodes easier.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Martin Schwenke
0ec01826d3 ctdb-daemon: Log when removing stale Unix domain socket
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12287

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

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Sep 22 12:28:12 CEST 2016 on sn-devel-144
2016-09-22 12:28:12 +02:00
Martin Schwenke
8eff9e9603 ctdb-daemon: Drop attempt to connect to Unix domain socket
This was a weak attempt at exclusivity.  PID file creation now does
that properly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-22 08:34:20 +02:00
Martin Schwenke
d719a87fe0 ctdb-daemon: Don't try to reopen TDB files
There aren't any open at this stage.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-22 08:34:20 +02:00
Martin Schwenke
1e501c7749 ctdb-daemon: Bind to Unix domain socket after PID file creation
No use touching the socket if PID file creation fails.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-22 08:34:20 +02:00
Martin Schwenke
5148e02adb ctdb-daemon: Use PID file abstraction
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12287

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-22 08:34:20 +02:00
Amitay Isaacs
97b6ac7f66 ctdb-common: Add routines to manage PID file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12287

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-22 08:34:20 +02:00
Amitay Isaacs
8b979c729b ctdb-locking: Restrict lock debugging to once per second
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-22 08:34:20 +02:00
Amitay Isaacs
cdc46ef9d7 ctdb-locking: Log if ctdb is unable to take db locks in INACTIVE state
This is useful information if ctdb is unable to freeze any of the
databases on banning or stopping.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-22 08:34:20 +02:00
Martin Schwenke
25c7fa285d ctdb-tests: Produce clear errors for missing IPv6 node IP addresses
This replaces a broken FIXME comment in the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-22 08:34:20 +02:00
Martin Schwenke
8772e1c795 ctdb-tests: Fix typo in local daemons IPv6 setup
This should be a sub-shell not an arithmetic expansion.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-22 08:34:20 +02:00
Rowland Penny
8f0cc7eaae remove duplicate lines from 'man smb.conf'
Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 21 17:18:46 CEST 2016 on sn-devel-144
2016-09-21 17:18:46 +02:00
Ralph Boehme
1b9787b319 docs/vfs_fruit: explain when to use vfs_catia
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 21 03:54:59 CEST 2016 on sn-devel-144
2016-09-21 03:54:59 +02:00
Lukas Slebodnik
fa99ae70f1 tls: Fix warning Wunused-variable
The variable error_pos is used only with enabled ENABLE_GNUTLS
There are warnings if compiled witout gnutls

../source4/lib/tls/tls_tstream.c: In function ‘_tstream_tls_connect_send’:
../source4/lib/tls/tls_tstream.c:1053:14:
    warning: unused variable ‘error_pos’ [-Wunused-variable]
  const char *error_pos;
              ^~~~~~~~~
../source4/lib/tls/tls_tstream.c: In function ‘_tstream_tls_accept_send’:
../source4/lib/tls/tls_tstream.c:1333:14:
     warning: unused variable ‘error_pos’ [-Wunused-variable]
  const char *error_pos;
              ^~~~~~~~~

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 21 00:01:09 CEST 2016 on sn-devel-144
2016-09-21 00:01:08 +02:00
Andreas Schneider
382345126c nsswitch: Also set h_errnop for nss_wins functions
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12269

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>

Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Sep 20 20:16:43 CEST 2016 on sn-devel-144
2016-09-20 20:16:43 +02:00
Andreas Schneider
d8a5565ae6 waf: Explicitly link against libnss_wins.so
If we do not specify replace as a depencency here, it will not link to
libreplace using an rpath.

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

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

Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Sep 20 08:00:08 CEST 2016 on sn-devel-144
2016-09-20 08:00:08 +02:00
Andreas Schneider
124ae4e861 nsswitch: Add missing arguments to wins gethostbyname*
The errno pointer argument is missing.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
2016-09-20 04:10:21 +02:00
Volker Lendecke
b208499960 gencache: Bail out of stabilize if we can not get the allrecord lock
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12045

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): Tue Sep 20 04:09:33 CEST 2016 on sn-devel-144
2016-09-20 04:09:33 +02:00
Ralph Boehme
70e2418975 s3/smbd: use correct talloc memory context for tevent subrequests
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Sep 19 23:25:37 CEST 2016 on sn-devel-144
2016-09-19 23:25:37 +02:00
Amitay Isaacs
28fad1c59d ctdb-daemon: Log a message when vfork() takes long time
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Sep 19 12:18:15 CEST 2016 on sn-devel-144
2016-09-19 12:18:15 +02:00
Amitay Isaacs
06171961d6 ctdb-daemon: Log a message when fork() takes long time
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-19 08:23:22 +02:00
Amitay Isaacs
a69d1e202a ctdb-daemon: Avoid extra condition in tevent trace callback
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-19 08:23:22 +02:00
Amitay Isaacs
6b93b57921 ctdb-recovery-helper: Add missing initialisation of ban_credits
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12275

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-19 08:23:22 +02:00
Jeremy Allison
085542fc93 lib: poll_funcs : poll_funcs_context_slot_find can select the wrong slot to replace.
Look for an exact match first, before a free slot.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Sep 19 07:12:00 CEST 2016 on sn-devel-144
2016-09-19 07:11:59 +02:00
Ralph Boehme
ee64d3f1d8 s4/messaging: let the imessaging ctx destructor free msg_dgm_ref
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12272

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-19 03:32:10 +02:00
Ralph Boehme
c132b78c48 lib/poll_funcs: free contexts in poll_funcs_state_destructor()
This ensures the destructors get called in the proper order.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-19 03:32:10 +02:00
Ralph Boehme
5d2ca25866 lib/poll_funcs: free timers in poll_funcs_state_destructor()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12272

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-19 03:32:10 +02:00
Ralph Boehme
4f9d956fc4 s3/smbd: remove a misleading error message
It can happen that we get 0 cleanup events, so remove this error
message.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Sep 16 16:43:16 CEST 2016 on sn-devel-144
2016-09-16 16:43:16 +02:00
Volker Lendecke
def65c507b tevent_tutorial: Fix tevent_thread referencing
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): Fri Sep 16 05:16:02 CEST 2016 on sn-devel-144
2016-09-16 05:16:00 +02:00
Volker Lendecke
60fe6e9fab tevent_tutorial: Fix typos
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-16 01:31:13 +02:00
Ralph Boehme
2a2ac63975 s3/smbd: set FILE_ATTRIBUTE_DIRECTORY as necessary
Some VFS modules like GPFS will always return success from
SMB_VFS_GET_DOS_ATTRIBUTES() but only set a subset of the attributes. It
neither sets FILE_ATTRIBUTE_NORMAL nor FILE_ATTRIBUTE_DIRECTORY.

We already handle the case that the VFS stack returns with result==0 and
then add the FILE_ATTRIBUTE_NORMAL, regardless of the type of the
filesystem object. If we want to handle result==0 situation in the
SMB_VFS_GET_DOS_ATTRIBUTES() caller, then do it right by either setting
FILE_ATTRIBUTE_NORMAL or FILE_ATTRIBUTE_DIRECTORY.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 16 00:34:43 CEST 2016 on sn-devel-144
2016-09-16 00:34:42 +02:00
Christof Schmitt
5d4f7bfda5 nfs4acl: Fix owner mapping with ID_TYPE_BOTH
This fixes a corner case when using NFS4 ACLs with ID_TYPE_BOTH.  Before
this patch, the owner entry in the ACL would be mapped to a gid entry in
the NFSv4 ACL, and not the expected special owner entry. This is caused
by the id mapping returning a valid gid and the nfs4 mapping assumed
that this was actually a group.

Fix this by asking for the uid first, and explicitly checking if the
mapped uid matches the owner. That creates a uid entry in the NFSv4 ACL
that can be changed later in smbacl4_substitute_{simple,special} to the
expected special owner entry.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-15 20:50:06 +02:00
Günther Deschner
a9a1a16cc8 s3-spoolss: fix winreg_printer_ver_to_qword
We were reporting the OS minor number as the driver version number in all
GetDriver/EnumDriver calls.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-15 20:50:06 +02:00
Volker Lendecke
e69b17d603 smbd: Reset O_NONBLOCK on open files
See the comment inline :-)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12268
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Simo <simo@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 15 20:21:41 CEST 2016 on sn-devel-144
2016-09-15 20:21:41 +02:00
Christian Ambach
064d240323 s4:samba_spnupdate: do not attempt to parse log level, use parsed value
The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Sep 14 23:15:18 CEST 2016 on sn-devel-144
2016-09-14 23:15:18 +02:00
Christian Ambach
92178f02bd python/join: do not attempt to parse log level, use parsed value
The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-09-14 19:31:21 +02:00
Christian Ambach
dd25aa129b python/drs_utils: do not attempt to parse log level, use parsed value
The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-09-14 19:31:21 +02:00
Christian Ambach
fa56dbf670 tests/param add a test for LoadParm.log_level
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-09-14 19:31:20 +02:00
Christian Ambach
7ba50a2009 s4:param add log_level function to retrieve log level in Python code
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-09-14 19:31:20 +02:00
Volker Lendecke
e62ff6c41d unix_msg: Fix unix_dgram_send_queue_init
We should not free a DLIST element

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 14 19:30:28 CEST 2016 on sn-devel-144
2016-09-14 19:30:27 +02:00
Volker Lendecke
5f764be23d unix_msg: Fix CID 1372875 Double close
The two error callers of unix_dgram_sendq_schedule_free already run down the
sendq in the error case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2016-09-14 15:42:26 +02:00
Martin Schwenke
9f6015f8a6 ctdb-tests: Add new public IP takeover no-op test
Test with DisableIPFailover=1 and with no public IP addresses
configured.

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

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

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Sep 14 12:30:30 CEST 2016 on sn-devel-144
2016-09-14 12:30:30 +02:00
Martin Schwenke
3adf9cad47 ctdb-tests: Factor out new local daemons functions ps_ctdbd
Useful for being able to ensure that tests are doing what is expected.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:29 +02:00
Martin Schwenke
7ec7d4f3c0 ctdb-ipalloc: ipalloc_set_public_ips() can't fail
So make it a void function.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:29 +02:00
Martin Schwenke
7522a7aee8 ctdb-ipalloc: Move merged IP list creation to ipalloc()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:29 +02:00
Martin Schwenke
c1efb801a4 ctdb-ipalloc: Drop known_ips argument from merged IP list creation
This is available in the IP allocation state.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:29 +02:00
Martin Schwenke
fed251726f ctdb-ipalloc: Optimise check to see if IPs can be hosted
Add an early return if there are no known IP addresses.

Also add an extra comment for clarification.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:29 +02:00
Martin Schwenke
dfc3b8855d ctdb-ipalloc: Whether IPs can be hosted need not depend on merged IP list
Merged IP list won't be available here...

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:29 +02:00
Martin Schwenke
0e5c62d8fc ctdb-ipalloc: Store known public IPs in IP allocation state
This was dropped because it wasn't used, but it will be needed again.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14 08:39:28 +02:00
Martin Schwenke
35dcaadc8e ctdb-packaging: Fix systemd network dependency
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ says:

  network.target has very little meaning during start-up. [...]
  Whether any network interfaces are already configured when it is
  reached is undefined. [...]

  network-online.target is a target that actively waits until the
  ne[t]work is "up",

CTDB expects to be able to bind a socket to a node address and expects
interfaces for public IP addresses to exist.  CTDB also doesn't expect
time to jump, so also wait until time is synchronised.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Steve French <sfrench@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Tested-by: Steve French <sfrench@samba.org>
2016-09-14 08:39:28 +02:00