vlendec/samba-autobuild/.git
7 years agoscript/autobuild.py: cleanup the task subdirs when they're done.
Stefan Metzmacher [Wed, 11 Jan 2017 13:42:08 +0000 (14:42 +0100)]
script/autobuild.py: cleanup the task subdirs when they're done.

This hopefully reduces the used space on the memdisk.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-spoolss: globally set print server environment/architecture.
Günther Deschner [Mon, 21 Nov 2016 11:46:02 +0000 (12:46 +0100)]
s3-spoolss: globally set print server environment/architecture.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-spoolss: make us appear as a 64bit print server.
Günther Deschner [Mon, 21 Nov 2016 10:29:56 +0000 (11:29 +0100)]
s3-spoolss: make us appear as a 64bit print server.

This makes us behave like all recent windows systems.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agospoolss: Fix PROCESSOR_AMD_X8664 value in IDL
Günther Deschner [Wed, 4 Jan 2017 15:08:59 +0000 (16:08 +0100)]
spoolss: Fix PROCESSOR_AMD_X8664 value in IDL

Microsoft got their docs wrong in MS-RPRN Section 2.2.1.10.1 (footnote
65): PROCESSOR_AMD_X8664 must be 0x000021D8 and not 0x000022A0.

This is what recent windows versions report back from a spoolss
getprinter level 0 RPC call.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-spoolss: Use a more accurate DefaultSpoolDirectory
Günther Deschner [Fri, 18 Nov 2016 17:21:39 +0000 (18:21 +0100)]
s3-spoolss: Use a more accurate DefaultSpoolDirectory

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agospoolss: allow truncated driver version in spoolss_driver_version_to_qword()
Günther Deschner [Fri, 11 Nov 2016 15:35:03 +0000 (16:35 +0100)]
spoolss: allow truncated driver version in spoolss_driver_version_to_qword()

This has been seen in real life Konica driver defintions.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-spoolss: Fix architecture handling in spoolss_DeletePrinterDriverEx call
Andreas Schneider [Tue, 10 Jan 2017 17:25:22 +0000 (18:25 +0100)]
s3-spoolss: Fix architecture handling in spoolss_DeletePrinterDriverEx call

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
7 years agos4-torture: cleanup after printing tests that had to add a driver
Günther Deschner [Tue, 10 Jan 2017 17:23:14 +0000 (18:23 +0100)]
s4-torture: cleanup after printing tests that had to add a driver

We were only removing drivers from the upload area but did not delete
them via spoolss.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos4-torture: cleanup architecture handling in spoolss driver tests.
Andreas Schneider [Tue, 10 Jan 2017 17:20:18 +0000 (18:20 +0100)]
s4-torture: cleanup architecture handling in spoolss driver tests.

Make sure the architecture field of the driver8 definition is always set
to the local environment (the one of the driver to be uploaded and
tested)

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
7 years agoscript/autobuild.py: use --enable-developer and --picky-developer for the ctdb build
Stefan Metzmacher [Wed, 11 Jan 2017 07:14:49 +0000 (08:14 +0100)]
script/autobuild.py: use --enable-developer and --picky-developer for the ctdb build

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agocredentials: Create a smb_gss_krb5_copy_ccache() function
Andreas Schneider [Thu, 22 Dec 2016 12:50:05 +0000 (13:50 +0100)]
credentials: Create a smb_gss_krb5_copy_ccache() function

This sets the default principal on the copied ccache if it hasn't been
set yet.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agomit-kdb: Remove unneeded memset()
Andreas Schneider [Thu, 15 Dec 2016 16:51:24 +0000 (17:51 +0100)]
mit-kdb: Remove unneeded memset()

The memory has been allocated with calloc() already.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agomit-kdb: Use calloc() to allocate memory
Andreas Schneider [Thu, 15 Dec 2016 16:50:53 +0000 (17:50 +0100)]
mit-kdb: Use calloc() to allocate memory

This avoids a memset().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agogensec: Cast data for MIT Kerberos correctly
Andreas Schneider [Wed, 14 Dec 2016 16:26:11 +0000 (17:26 +0100)]
gensec: Cast data for MIT Kerberos correctly

