Garming Sam [Mon, 21 Nov 2016 02:06:22 +0000 (15:06 +1300)]
upgradeprovision: Remove objectCategory from constructed attrs
The new dbcheck rules identify an error where the GUID of the
objectCategory does not exist (pointing to a non-existent schema
object). As objectClass was not copied over either, it makes sense not
to copy over the objectCategory.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12297
Andrew Bartlett [Sun, 20 Nov 2016 23:31:24 +0000 (12:31 +1300)]
python/provision: Remove unused parameter schema
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Nov 21 18:49:12 CET 2016 on sn-devel-144
Günther Deschner [Mon, 21 Nov 2016 11:44:54 +0000 (12:44 +0100)]
s4-torture: test valid environment in spoolss_EnumMonitors level 2.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Günther Deschner [Mon, 21 Nov 2016 10:27:31 +0000 (11:27 +0100)]
s3-spoolss: use architecture in spoolss_MonitorInfo calls consistently
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Amitay Isaacs [Fri, 18 Nov 2016 00:47:56 +0000 (11:47 +1100)]
ctdb-recovery: Avoid NULL dereference in failure case
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12434
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Nov 21 12:26:04 CET 2016 on sn-devel-144
Jeff Layton [Fri, 18 Nov 2016 12:31:21 +0000 (07:31 -0500)]
vfs: ceph: convert to new DBG_* macros
...per Jeremy's recommendation.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 21 03:34:26 CET 2016 on sn-devel-144
Jeff Layton [Thu, 17 Nov 2016 18:13:57 +0000 (13:13 -0500)]
VFS: convert to using ceph_statx structures and functions, when available
Add a configure test for the ceph_statx function, and use that to
determine whether to compile in new functions that use it and its
variants, or whether to use a the older code that fetches birthtimes
from an xattr.
For cephwrap_lstat, we can use ceph_statx with the AT_SYMLINK_NOFOLLOW
flag to get the right lookup semantics.
For setting the times via cephwrap_ntimes, We can just use ceph_setattrx
and pass them all in at the same time.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Tue, 15 Nov 2016 17:34:22 +0000 (18:34 +0100)]
s4:torture: Add tortue test for AddPrinterDriverEx with COPY_FROM_DIRECTORY
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Nov 20 21:21:32 CET 2016 on sn-devel-144
Andreas Schneider [Fri, 18 Nov 2016 09:51:57 +0000 (10:51 +0100)]
lib:torture: Make variables const
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Tue, 15 Nov 2016 13:33:05 +0000 (14:33 +0100)]
s3:spoolss: Add some useful debug messages on error
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Tue, 15 Nov 2016 13:29:29 +0000 (14:29 +0100)]
s3:spoolss: Add support for COPY_FROM_DIRECTORY in AddPrinterDriverEx
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12415
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 16 Nov 2016 15:22:46 +0000 (15:22 +0000)]
ntlm_auth: Avoid some statics
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 16 Nov 2016 17:17:25 +0000 (17:17 +0000)]
lib: Remove global xfile.h includes
This makes it more obvious where this legacy code is used
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): Sun Nov 20 06:23:19 CET 2016 on sn-devel-144
Volker Lendecke [Wed, 16 Nov 2016 16:54:38 +0000 (16:54 +0000)]
lib: Move x_fgets_slash to xfile.c
This makes it easier to remove the global #include xfile.h
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 16 Nov 2016 15:53:45 +0000 (15:53 +0000)]
lib: Apply an overflow check
Very unlikely here, as the realloc will have failed long before, but
still I would like to check overflow.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 16 Nov 2016 15:47:08 +0000 (15:47 +0000)]
lib: Reformat x_fgets_slash
This is so old code that I'd like to move somewhere else next, but before
that I'd like to clean it up a bit.
No code change, just indentation changed and some {} added.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 16 Nov 2016 15:39:21 +0000 (15:39 +0000)]
lib: Rename fgets_slash to x_fgets_slash
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 16 Nov 2016 14:31:16 +0000 (15:31 +0100)]
s3:spoolss: Improve debug messages in construct_printer_driver
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 16 Nov 2016 14:29:34 +0000 (15:29 +0100)]
s3:spoolss: Return error when there is no driver assigned
If you create a new printer in Samba, there is no driver assinged.
Detect that early and return the right error code.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Fri, 18 Nov 2016 10:59:05 +0000 (11:59 +0100)]
s4-torture: add test to compare PRINTER_INFO_STRESS version and OSVersion
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Wed, 16 Nov 2016 18:24:37 +0000 (19:24 +0100)]
s3-spoolss: set the defaults for os_version defines globally.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Wed, 16 Nov 2016 18:17:55 +0000 (19:17 +0100)]
s3-spoolss: also set new os_major,minor,build values in printer info 0
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 9 Nov 2016 12:17:27 +0000 (13:17 +0100)]
s3:spoolss: Set default OS Version to Windows Server 2003 R2 SP2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12416
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Fri, 18 Nov 2016 18:20:41 +0000 (10:20 -0800)]
s3/smbd: fix the last resort check that sets the file type attribute
The rule is, a directory (with any other attributes) should always also
set FILE_ATTRIBUTE_DIRECTORY, a file should only set
FILE_ATTRIBUTE_NORMAL if no other attributes is set.
Iow, if a file contains any existing attributes (e.g. FILE_ATTRIBUTE_HIDDEN),
don't add in the FILE_ATTRIBUTE_NORMAL attribute.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12436
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Nov 19 11:55:35 CET 2016 on sn-devel-144
Amitay Isaacs [Thu, 17 Nov 2016 05:10:51 +0000 (16:10 +1100)]
ctdb-locking: Reset real-time priority in lock helper
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12392
Earlier we were relying on SCHED_RESET_ON_FORK to reset the priority of lock
helper processes. Since SCHED_RESET_ON_FORK support has been removed, the
scheduling priority of child processes created using vfork() need to be reset
explicitly in the helper processes.
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): Fri Nov 18 10:18:27 CET 2016 on sn-devel-144
Andreas Schneider [Thu, 17 Nov 2016 17:19:05 +0000 (18:19 +0100)]
Update .ycm_extra_conf.py
As we did a lot of cleanup it is time to update .ycm_extra_conf.py and
set picky developer flags by default.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov 18 02:22:10 CET 2016 on sn-devel-144
Andreas Schneider [Thu, 17 Nov 2016 15:15:54 +0000 (16:15 +0100)]
s4:torture: Fix cleanup of the secrets object in session_key test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433
The test is known to be failing if sealing is turned on in some
circumstances. In this case a secret is created and then the function
dcerpc_fetch_session_key() fails. The secret is not removed!
We use torturesecret-%08x with random() to fill in the number. Sometimes
it happens that random() returns a number we already used. So we end up
trying to create a secret for an entry which already exists and run
into a collision
This change makes sure we always cleanup behind us and do not leave
secret objects we created.
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 17 22:30:36 CET 2016 on sn-devel-144
Andreas Schneider [Thu, 17 Nov 2016 14:44:13 +0000 (15:44 +0100)]
s4:torture: Normalizes names in session_key test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 17 Nov 2016 14:35:47 +0000 (15:35 +0100)]
s4:torture: Strip trailing whitespaces in session_key.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12433
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 16 Nov 2016 16:15:27 +0000 (16:15 +0000)]
lib: Avoid includes.h in access.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 16 22:26:14 CET 2016 on sn-devel-144
Volker Lendecke [Wed, 16 Nov 2016 16:13:12 +0000 (16:13 +0000)]
lib: memcache.h needs some includes
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 04:33:17 +0000 (20:33 -0800)]
source4: Change to use lib/util/access functions.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 16 16:35:12 CET 2016 on sn-devel-144
Jeremy Allison [Mon, 14 Nov 2016 19:48:32 +0000 (11:48 -0800)]
lib: util: Add allow_access_nolog().
Make allow_access() call allow_access_nolog(), then log.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 01:15:20 +0000 (17:15 -0800)]
Move source3/lib/access.c to toplevel lib/util/access.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 01:09:33 +0000 (17:09 -0800)]
s3: lib: Replace s3 strnequal with top level strncasecmp_m.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 01:07:11 +0000 (17:07 -0800)]
s3: lib: Use top level function strequal_m not the s3 strequal
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 01:02:08 +0000 (17:02 -0800)]
s3: lib: Change masked_match() from SMB_STRDUP macro to underlying smb_xstrdup function.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 18:35:01 +0000 (10:35 -0800)]
lib/util: Move unix_wild_match() from source3/lib/util to lib/util/
Use top-level functions instead of source3 specific ones.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 18:24:40 +0000 (10:24 -0800)]
s3: lib: Move from talloc_strdup then lower to strlower_talloc()
Do things in one go.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 18:22:52 +0000 (10:22 -0800)]
s3: util: Remove unneeded strequal() call. Convert to simple character check.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Fri, 11 Nov 2016 18:21:10 +0000 (10:21 -0800)]
s3: lib - Fix formatting of unix_wild_match() sub-function to README.Coding standards.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sun, 13 Nov 2016 16:40:21 +0000 (17:40 +0100)]
nss_wins: Fix errno values for HOST_NOT_FOUND
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>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 16 04:10:55 CET 2016 on sn-devel-144
Andreas Schneider [Mon, 14 Nov 2016 08:54:53 +0000 (09:54 +0100)]
s3:net: Use messaging_init_client()
Pair-Programmed-With: Jeremy Allison <jra@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 14 Nov 2016 08:51:52 +0000 (09:51 +0100)]
s3:rpcclient: Use messaging_init_client()
Pair-Programmed-With: Jeremy Allison <jra@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 14 Nov 2016 08:49:20 +0000 (09:49 +0100)]
s3:messaging: Add messaging_init_client() function
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 14 Nov 2016 08:42:51 +0000 (09:42 +0100)]
s3:messaging: Create an messaging_init_internal() returning NTSTATUS
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 14 Nov 2016 10:36:03 +0000 (11:36 +0100)]
s3:rpcclient: Print a new line on exit
If you press 'ctrl+d' print a new line for the shell.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 14 Nov 2016 10:31:20 +0000 (11:31 +0100)]
lib:util: Don't print lstat warning on ERROR debug level
If we are a client and can't access the lock directory don't confuse a
user.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Tue, 15 Nov 2016 09:58:48 +0000 (10:58 +0100)]
s3:tests: Set missing directories for test_registry_upgrade.sh
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 14 Sep 2016 07:19:42 +0000 (09:19 +0200)]
s3-winbind: Directly pass creds with cli_session_setup_creds()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov 15 14:51:02 CET 2016 on sn-devel-144
Stefan Metzmacher [Fri, 28 Oct 2016 11:48:23 +0000 (13:48 +0200)]
s3:libsmb: make use of cli_{session_setup,rpc_pipe_open_with}_creds() in passchange.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 11:33:58 +0000 (13:33 +0200)]
s3:client: use cli_session_setup_creds() in smbspool.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 11:33:58 +0000 (13:33 +0200)]
s3:client: use cli_session_setup_creds() in client.c cmd_logon()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:44:51 +0000 (12:44 +0200)]
s3:torture: make use of auth_generic_set_creds() in test_smb2.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:44:51 +0000 (12:44 +0200)]
s3:torture: make use of cli_session_setup_creds() in test_smb2.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:44:51 +0000 (12:44 +0200)]
s3:torture: make use of cli_session_setup_creds() in torture.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:43:44 +0000 (12:43 +0200)]
s3:torture: create a global 'torture_creds' cli_credentials structure
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:42:01 +0000 (12:42 +0200)]
s3:torture: make use of cli_session_creds_init() in masktest.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:15:20 +0000 (12:15 +0200)]
s3:torture: make use of cli_session_setup_anon()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:15:20 +0000 (12:15 +0200)]
s3:nmbd: make use of cli_session_setup_anon()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:15:20 +0000 (12:15 +0200)]
s3:libsmb: make use of cli_session_setup_anon()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:09:05 +0000 (12:09 +0200)]
s3:libsmb: make cli_session_creds_init() non-static
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 10:01:50 +0000 (12:01 +0200)]
s3:libsmb: add cli_session_setup_anon()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 26 Oct 2016 11:17:59 +0000 (13:17 +0200)]
s3:libsmb: change cli_session_setup_send/recv into cli_session_setup_creds_send/recv
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 26 Oct 2016 10:41:10 +0000 (12:41 +0200)]
s3:libsmb: move domain\\username magic to cli_session_creds_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 26 Oct 2016 10:01:45 +0000 (12:01 +0200)]
s3:libsmb: get the plaintext and NTLM authentication details out of cli_credentials
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Sat, 22 Oct 2016 09:24:48 +0000 (11:24 +0200)]
s3:libsmb: move cli_session_creds_init() to cli_session_setup_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Sat, 22 Oct 2016 09:00:39 +0000 (11:00 +0200)]
s3:libsmb: move cli_session_setup_get_account into cli_session_creds_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 21 Oct 2016 18:35:01 +0000 (20:35 +0200)]
s3:libsmb: pass cli_credentials to cli_session_setup_gensec_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Tue, 13 Sep 2016 12:40:36 +0000 (14:40 +0200)]
s3:libsmb: split out a cli_session_creds_init() function
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 28 Oct 2016 07:00:46 +0000 (09:00 +0200)]
s3:libsmb: pass the optional dest_realm via the cli_credentials
'dest_realm' is only valid in the winbindd use case, where we also have
the account in that realm.
We need to ask the DC to which KDC the principal belongs to, in order to
get the potential trust referrals right.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Sat, 22 Oct 2016 07:52:48 +0000 (09:52 +0200)]
s3:libsmb: let gensec handle the fallback from krb5 to ntlmssp
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 27 Oct 2016 13:03:07 +0000 (15:03 +0200)]
s3:libsmb: remove target_principal argument from cli_session_setup_gensec_send()
It's enough to pass down target_service and target_hostname, that's all we
have at the smb layer. The kerberos layer should figure out what
the final target_principals is based on the users realm.
The gse_krb5 backend doesn't use it currently, so it's also unused.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 27 Oct 2016 13:00:47 +0000 (15:00 +0200)]
s3:libsmb: always pass the servers gss blob to gensec
The spnego backend will take the "client use spnego principal" option.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 26 Oct 2016 10:04:41 +0000 (12:04 +0200)]
s3:libsmb: remove unused cli_session_setup_{lanman2,plain,nt1}*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 26 Oct 2016 10:01:45 +0000 (12:01 +0200)]
s3:libsmb: make use of smb1cli_session_setup_{nt1,lm21}_send/recv()
This separates the construction of the ASCII-Password (lm_response)
and UNICODE-Password (nt_response) values from the marshalling logic.
We don't need the NT1 marshalling logic 3 times (guest, plain, nt1),
we just need it once now in smb1cli_session_setup_nt1*.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 19:50:44 +0000 (21:50 +0200)]
s3:libsmb: make use of smb1cli_session_setup_ext_send/recv()
This separates the spnego authentication logic from the
marshalling logic.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 7 Nov 2016 14:06:09 +0000 (15:06 +0100)]
s3:libsmb: handle the spnego as a first action in cli_session_setup_send()
This will make further restructuring easier.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 26 Oct 2016 00:03:17 +0000 (02:03 +0200)]
s3:libsmb: add some comments to the noop case for < PROTOCOL_LANMAN1 in cli_session_setup_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 19:01:37 +0000 (21:01 +0200)]
libcli/smb: add smb1cli_session_setup_ext_send/recv()
This does a session setup for the NT1 protocol with CAP_EXTENDED_SECURITY.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 13:40:59 +0000 (15:40 +0200)]
libcli/smb: add smb1cli_session_setup_nt1_send/recv()
This does a session setup for the NT1 protocol (without CAP_EXTENDED_SECURITY).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 3 Nov 2016 15:28:12 +0000 (16:28 +0100)]
libcli/smb: add smb1cli_session_setup_lm21_send/recv()
This does a session setup for the LANMAN 2(.1) protocol.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 11:27:54 +0000 (13:27 +0200)]
libcli/smb: reformat wscript
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 12:50:41 +0000 (14:50 +0200)]
libcli/smb: Add smb_bytes_pull_str() helper function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 11:31:08 +0000 (13:31 +0200)]
libcli/smb: move {smb,trans2}_bytes_push_{str,bytes}() to common code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 25 Oct 2016 09:31:07 +0000 (11:31 +0200)]
s3:libsmb: let the callers only pass the password string to cli_session_setup[_send]()
There're no callers which tried to pass raw {lm,nt}_response any more.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 21 Oct 2016 15:22:03 +0000 (17:22 +0200)]
s3:popt_common: simplify popt_common_credentials handling
This offers a global 'struct user_auth_info *cmdline_auth_info',
similar to the 'cmdline_credentials' we have in
source4/lib/cmdline/popt_common.c.
And we create that in the POPT_CALLBACK_REASON_PRE stage
and finalize it in the POPT_CALLBACK_REASON_POST stage.
That means much less boring work for the callers
and more freedom to change the user_auth_info internals
in future.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 24 Oct 2016 09:26:12 +0000 (11:26 +0200)]
s3:gse: We need to use the users realm in the target_principal
This is important in order to let the kdc of the users realm start with
the trust referral routing.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 24 Oct 2016 09:26:12 +0000 (11:26 +0200)]
s4:gensec_gssapi: We need to use the users realm in the target_principal
This is important in order to let the kdc of the users realm start with
the trust referral routing.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 27 Oct 2016 11:32:31 +0000 (13:32 +0200)]
auth/credentials: make cli_credentials_get_ntlm_response() more robust
We always provide each output blob as it's own talloc memory
and also check for talloc failures.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Sat, 22 Oct 2016 09:19:05 +0000 (11:19 +0200)]
auth/credentials: anonymous should not have a user principal
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Günther Deschner [Tue, 8 Nov 2016 10:32:20 +0000 (11:32 +0100)]
s4-torture: add test for winspool_AsyncGetPrinterDriverDirectory()
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 15 05:09:31 CET 2016 on sn-devel-144
Günther Deschner [Wed, 2 Nov 2016 11:30:58 +0000 (12:30 +0100)]
s4-torture: add test for winspool_AsyncDeletePrintDriverPackage
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Fri, 28 Oct 2016 20:49:21 +0000 (22:49 +0200)]
s4-torture: add test for winspool_AsyncCorePrinterDriverInstalled
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Mon, 5 Sep 2016 20:49:39 +0000 (22:49 +0200)]
s4-torture: add test for spoolss vs. iremotewinspool context handles
This test demonstrates that one cannot use a handle retrieved via
iremotewinspool in a spoolss context.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Thu, 1 Sep 2016 11:57:50 +0000 (13:57 +0200)]
s4-torture: add test for winspool_AsyncGetPrinterData
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Thu, 25 Aug 2016 15:31:47 +0000 (17:31 +0200)]
s4-torture: add test for winspool_AsyncEnumPrinters
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Tue, 23 Aug 2016 20:58:26 +0000 (22:58 +0200)]
s4-torture: add test for winspool_AsyncUploadPrinterDriverPackage
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Tue, 23 Aug 2016 16:39:48 +0000 (18:39 +0200)]
s4-torture: add test for winspool_SyncUnRegisterForRemoteNotifications.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Thu, 16 May 2013 16:21:30 +0000 (18:21 +0200)]
s4-torture: add test for winspool_SyncRegisterForRemoteNotifications.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>