Karolin Seeger [Tue, 26 Jan 2016 10:17:37 +0000 (11:17 +0100)]
VERSION: Bump version up to 4.5.0pre1
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jan 26 19:12:42 CET 2016 on sn-devel-144
Karolin Seeger [Tue, 26 Jan 2016 10:08:12 +0000 (11:08 +0100)]
VERSION: Set version to 4.4.0rc1...
and disable git snapshots for 4.4.0rc1 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Tue, 26 Jan 2016 09:57:00 +0000 (10:57 +0100)]
WHATSNEW: Add smbstatus changes.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Tue, 26 Jan 2016 09:52:15 +0000 (10:52 +0100)]
WHATSNEW: Extend release notes for Samba 4.4.0rc1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Tue, 26 Jan 2016 10:28:50 +0000 (11:28 +0100)]
waf: Only build smb_krb5_wrapper if we have CUPS
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Uri Simchoni [Thu, 21 Jan 2016 19:09:12 +0000 (21:09 +0200)]
disk_quotas: style fix
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 18:28:57 +0000 (20:28 +0200)]
vfs_gpfs: make sure get_quota does not return bogus values
add implementation of get_quota_fn to vfs_gpfs. The implemetation
returns ENOSYS for the case of user and group quota, to make sure
the default VFS does not accidentally succeed (and return wrong
values which would alter the disk-free calculation)
For other quota types the function calls the underlying VFS as
before.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 17:54:06 +0000 (19:54 +0200)]
make disk_norm() static
Now that disk_norm() is being run centrally from the SMB layer
it can be made static.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 13:39:44 +0000 (15:39 +0200)]
vfs_gpfs: do not call disk_norm() on disk_free_fn
This is handled at the SMB layer now.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 13:38:49 +0000 (15:38 +0200)]
vfs_ceph: do not call disk_norm() on disk_free_fn
This is handled at SMB layer now.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 13:29:32 +0000 (15:29 +0200)]
vfs_fake_dfq: remove quota code from disk_free
When mocking disk-free, do not take quota into
account since this is now done in the SMB layer.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 13:15:41 +0000 (15:15 +0200)]
smbd: refactor disk_free handling
Move most of the logic that handles determination of
disk size and free space from default VFS handler to
the SMB layer - letting the VFS handle the basic task
of querying the file system for general stats and
quota.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 12:14:58 +0000 (14:14 +0200)]
vfs_snapper: add get_quota function
This is in preparation for handling the quota part
of disk_free via the VFS - each module with a
disk_free_fn should also have a get_quota_fn.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 12:13:38 +0000 (14:13 +0200)]
vfs_shadow_copy2: add get_quota function
This is in preparation for handling the quota part
of disk_free via the VFS - each module with a
disk_free_fn should also have a get_quota_fn.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 12:10:10 +0000 (14:10 +0200)]
vfs_cap: add get_quota function
This is in preparation for handling the quota part
of disk_free via the VFS - each module with a
disk_free_fn should also have a get_quota_fn.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sun, 10 Jan 2016 11:29:25 +0000 (13:29 +0200)]
vfs: add path parameter to get_quota
Adding a path parameter would allow the VFS get_quota
function to be used for determining the quota/usage
when calculating size and free spacei.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Wed, 6 Jan 2016 10:59:06 +0000 (12:59 +0200)]
selftest: add disk-free and quota tests based on fake_dfq VFS module
These tests use the vfs_fake_dfq module to simulate some
relations between the quota status and disk-free status.
The tests will become meaningful when we take the code that
does those calculations out of the VFS layer - the tests will
then exercise the server code.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Tue, 5 Jan 2016 19:12:00 +0000 (21:12 +0200)]
vfs_fake_dfq: add vfs module
Add a vfs module "vfs_fake_dfq" for mocking disk-free
and user/group quota functions.
In this commit there are quota considerations in
disk_free calculations, based on the mocking of quota.
Those considerations will later be removed once we
refactor the server code to weigh the disk-free and quota in
the smb layer and not in individual vfs implementations.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Sat, 9 Jan 2016 19:24:10 +0000 (21:24 +0200)]
smbd: enable unit-testing of NT_TRANSACT_GET_USER_QUOTA
Processing of NT_TRANSACT_GET_USER_QUOTA involves a security check to
see the user is an admin, allow this check to run in unit-testing mode.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Wed, 6 Jan 2016 11:30:59 +0000 (13:30 +0200)]
quotas: correct comment about SMB_GROUP_QUOTA_TYPE
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Mon, 18 Jan 2016 04:56:43 +0000 (06:56 +0200)]
loadparm: introduce lp_parm_ulonglong() and lpcfg_parm_ulonglong()
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Tue, 26 Jan 2016 09:12:46 +0000 (10:12 +0100)]
smbd:smb2_negprot: implement connection passing based on client_guid
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 18 Sep 2014 17:27:42 +0000 (19:27 +0200)]
smbd:smb2_server: let smbd_server_connection_terminate() only call exit_server() for the last connection
TODO: We need to cancel pending requests on the connection and defer the
talloc_free.
Currently we only ever have one connection.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 22 Jan 2016 12:13:44 +0000 (13:13 +0100)]
smbd:process: use smbXsrv_client_create.
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 18:02:04 +0000 (19:02 +0100)]
smbd:process: treat initialized table in smbXsrv_connection_init_tables
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 26 Jan 2016 00:10:25 +0000 (01:10 +0100)]
smbd: add smbXsrv_client.c
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Mon, 25 Jan 2016 21:50:28 +0000 (22:50 +0100)]
smbd:globals.h: add guid_verified to smbXsrv_connection.smb2.client
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Mon, 25 Jan 2016 23:39:35 +0000 (00:39 +0100)]
idl:smbXsrv: add smbXsrv_connection_pass structures.
To be used for the connection passing message.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Mon, 23 Jun 2014 10:17:04 +0000 (12:17 +0200)]
idl:smbXsrv: add smbXsrv_client_global structures
This is for marshalling smbXsrv_client.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Tue, 24 Jun 2014 05:43:27 +0000 (07:43 +0200)]
idl:messagaing: add MSG_SMBXSRV_CONNECTION_PASS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Mon, 25 Jan 2016 11:01:44 +0000 (12:01 +0100)]
s3:smbd: only process fsctl_network_iface_info if multi channel is enabled
This effectively disables it for now.
Ultimately, we may want to remove this restriction.
Hence a separate patch.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jan 26 10:40:44 CET 2016 on sn-devel-144
Stefan Metzmacher [Fri, 13 Jun 2014 15:42:00 +0000 (17:42 +0200)]
s3:smbd: implement fsctl_network_iface_info
The ioctl used for detecting interfaces for multi-channel.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Mon, 25 Jan 2016 15:35:12 +0000 (16:35 +0100)]
docs:smb.conf: document new extra syntax for interfaces.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 15:22:57 +0000 (16:22 +0100)]
s4:lib:socket: skip extra data in interpret_interface()
This is currently smbd-specific.
No need to duplicate the extended parsing
while these functions have not been merged yet.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 02:38:54 +0000 (03:38 +0100)]
s3:lib: extend interpret_interface() to optionally read speed, caps, and index from config
New syntax for interfaces parameter:
interfaces = address[;key=value[,key=value[,...]]]
- keys can be 'speed', 'capability', and 'if_index'.
- speed is in bits per second.
- capability can be RSS and RDMA.
- if_index should be used with care, because
these indexes should not conicide with indexes
the kernel sets...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Sun, 24 Jan 2016 12:26:35 +0000 (13:26 +0100)]
s3:lib: remove an unmotivated comment from interpret_interface()
This seems to be a left-over from historic code.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 13:09:37 +0000 (14:09 +0100)]
s3:lib: copy speed, cap, and index in add_interface()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 02:38:16 +0000 (03:38 +0100)]
smb.h: add linkspeed, capability, and if_index to interface struct
Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Anoop C S [Fri, 22 Jan 2016 15:21:55 +0000 (20:51 +0530)]
lib:socket: detect link speed with ethtool ioctl in get_interfaces (on linux)
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 02:30:39 +0000 (03:30 +0100)]
build: detect support for ethtool
Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 02:38:31 +0000 (03:38 +0100)]
lib:socket: set defaults for linkspeed and capability in get_interfaces()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 11:23:40 +0000 (12:23 +0100)]
lib:socket: get interface index from kernel
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 02:38:05 +0000 (03:38 +0100)]
lib:socket: add linkspeed, capability and if_index to iface_struct
Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 25 Jan 2016 02:37:38 +0000 (03:37 +0100)]
librpc:idl: define FSCTL_NET_IFACE_NONE_CAPABLE in ioctl.idl
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 21 Jan 2016 11:46:40 +0000 (12:46 +0100)]
s3:lib: add braces around if-block in my_sam_name()
Clean-up after moving the function.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jan 26 03:19:18 CET 2016 on sn-devel-144
Michael Adam [Thu, 21 Jan 2016 11:45:42 +0000 (12:45 +0100)]
s3:lib: remove supefluous comments from map_my_name()
cleanup after moving
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Michael Adam [Thu, 21 Jan 2016 11:44:19 +0000 (12:44 +0100)]
s3:lib: fix white spaces in my_sam_name()
Clean-up after function has been moved.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Uri Simchoni [Tue, 3 Nov 2015 11:21:58 +0000 (13:21 +0200)]
vfs_shadow_copy2: documentation for snapsharepath
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Uri Simchoni [Tue, 3 Nov 2015 09:15:52 +0000 (11:15 +0200)]
vfs_shadow_copy2: add tests for snapsharepath
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Uri Simchoni [Tue, 3 Nov 2015 08:57:13 +0000 (10:57 +0200)]
vfs_shadow_copy2: add snapsharepath parameter
This new parameter defines how to get from the snapshot's
root directory to the share's root directory. It is an
alternative to the "basedir" parameter, but functionally
is a superset of basedir.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Uri Simchoni [Tue, 3 Nov 2015 07:15:12 +0000 (09:15 +0200)]
vfs_shadow_copy2: remove basedir state variable
Remove the basedir state variable from the module-specific data
of vfs_shadow_copy2 - this variable is not being used.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Alexander Bokovoy [Fri, 22 Jan 2016 09:44:03 +0000 (11:44 +0200)]
s3-parm: clean up defaults when removing global parameters
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11693
When globals are re-initialized, they are cleared and globals' talloc
context is freed. However, parm_table still contains a reference to the
global value in the defaults. This confuses lpcfg_string_free() after
commit
795c543d858b2452f062a02846c2f908fe4cffe4 because it tries to
free already freed pointer which is passed by lp_save_defaults():
....
case P_STRING:
case P_USTRING:
lpcfg_string_set(Globals.ctx,
&parm_table[i].def.svalue,
*(char **)lp_parm_ptr(NULL, &parm_table[i]));
....
here &parm_table[i].def.svalue is passed to lpcfg_string_free() but it
is a pointer to a value allocated with previous Globals.ctx which
already was freed.
This specifically affects registry backend of smb.conf in lp_load_ex()
where init_globals() called explicitly to re-init globals after
lp_save_defaults() if we have registry backend defined.
Reviewed-by: Uri Simchoni <uri@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Mon Jan 25 23:58:42 CET 2016 on sn-devel-144
Andreas Schneider [Tue, 12 Jan 2016 14:17:22 +0000 (15:17 +0100)]
s3-client: Add a KRB5 wrapper for smbspool
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11690
We need a wrapper for smbspool to be able to authenticate with Kerberos.
This needs to replace the cups smb backend. The permission need to be
0700 and the owner root.
Note that Kerberos support is broken in CUPS 2.1.2 maybe earlier
versions. It works with 1.6.3.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan 25 19:58:46 CET 2016 on sn-devel-144
Martin Schwenke [Mon, 25 Jan 2016 09:29:35 +0000 (20:29 +1100)]
WHATSNEW: Documentation CTDB changes for v4.4
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Jan 25 16:47:54 CET 2016 on sn-devel-144
Christian Ambach [Sun, 24 Jan 2016 10:57:01 +0000 (11:57 +0100)]
s3:utils/smbget make use of bool for flags
convert flags stored as int to bool
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan 25 13:33:12 CET 2016 on sn-devel-144
Christian Ambach [Sun, 24 Jan 2016 10:45:59 +0000 (11:45 +0100)]
s3:utils/smbget use C99 format identifiers
for ssize_t and off_t variables
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Sun, 24 Jan 2016 10:17:20 +0000 (11:17 +0100)]
s3:utils/smbget code format
adopt the code to latest README.Coding standards
e.g. curly braces everywhere, blanks before braces,
obey 80 character limit (except for the popt definitions)
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Wed, 30 Dec 2015 20:25:13 +0000 (21:25 +0100)]
s3:utils/smbget fix recursive download
get_auth_data is called multiple times (once for the directory listing and then
for every file to be downloaded). Save the obtained values across multiple calls
to make smbclient use the correct username for each download.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=6482
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Martin Schwenke [Mon, 25 Jan 2016 01:52:43 +0000 (12:52 +1100)]
WHATSNEW: CTDB_NATGW_SLAVE_ONLY is no longer used
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): Mon Jan 25 10:23:49 CET 2016 on sn-devel-144
Martin Schwenke [Tue, 5 Jan 2016 04:58:29 +0000 (15:58 +1100)]
ctdb-tools: Drop support for setting and viewing NAT gateway capability
This is no longer used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 5 Jan 2016 04:53:50 +0000 (15:53 +1100)]
ctdb-scripts: No longer set the NAT gateway capability
Nothing checks it anymore.
This means that the NAT gateway capability in the daemon is now
unused.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 21 Jan 2016 01:53:43 +0000 (12:53 +1100)]
ctdb/tools: Update ctdb CLI tool to call ctdb_natgw
The "natgwlist" command is no longer marked "auto all" and is also
marked "without daemon". That latter is not strictly true because
ctdb_natgw needs the daemon so a subsequent invocation of "ctdb
nodestatus" will work. However, "without daemon" is used here because
the top-level "ctdb natgwlist" does not need to open a connection to
the daemon. It just needs to invoke ctdb_natgw.
Update tests to suit.
It would make sense to make "ctdb natgw" generally call out to
ctdb_natgw, passing all argument. However, that can be done later.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 21 Jan 2016 08:35:46 +0000 (19:35 +1100)]
ctdb-tests: Drop some unnecessary NAT gateway tests
These tests deal only with timeouts that can occur retrieving
capabilities. The NAT gateway capability is going away so drop the
tests now to simplify future commits.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 14 Dec 2015 10:37:44 +0000 (21:37 +1100)]
ctdb: Call out to ctdb_natgw helper from 11.natgw
To keep this commit comprehensible, 11.natgw and the CTDB CLI tool are
temporarily inconsistent. The tool will be made consistent in a
subsequent commit.
ctdb_natgw_slave_only() is reimplemented to check for the option in
the appropriate line in $CTDB_NATGW_NODES.
Update unit tests and documentation.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 22 Jan 2016 00:04:22 +0000 (11:04 +1100)]
ctdb-tests: NAT gateway slave-only changes
Handle the "slave-only" option in the unit test setup. Reindent
function while touching it.
Also drop a test that no longer makes sense. Specifying both "master"
and "slave-only' is now much more obvious, since they need to be on
the same line, and is now punishable by undefined behaviour.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 5 Jan 2016 02:09:05 +0000 (13:09 +1100)]
ctdb-scripts: New function ctdb_natgw_slave_only()
This allows future changes to be more self-contained.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 14 Dec 2015 10:08:03 +0000 (21:08 +1100)]
ctdb-tests: Test ctdb CLI tool via a stub
Some features, such NAT gateway and LVS support, can be implemented
without daemon and (internal) ctdb CLI tool support. These are
non-core features that don't need incredible performance and they
don't need to be in the core code. They can easily be reimplemented
in scripts, along with some configuration changes.
For continuity, the ctdb CLI tool code will call out to helper scripts
so that the current status information can still be provided. Those
helper scripts may then reinvoke the ctdb CLI tool to gather
information.
So, redo the tool testing using a "ctdb" stub command. This will
swallow standard input and feed it to the test program each time the
"ctdb" stub is called.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 14 Dec 2015 00:34:41 +0000 (11:34 +1100)]
ctdb-tools: Add standalone ctdb_natgw tool script
This is intended to replace the use of "ctdb natgwlist" in 11.natgw
and provide different views of the NAT gateway status.
It replaces the use of CTDB_NATGW_SLAVE_ONLY=yes with a "slave-only"
keyword in the NAT gateway nodes file. This means the nodes file must
be consistent on all nodes in a NAT gateway group.
Note that this script is not yet integrated, so there are no behaviour
or documentation changes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 18 Dec 2015 05:23:04 +0000 (16:23 +1100)]
ctdb-scripts: Tests for monitoring of CTDB_NATGW_PUBLIC_IFACE
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 18 Dec 2015 05:22:14 +0000 (16:22 +1100)]
ctdb-scripts: Move monitoring of CTDB_NATGW_PUBLIC_IFACE to 11.natgw
The NAT gateway code should be self-contained.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 20 Jan 2016 08:14:15 +0000 (19:14 +1100)]
ctdb-scripts: CTDB_PARTIALLY_ONLINE_INTERFACES incompatible with NAT gateway
This has always been the case. Now it is documented and enforced.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 15 Jan 2016 10:22:16 +0000 (21:22 +1100)]
ctdb-scripts: Rename variable: fail -> down_interfaces_found
Now its name describes its usage and the code reads better.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 15 Jan 2016 10:20:26 +0000 (21:20 +1100)]
ctdb-scripts: Drop functions mark_up() and mark_down()
Each is now used in only one place and the logic is more obvious
without them.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 18 Dec 2015 04:43:33 +0000 (15:43 +1100)]
ctdb-scripts: Move interface monitoring code to functions file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 18 Dec 2015 04:37:31 +0000 (15:37 +1100)]
ctdb-scripts: Rename get_real_iface() -> interface_get_real()
Now suitably named for move to functions file.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 18 Dec 2015 04:30:18 +0000 (15:30 +1100)]
ctdb-scripts: Refactor function interface_monitor() to monitor one interface
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Ralph Boehme [Wed, 20 Jan 2016 16:46:38 +0000 (17:46 +0100)]
s4:torture: add SMB2 test for directory creation initial allocation size
Test that directory creation with an initial allocation size > 0
succeeds.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11684
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun Jan 24 01:20:52 CET 2016 on sn-devel-144
Ralph Boehme [Wed, 25 Nov 2015 14:23:26 +0000 (15:23 +0100)]
s3:smbd: Ignore initial allocation size for directory creation
We reject directory creation with an initial allocation size > 0 with
NT_STATUS_ACCESS_DENIED. Windows servers ignore the initial allocation
size on directories.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11684
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Thu, 21 Jan 2016 17:59:34 +0000 (18:59 +0100)]
s3:smb2_sesssetup: implement SMB3 session bind (disabled)
This is disabled for now. It will be possible to enabled it
via a config switch once the underpinnings are complete.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Jan 23 03:22:18 CET 2016 on sn-devel-144
Stefan Metzmacher [Wed, 29 Jul 2015 15:05:52 +0000 (17:05 +0200)]
s3:smb2_sesssetup: treat BINDING in smbd_smb2_session_setup_auth_return
This adds smbd_smb2_bind_auth_return(), a
variant of auth_return for session binding.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Wed, 20 Jan 2016 23:16:33 +0000 (00:16 +0100)]
s3:smb2_negprot: announce multi channel support (disabled)
This disabled for now. Will be enabled by config setting
once underpinnings are ready.
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Fri, 22 Jan 2016 11:51:15 +0000 (12:51 +0100)]
smbXsrv: introduce bool smbXsrv_client->server_multi_channel_enabled
defaulting to false.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Uri Simchoni [Thu, 21 Jan 2016 09:14:36 +0000 (11:14 +0200)]
build: fix ldbsearch panic on FC22
add dependency that fixes ldbsearch panic due to conflict -
function read_data() is implemented both by libtspi.so.1, which
is a dependency of gnutls on FC22, and by an internal samba
shared lib.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Sat Jan 23 00:06:59 CET 2016 on sn-devel-144
Andreas Schneider [Tue, 12 Jan 2016 14:16:43 +0000 (15:16 +0100)]
smbspool: Add string representation of nt_status
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 22 20:59:36 CET 2016 on sn-devel-144
Andreas Schneider [Fri, 22 Jan 2016 12:27:27 +0000 (13:27 +0100)]
waf: Only build the backupkey rpc test with AD DC enabled
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Thu, 14 Jan 2016 09:32:57 +0000 (10:32 +0100)]
tests: Only execute heimdal tests if we build with heimdal
This is a preparation for MIT Kerberos support in the AD server.
Pair-Programmed-With: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 22 14:13:42 CET 2016 on sn-devel-144
Andreas Schneider [Thu, 14 Jan 2016 09:32:11 +0000 (10:32 +0100)]
tests: Rename heimdal blackbox tests
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Ralph Boehme [Mon, 30 Nov 2015 16:03:26 +0000 (17:03 +0100)]
smbstatus: add support for SMB1 signing and CIFS UNIX extensions encryption
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jan 22 11:06:05 CET 2016 on sn-devel-144
Ralph Boehme [Thu, 3 Dec 2015 11:17:50 +0000 (12:17 +0100)]
libcli/smb: add define SMB_ENCRYPTION_GSSAPI for CIFS encryption type
Add a define for the CIFS UNIX extensions encryption type. We store this
in smbXsrv_channel and use it in smbstatus for showing the
CIFS/SMB2/SMB3 encryption cipher used.
The SMB3 encryption cipher constants start at 1, carefully choosing the
highest available bit for the CIFS UNIX extensions encryption cipher
should avoid collisions and leaves room for many SMB3 ciphers in the
future.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 30 Nov 2015 10:20:43 +0000 (11:20 +0100)]
smbstatus: show signing state of sessions and tcons
Show the signing state of sesssions tcons in smbstatus. This is SMB2/3
only. SMB1 support will be added in a later commit.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 30 Nov 2015 10:14:34 +0000 (11:14 +0100)]
s3:lib/conn_tdb: store the connection dialect
This will be used in a subsequent commit that will print the signing
cipher in smbstatus. We need the connection dialect for that.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Sun, 15 Nov 2015 10:12:34 +0000 (11:12 +0100)]
s3:smb2_server: add signing state tracking flags
Add flags that track the signing state of all incoming and outgoing SMB2
packets and a helper function that can be used to determine whether a
session of tcon can be considered "signed".
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Sun, 15 Nov 2015 09:49:38 +0000 (10:49 +0100)]
s3:smb2_server: convert signing_required bool to flags bitmap
Use a flags bitmap for storing the signing state. This is in preparation
of a subsequent patch that adds more flags to the bitmap.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 9 Nov 2015 16:26:51 +0000 (17:26 +0100)]
smbstatus: show encrpytion state of tree connects
Show the encrpytion state of tcons in smbstatus. This is SMB3 only. CIFS
UNIX extensions encryption will be added in a later commit.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 9 Nov 2015 17:01:47 +0000 (18:01 +0100)]
smbstatus: align tree connect header and output
Align output and use timestring() instead of time_to_asc(). The latter calls
asctime() which forces a \n into the time string.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 9 Nov 2015 16:17:17 +0000 (17:17 +0100)]
smbstatus: show encrpytion state of sessions
Show the encrpytion state of sessions in smbstatus. This is SMB3
only. CIFS UNIX extensions encryption will be added in a later commit.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 9 Nov 2015 16:02:38 +0000 (17:02 +0100)]
smbstatus: align session list header and ouput
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Thu, 19 Nov 2015 14:54:17 +0000 (15:54 +0100)]
smbstatus: pass talloc context to traverse_connections
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Thu, 19 Nov 2015 09:40:29 +0000 (10:40 +0100)]
smbstatus: pass talloc context to traverse_sessionid
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 30 Nov 2015 09:48:12 +0000 (10:48 +0100)]
smbstatus: rework connection dialect printing
In a later change I want to print the signing cipher which depends upon
the connection dialect. So let's store the connection dialect in the
sessionid struct and move the code that maps dialect integers to strings
to smbstatus.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>