In Heimdal the data pointer is a void pointer so casting to 'char *' is
not an issue.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agogensec: Fix picky developer with MIT Kerberos
Andreas Schneider [Wed, 14 Dec 2016 16:22:28 +0000 (17:22 +0100)]
gensec: Fix picky developer with MIT Kerberos

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agodocs: Bump version up to 4.7.
Karolin Seeger [Thu, 12 Jan 2017 08:01:54 +0000 (09:01 +0100)]
docs: Bump version up to 4.7.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoWHATSNEW: Start release notes for Samba 4.7.0pre1.
Karolin Seeger [Thu, 12 Jan 2017 07:59:06 +0000 (08:59 +0100)]
WHATSNEW: Start release notes for Samba 4.7.0pre1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoscript/release.sh: fix off by 1 error in announce.${tagname}.mail.txt creation
Stefan Metzmacher [Thu, 12 Jan 2017 09:40:37 +0000 (10:40 +0100)]
script/release.sh: fix off by 1 error in announce.${tagname}.mail.txt creation

Pair-Programmed-With: Karolin Seeger <kseeger@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Jan 12 15:34:25 CET 2017 on sn-devel-144

7 years agoctdb-tests: Add robust mutex test
Amitay Isaacs [Fri, 2 Dec 2016 04:11:20 +0000 (15:11 +1100)]
ctdb-tests: Add robust mutex test

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

This demonstrates robust mutex bug on linux/glibc system.

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): Thu Jan 12 07:59:34 CET 2017 on sn-devel-144

7 years agoctdb-locking: Explicitly unlock record/db in lock helper
Amitay Isaacs [Tue, 29 Nov 2016 06:20:45 +0000 (17:20 +1100)]
ctdb-locking: Explicitly unlock record/db in lock helper

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

Instead of killing lock helper processes with SIGKILL, send SIGTERM so
lock helper processes can explicitly unlock record/db.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-locking: Remove support for locking multiple databases
Amitay Isaacs [Tue, 29 Nov 2016 06:13:41 +0000 (17:13 +1100)]
ctdb-locking: Remove support for locking multiple databases

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

The code to lock multiple databases has been dropped from ctdb_lock.c.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agos4:tests/sec_descriptor: use more unique oid values
Stefan Metzmacher [Wed, 11 Jan 2017 12:34:28 +0000 (13:34 +0100)]
s4:tests/sec_descriptor: use more unique oid values

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Jan 12 04:02:21 CET 2017 on sn-devel-144

7 years agowscript: remove executable bits for all wscript* files
Stefan Metzmacher [Tue, 10 Jan 2017 11:43:54 +0000 (12:43 +0100)]
wscript: remove executable bits for all wscript* files

These files should not be executable.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 11 20:21:01 CET 2017 on sn-devel-144

7 years agolib/tevent: remove unused release-script.sh
Stefan Metzmacher [Tue, 10 Jan 2017 12:07:33 +0000 (13:07 +0100)]
lib/tevent: remove unused release-script.sh

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agonsswitch: remove unused TALLOC_* defines in pam_winbind.h
Stefan Metzmacher [Tue, 10 Jan 2017 14:08:48 +0000 (15:08 +0100)]
nsswitch: remove unused TALLOC_* defines in pam_winbind.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agowinbind: Fix CID 1398530 Resource leak
Volker Lendecke [Tue, 10 Jan 2017 13:29:38 +0000 (13:29 +0000)]
winbind: Fix CID 1398530 Resource leak

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): Wed Jan 11 04:38:25 CET 2017 on sn-devel-144

7 years agowinbind: Fix CID 1398530 Resource leak
Volker Lendecke [Tue, 10 Jan 2017 13:28:41 +0000 (13:28 +0000)]
winbind: Fix CID 1398530 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbind: Fix CID 1398531 Resource leak
Volker Lendecke [Tue, 10 Jan 2017 13:24:22 +0000 (13:24 +0000)]
winbind: Fix CID 1398531 Resource leak

Not really a leak due to talloc, but this way it's clear

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbind: Fix CID 1398533 Resource leak
Volker Lendecke [Tue, 10 Jan 2017 13:26:13 +0000 (13:26 +0000)]
winbind: Fix CID 1398533 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbind: Fix CID 1398533 Resource leak
Volker Lendecke [Tue, 10 Jan 2017 13:24:22 +0000 (13:24 +0000)]
winbind: Fix CID 1398533 Resource leak

Not really a leak due to talloc, but this way it's clear

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/smb2_read: Better fallback for incorrectly configured sendfile setups
Anoop C S [Tue, 10 Jan 2017 13:30:30 +0000 (13:30 +0000)]
s3/smb2_read: Better fallback for incorrectly configured sendfile setups

When "use sendfile" is enabled but not supported by the underlying VFS
module then fallback to normal copy and print out a warning for the
admin.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: Fix dead but not cleaned-up-yet destination sockets
Volker Lendecke [Tue, 10 Jan 2017 12:30:54 +0000 (12:30 +0000)]
messaging: Fix dead but not cleaned-up-yet destination sockets

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 10 17:40:58 CET 2017 on sn-devel-144

7 years agoscript/autobuild.py: try make test TESTS=samba3.*ktest for samba-systemkrb5
Stefan Metzmacher [Fri, 23 Dec 2016 13:07:51 +0000 (14:07 +0100)]
script/autobuild.py: try make test TESTS=samba3.*ktest for samba-systemkrb5

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoselftest/selftest.pl: print out '[expanded] command: ' in all error cases
Stefan Metzmacher [Thu, 29 Dec 2016 11:35:48 +0000 (12:35 +0100)]
selftest/selftest.pl: print out '[expanded] command: ' in all error cases

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoselftest/selftest.pl: we don't need to call Subunit::progress_pop() twice on error
Stefan Metzmacher [Thu, 29 Dec 2016 20:45:32 +0000 (21:45 +0100)]
selftest/selftest.pl: we don't need to call Subunit::progress_pop() twice on error

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoselftest/selftesthelpers.py: let plantestsuite() use the env name in the test name
Stefan Metzmacher [Thu, 29 Dec 2016 14:57:03 +0000 (15:57 +0100)]
selftest/selftesthelpers.py: let plantestsuite() use the env name in the test name

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos4:gensec_gssapi: require a realm in gensec_gssapi_client_start()
Stefan Metzmacher [Thu, 29 Dec 2016 14:20:00 +0000 (15:20 +0100)]
s4:gensec_gssapi: require a realm in gensec_gssapi_client_start()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos4:gensec_gssapi: the value gensec_get_target_principal() should overwrite gensec_get...
Stefan Metzmacher [Thu, 29 Dec 2016 13:00:36 +0000 (14:00 +0100)]
s4:gensec_gssapi: the value gensec_get_target_principal() should overwrite gensec_get_target_hostname()

If gensec_get_target_principal() has a value, we no longer have to verify
the gensec_get_target_hostname() value, it can be just an ipadress.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoauth/credentials: Always set the the realm if we set the principal from the ccache
Andreas Schneider [Wed, 21 Dec 2016 21:17:22 +0000 (22:17 +0100)]
auth/credentials: Always set the the realm if we set the principal from the ccache

This fixes a bug in gensec_gssapi_client_start() where an invalid realm
is used to get a Kerberos ticket.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoauth/credentials: remove const where we always return a talloc string
Stefan Metzmacher [Thu, 29 Dec 2016 14:26:00 +0000 (15:26 +0100)]
auth/credentials: remove const where we always return a talloc string

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agokrb5_wrap: let smb_krb5_kinit_s4u2_ccache() work if store_creds.client and server...
Stefan Metzmacher [Thu, 29 Dec 2016 13:42:49 +0000 (14:42 +0100)]
krb5_wrap: let smb_krb5_kinit_s4u2_ccache() work if store_creds.client and server have different realms

As the principal in the resulting ccache may not match the realm of the
target principal, we need to store the credentials twice.

The caller uses the ccache principal's realm to construct the
search key for the target principal.

If we get administrator@SAMBADOMAIN via the NTLMSSP authentication
and want to do s4u2selfproxy, we'll get ticket for

client realm: SAMBADOMAIN
client name: administrator
server realm: SAMBA.EXAMPLE.COM
server name: cifs/localdc

This is stored in credential cache, but
the caller will use cifs/localdc@SAMBADOMAIN as
target_principal name when it tries to use the
cache.

So also store the ticket as:

client realm: SAMBADOMAIN
client name: administrator
server realm: SAMBADOMAIN
server name: cifs/localdc

Note that it can always happen that the target is not in the clients
realm, so we always deal with changing realm names, so this is not
a s4u2self/proxy specific thing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos4:auth/gensec: remove unused dependencies to gensec_util
Stefan Metzmacher [Thu, 29 Dec 2016 16:16:22 +0000 (17:16 +0100)]
s4:auth/gensec: remove unused dependencies to gensec_util

gensec_util only contains gensec_tstream and is already a public_dep
of 'gensec' itself.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agopython/schema: fix tests flapping due to oid collision
Andrew Bartlett [Mon, 9 Jan 2017 21:00:43 +0000 (10:00 +1300)]
python/schema: fix tests flapping due to oid collision

These tests would sometimes fail because the randomly generated OIDs
would collide. This fixes that by giving a unique OID to each attribute
and class.

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

Pair-Programmed-With: Bob Campbell <bobcampbell@catalyst.net.nz>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 10 13:44:02 CET 2017 on sn-devel-144

7 years agos3:winbindd: talloc_steal the extra_data in winbindd_list_users_recv()
Stefan Metzmacher [Tue, 10 Jan 2017 08:48:33 +0000 (09:48 +0100)]
s3:winbindd: talloc_steal the extra_data in winbindd_list_users_recv()

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agosmbd/ioctl: match WS2016 ReFS set compression behaviour
David Disseldorp [Thu, 5 Jan 2017 16:36:02 +0000 (17:36 +0100)]
smbd/ioctl: match WS2016 ReFS set compression behaviour

ReFS doesn't support compression, but responds to set-compression FSCTLs
with NT_STATUS_OK if (and only if) the requested compression format is
COMPRESSION_FORMAT_NONE.

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

Reported-by: Nick Barrett <nick@barrett.org.nz>
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): Mon Jan  9 23:14:28 CET 2017 on sn-devel-144

7 years agotorture/ioctl: test set_compression(format_none)
David Disseldorp [Thu, 5 Jan 2017 16:10:42 +0000 (17:10 +0100)]
torture/ioctl: test set_compression(format_none)

This test case was overlooked in the previous bso#12144 update -
set compression requests with format=COMPRESSION_FORMAT_NONE should
succeed if the server / backing storage doesn't offer compression
support.
Confirm that Samba matches Windows Server 2016 ReFS behaviour here.

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

Reported-by: Nick Barrett <nick@barrett.org.nz>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/torture: add a test for "mangled names = invalid"
Ralph Boehme [Thu, 15 Dec 2016 12:05:50 +0000 (13:05 +0100)]
s3/torture: add a test for "mangled names = invalid"

This checks both that illegal NTFS names are still mangled and that long
names have no shortname.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/smbd: new "mangled names" setting "illegal"
Ralph Boehme [Thu, 17 Nov 2016 13:24:07 +0000 (14:24 +0100)]
s3/smbd: new "mangled names" setting "illegal"

This does mangling for names with illegal NTFS characters, but not for
names longer then 8.3:

Name mangling with mangled named = yes
======================================

Mangled | Short | Name
----------------------------
        |       | foo
        | yes   | 123456789
yes     |       | foo:bar

Name mangling with mangled named = illegal
==========================================

Mangled | Short | Name
----------------------------
        |       | foo
        |       | 123456789
yes     |       | foo:bar

Setting "mangled names = illegal" is the most sensible setting for
modern clients that don't use the shortname anymore.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/smbd: convert "mangled names" option to an enum
Ralph Boehme [Thu, 17 Nov 2016 13:22:41 +0000 (14:22 +0100)]
s3/smbd: convert "mangled names" option to an enum

This is in preparation of adding an additional setting for this
option. No change in behaviour by this commit, that comes in the next
one.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3: vfs: dirsort doesn't handle opendir of "." correctly.
Jeremy Allison [Thu, 5 Jan 2017 20:38:07 +0000 (12:38 -0800)]
s3: vfs: dirsort doesn't handle opendir of "." correctly.

Needs to store $cwd path for correct sorting.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agopassdb: Remove pdb_wbc_sam
Volker Lendecke [Tue, 3 Jan 2017 07:04:59 +0000 (07:04 +0000)]
passdb: Remove pdb_wbc_sam

It seems that this was only used in OneFS. The filesystem parts were
removed in 2012 with 70be41c772d.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  9 18:15:20 CET 2017 on sn-devel-144

7 years agoauth: Remove auth_wbc
Volker Lendecke [Tue, 3 Jan 2017 07:04:59 +0000 (07:04 +0000)]
auth: Remove auth_wbc

It seems that this was only used in OneFS. The filesystem parts were
removed in 2012 with 70be41c772d.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoselftest: Don't test auth_wbc anymore
Volker Lendecke [Wed, 4 Jan 2017 10:36:04 +0000 (10:36 +0000)]
selftest: Don't test auth_wbc anymore

It will go in the next commit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agoreplace: Include sysmacros.h
Andreas Schneider [Thu, 5 Jan 2017 08:34:36 +0000 (09:34 +0100)]
replace: Include sysmacros.h

In the GNU C Library, "makedev" is defined by <sys/sysmacros.h>. For
historical compatibility, it is currently defined by <sys/types.h> as
well, but it is planned to remove this soon.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Jan  8 22:30:03 CET 2017 on sn-devel-144

7 years agoWHATSNEW: fix typo
Björn Jacke [Fri, 6 Jan 2017 22:26:13 +0000 (23:26 +0100)]
WHATSNEW: fix typo

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sat Jan  7 03:19:03 CET 2017 on sn-devel-144

7 years agolibgpo: allow empty values in gp inifile parsing code.
Günther Deschner [Wed, 14 Sep 2016 16:13:39 +0000 (18:13 +0200)]
libgpo: allow empty values in gp inifile parsing code.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan  6 16:16:02 CET 2017 on sn-devel-144

7 years agolib/util: add pm_process_with_flags to allow parsing ini files with empty values
Günther Deschner [Wed, 14 Sep 2016 16:13:00 +0000 (18:13 +0200)]
lib/util: add pm_process_with_flags to allow parsing ini files with empty values

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agolibgpo: default to empty values if none are there
Günther Deschner [Mon, 19 Sep 2016 15:11:19 +0000 (17:11 +0200)]
libgpo: default to empty values if none are there

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agolibgpo: deal with non utf16-le ini files.
Günther Deschner [Thu, 10 Nov 2016 14:15:05 +0000 (15:15 +0100)]
libgpo: deal with non utf16-le ini files.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agolibgpo: apply some const.
Günther Deschner [Tue, 27 Sep 2016 16:18:51 +0000 (18:18 +0200)]
libgpo: apply some const.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agolibgpo: add gp_inifile_enum_section()
Günther Deschner [Tue, 13 Sep 2016 06:36:59 +0000 (08:36 +0200)]
libgpo: add gp_inifile_enum_section()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agolibgpo: add gp_inifile_init_context_direct()
Günther Deschner [Sun, 11 Sep 2016 10:48:14 +0000 (12:48 +0200)]
libgpo: add gp_inifile_init_context_direct()

This varient ignores the group policy flags and does not try to find the right
unix path.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-spoolss: Create a sperate header file for 'struct printer_handle'
Günther Deschner [Fri, 26 Aug 2016 16:33:19 +0000 (18:33 +0200)]
s3-spoolss: Create a sperate header file for 'struct printer_handle'

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-spoolss: remove unused type field in printer handle
Günther Deschner [Fri, 2 Dec 2016 08:09:49 +0000 (09:09 +0100)]
s3-spoolss: remove unused type field in printer handle

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-iremotewinspool: update api struct map so we only end up implementing 8 calls
Günther Deschner [Wed, 14 Sep 2016 09:46:20 +0000 (11:46 +0200)]
s3-iremotewinspool: update api struct map so we only end up implementing 8 calls

In the end, these calls are the only ones we need to implement:

3.1.4.2. Printer Driver Management Methods

* AsyncInstallPrinterDriverFromPackage
* AsyncUploadPrinterDriverPackage
* AsyncCorePrinterDriverInstalled
* AsyncDeletePrinterDriverPackage

3.1.4.9. Printing Related Notification Methods

* SyncRegisterForRemoteNotifications
* SyncUnRegisterForRemoteNotifications
* SyncRefreshRemoteNotifications
* AsyncGetRemoteNotifications

All other calls are 1:1 mapped to spoolss calls.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-iremotewinspool: add generated server stubs and no longer compile autogenerated...
Günther Deschner [Tue, 20 Sep 2016 16:43:57 +0000 (18:43 +0200)]
s3-iremotewinspool: add generated server stubs and no longer compile autogenerated ones

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-iremotewinspool: add generated srv_iremotewinspool_nt.c file
Günther Deschner [Tue, 20 Sep 2016 18:21:50 +0000 (20:21 +0200)]
s3-iremotewinspool: add generated srv_iremotewinspool_nt.c file

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-rpc_server: setup secondary address for tcp transport in bind_ack packet.
Günther Deschner [Mon, 26 Sep 2016 18:22:04 +0000 (20:22 +0200)]
s3-rpc_server: setup secondary address for tcp transport in bind_ack packet.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-rpc_server: enforce packet level authentication for iremotewinspool server
Günther Deschner [Mon, 26 Sep 2016 17:21:05 +0000 (19:21 +0200)]
s3-rpc_server: enforce packet level authentication for iremotewinspool server

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agos3-rpc_server: allow to set minimal auth level for a DCE/RPC service
Günther Deschner [Mon, 26 Sep 2016 17:20:24 +0000 (19:20 +0200)]
s3-rpc_server: allow to set minimal auth level for a DCE/RPC service

Guenther

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoctdb-tests: Do not attempt to unregister the join handler multiple times
Amitay Isaacs [Thu, 5 Jan 2017 04:05:56 +0000 (15:05 +1100)]
ctdb-tests: Do not attempt to unregister the join handler multiple times

MSG_ID_SYNC is broadcast to each node when a MSG_ID_JOIN has been
received from all nodes.  After MSG_ID_SYNC is successfully broadcast,
the join handler is unregistered.  However, if another MSG_ID_JOIN is
received before the join handler is unregistered then MSG_ID_SYNC is
re-broadcast.  This results in multiple attempts to unregister the
join handler.

Once all MSG_ID_JOIN messages are received, unregister the join handler
to ignore any extra MSG_ID_JOIN messages.  Also, make sure that while
join handler is being unregistered, MSG_ID_JOIN messages are ignored.

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

Identified-by: Martin Schwenke <martin@meltin.net>
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 Jan  6 12:27:23 CET 2017 on sn-devel-144

7 years agoctdb-tests: Add tests for generic socket I/O
Amitay Isaacs [Wed, 4 Jan 2017 13:48:32 +0000 (00:48 +1100)]
ctdb-tests: Add tests for generic socket I/O

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-common: Fix a bug in packet reading code for generic socket I/O
Amitay Isaacs [Wed, 4 Jan 2017 06:46:54 +0000 (17:46 +1100)]
ctdb-common: Fix a bug in packet reading code for generic socket I/O

queue->offset currently points to the end of available data.  However,
after processing one packet the beginning of the next packet is not
marked explicitly and caused the same packet to be processed again.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-tests: Add another test for sock_daemon
Amitay Isaacs [Wed, 4 Jan 2017 13:47:11 +0000 (00:47 +1100)]
ctdb-tests: Add another test for sock_daemon

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-common: Simplify async computation for sock_socket_write_send/recv
Amitay Isaacs [Wed, 4 Jan 2017 05:20:17 +0000 (16:20 +1100)]
ctdb-common: Simplify async computation for sock_socket_write_send/recv

This is now just a wrapper around comm_write_send/recv.  This avoids the
extra tevent_req and fixes a bug in the termination of sock_socket_write
computation.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoVERSION: Bump version up to 4.7.0pre1...
Karolin Seeger [Thu, 5 Jan 2017 07:45:25 +0000 (08:45 +0100)]
VERSION: Bump version up to 4.7.0pre1...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
7 years agoVERSION: Diable git snapshots for the 4.6.0rc1 release. samba-4.6.0rc1
Karolin Seeger [Thu, 5 Jan 2017 07:44:22 +0000 (08:44 +0100)]
VERSION: Diable git snapshots for the 4.6.0rc1 release.

7 years agoVERSION: Bump version up to 4.6.0rc1.
Karolin Seeger [Thu, 5 Jan 2017 07:43:57 +0000 (08:43 +0100)]
VERSION: Bump version up to 4.6.0rc1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
7 years agowinbind: Fix a typo
Volker Lendecke [Tue, 3 Jan 2017 12:18:25 +0000 (12:18 +0000)]
winbind: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan  4 16:10:32 CET 2017 on sn-devel-144

7 years agowinbind: Avoid a few explicit ZERO_STRUCT calls
Volker Lendecke [Tue, 3 Jan 2017 09:54:33 +0000 (09:54 +0000)]
winbind: Avoid a few explicit ZERO_STRUCT calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: remove nss_get_info backend functions
Volker Lendecke [Tue, 3 Jan 2017 12:35:15 +0000 (12:35 +0000)]
winbind: remove nss_get_info backend functions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove nss_get_info()
Volker Lendecke [Tue, 3 Jan 2017 12:32:07 +0000 (12:32 +0000)]
winbind: Remove nss_get_info()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove unused nss_get_info_cached
Volker Lendecke [Tue, 3 Jan 2017 12:17:27 +0000 (12:17 +0000)]
winbind: Remove unused nss_get_info_cached

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Simplify query_user_list to only return rids
Volker Lendecke [Tue, 3 Jan 2017 12:11:30 +0000 (12:11 +0000)]
winbind: Simplify query_user_list to only return rids

Unfortunately this is a pretty large patch, because many functions
implement this API. The alternative would have been to create a new
backend function, add the new one piece by piece and then remove the
original function.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove wbint_QueryUserList
Volker Lendecke [Mon, 2 Jan 2017 15:45:50 +0000 (15:45 +0000)]
winbind: Remove wbint_QueryUserList

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Make list_users use wb_query_user_list
Volker Lendecke [Mon, 2 Jan 2017 15:44:04 +0000 (15:44 +0000)]
winbind: Make list_users use wb_query_user_list

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Make wb_query_user_list just return names
Volker Lendecke [Mon, 2 Jan 2017 15:19:14 +0000 (15:19 +0000)]
winbind: Make wb_query_user_list just return names

Yes, this compiles. Nobody call this right now. Hold on :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove rpc_lookup_usergroups
Volker Lendecke [Tue, 3 Jan 2017 15:23:21 +0000 (15:23 +0000)]
winbind: Remove rpc_lookup_usergroups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove "lookup_usergroups" winbind method
Volker Lendecke [Tue, 3 Jan 2017 15:21:37 +0000 (15:21 +0000)]
winbind: Remove "lookup_usergroups" winbind method

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove validate_ug
Volker Lendecke [Tue, 3 Jan 2017 15:13:50 +0000 (15:13 +0000)]
winbind: Remove validate_ug

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove wcache_lookup_usergroups
Volker Lendecke [Tue, 3 Jan 2017 15:12:35 +0000 (15:12 +0000)]
winbind: Remove wcache_lookup_usergroups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove wb_cache_lookup_usergroups
Volker Lendecke [Tue, 3 Jan 2017 15:07:03 +0000 (15:07 +0000)]
winbind: Remove wb_cache_lookup_usergroups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove wbint_LookupUserGroups
Volker Lendecke [Tue, 3 Jan 2017 15:04:29 +0000 (15:04 +0000)]
winbind: Remove wbint_LookupUserGroups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove wb_lookupusergroups
Volker Lendecke [Tue, 3 Jan 2017 15:02:48 +0000 (15:02 +0000)]
winbind: Remove wb_lookupusergroups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Use wb_gettoken in getuserdomgroups
Volker Lendecke [Tue, 3 Jan 2017 15:00:46 +0000 (15:00 +0000)]
winbind: Use wb_gettoken in getuserdomgroups

This makes sure we return the same information regardless of which call into
winbind is used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Add "expand_local_aliases" to wb_gettoken
Volker Lendecke [Tue, 3 Jan 2017 14:54:46 +0000 (14:54 +0000)]
winbind: Add "expand_local_aliases" to wb_gettoken

I hate passing down booleans, but we have the "domain_groups_only"
parameter in wbcLookupUserSids which we need to keep for API
compatibility. To make sure we use as few code paths as possible, this
basically passes down this flag.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove rpc_query_user
Volker Lendecke [Mon, 2 Jan 2017 15:58:39 +0000 (15:58 +0000)]
winbind: Remove rpc_query_user

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove "query_user" backend function
Volker Lendecke [Mon, 2 Jan 2017 15:56:48 +0000 (15:56 +0000)]
winbind: Remove "query_user" backend function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove unused wb_cache_query_user
Volker Lendecke [Mon, 2 Jan 2017 10:35:02 +0000 (10:35 +0000)]
winbind: Remove unused wb_cache_query_user

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agowinbind: Remove wbint_QueryUser
Volker Lendecke [Mon, 2 Jan 2017 10:32:19 +0000 (10:32 +0000)]
winbind: Remove wbint_QueryUser

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>