sfrench/samba-autobuild/.git
8 years agothirdparty:waf: Update gccdeps from upstream
Thomas Nagy [Sat, 5 Dec 2015 11:04:29 +0000 (12:04 +0100)]
thirdparty:waf: Update gccdeps from upstream

The version from upstream was updated. It is not used at this moment
in Samba because there is a copy kept in builtools/wafsamba/gccdeps.py
which will be removed soon.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agoHappy New Year 2016!
Stefan Metzmacher [Thu, 31 Dec 2015 23:17:59 +0000 (00:17 +0100)]
Happy New Year 2016!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan  1 03:23:14 CET 2016 on sn-devel-144

8 years agotorture:smb2: fix copy'n'paste error in durable-open:open2:lease test
Michael Adam [Mon, 28 Dec 2015 23:44:11 +0000 (00:44 +0100)]
torture:smb2: fix copy'n'paste error in durable-open:open2:lease test

Checking against the correct smb2_create object also lets us
check the correct create action (EXISTED vs CREATED).

Observed when this showed up in flakey test results.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 29 08:34:03 CET 2015 on sn-devel-144

8 years agosmbd: remove function name from a DBG_INFO in a recent commit
Uri Simchoni [Sun, 27 Dec 2015 05:17:58 +0000 (07:17 +0200)]
smbd: remove function name from a DBG_INFO in a recent commit

We now have <function_name:> embedded automatically into DBG_XXX-
generated messages.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Dec 29 04:18:19 CET 2015 on sn-devel-144

8 years agosmbd: do not disable "store dos attributes" on-the-fly
Uri Simchoni [Thu, 24 Dec 2015 06:10:11 +0000 (08:10 +0200)]
smbd: do not disable "store dos attributes" on-the-fly

Smbd would disable "store dos attributes" on-the-fly if the
attempt to set/get user.DOSATTRIB fails with ENOTSUP or ENOSYS.
The rationale behind it was that the file system does not support
extended attributes, so there's no need to fill up the log with
failure messages.

However, a "wide symlink" could point to a spot that doesn't support
extended attributes. Even with the default banned wide links, we
currenly allow stat'ing those files and follow the symlink, and this
in turn would disable "store dos attributes" for the whole share.
The user.DOSATTRIB attribute also stores file creation time,
so that is also affected.

Another case where this behavior would turn storage of DOS attributes
off is that of the ".." entry at the root of the share, if the parent
folder for the share's root path does not support extended attributes.

On the other hand, the information on the file system and its support
of extended attributes is readily available, so the fix for explosion
of the log should be not to configure "store dos attributes" on
such a share.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Dec 25 13:20:58 CET 2015 on sn-devel-144

8 years agodsdb subnets: warn when an IPv6 address is in IPv4 embedding range
Douglas Bagnall [Tue, 22 Dec 2015 23:44:31 +0000 (12:44 +1300)]
dsdb subnets: warn when an IPv6 address is in IPv4 embedding range

We fail on these ones, and it isn't immediately obvious why. Windows
also fails on *most* of them, but succeeds on "::ffff:0:0" which is a
bit strange but there you go.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec 24 07:16:25 CET 2015 on sn-devel-144

8 years agosamldb: ensure subnets have proper net ranges
Douglas Bagnall [Wed, 23 Sep 2015 03:10:56 +0000 (15:10 +1200)]
samldb: ensure subnets have proper net ranges

A subnet name needs to be a valid CIDR address range -- that's the
ones that look like 10.9.8.0/22, where the number after the /
determines how many bits are in the address suffix. It can be IPv4 or
IPv6. There are a few odd constraints (see MS-ADTS v20150630
6.1.1.2.2.2.1 "Subnet Object") -- for example, with IPv4, the implied
bit mask can't equal the address. That is, you can't have a subnet
named "255.255.255.0/24" in a Windows subnet. This rule does not apply
to IPv6.

Windows and Samba both make some ensure that subnets have a unique
valid name, though unfortunately Windows 2008R2 is rather slack when
it comes to IPv6. We follow Windows 2012R2, which roughly follows
RFC5952 -- with one caveat: Windows will allow an address like
"::ffff:0:1:2", which translates to the IPv4 address "0.1.0.2" using
the SIIT translation scheme, and which inet_ntop() would render as
"::ffff:0:0.1.0.2". In the Samba implementation we use an inet_pton()/
inet_ntop() round-trip to establish canonicality, so these addresses
fail. Windows wisely does not allow the SIIT style addresses (the
acronym is widely agreed to be off-by-one in the second letter), and
it will regard "::ffff:0:1:2" as simply "::ffff:0:1:2" and allow it.
We would like to do that too.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agosamba-tool: add sites subnet subcommands
Douglas Bagnall [Tue, 27 Oct 2015 23:20:37 +0000 (12:20 +1300)]
samba-tool: add sites subnet subcommands

This allows you to add, remove, or shift subnets.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agosamba-tool tests: Add command line tests for sites
Douglas Bagnall [Thu, 17 Sep 2015 06:16:49 +0000 (18:16 +1200)]
samba-tool tests: Add command line tests for sites

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agopython/sites: Rework site DN construction
Andrew Bartlett [Thu, 29 Oct 2015 03:34:27 +0000 (16:34 +1300)]
python/sites: Rework site  DN construction

This new routine is safe against escape characters and works
against Windows 2012R2.

The dn= filter in the old code was samba-specific.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agopython.sites tests: remove excessive transaction management
Douglas Bagnall [Thu, 29 Oct 2015 01:54:15 +0000 (14:54 +1300)]
python.sites tests: remove excessive transaction management

These are atomic anyway.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agoselftest: Allow sites test to run against a remote ldap:// host
Andrew Bartlett [Wed, 28 Oct 2015 02:26:12 +0000 (15:26 +1300)]
selftest: Allow sites test to run against a remote ldap:// host

The previous code was just broken

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agosamba.sites: reduce code duplication in Exception classes
Douglas Bagnall [Thu, 17 Sep 2015 06:07:32 +0000 (18:07 +1200)]
samba.sites: reduce code duplication in Exception classes

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agodsdb.tests.sites: don't use global database, tidy long lines
Douglas Bagnall [Thu, 17 Sep 2015 06:28:09 +0000 (18:28 +1200)]
dsdb.tests.sites: don't use global database, tidy long lines

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agosamba.sites: improve grammar in an error message
Douglas Bagnall [Thu, 17 Sep 2015 06:10:03 +0000 (18:10 +1200)]
samba.sites: improve grammar in an error message

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agodsdb.tests.sites: merge interdependent tests
Douglas Bagnall [Wed, 16 Sep 2015 23:35:55 +0000 (11:35 +1200)]
dsdb.tests.sites: merge interdependent tests

The delete test deleted the site made by the create test, which worked
because "delete" sorts after "create" alphabetically.  By themselves,
"delete" would fail and "create" would neglect its duty to clean up.
This would be an issue if the order of tests changes, if one of the
tests is not run, or if another test appears in between. Everything is
fine if they give up the pretense of independence.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agosamba-tool sites: use -H to set URL with standard handling
Douglas Bagnall [Wed, 16 Sep 2015 02:17:25 +0000 (14:17 +1200)]
samba-tool sites: use -H to set URL with standard handling

samba-tool sites was defaulting to the local database, but we might
want to use another URL. This allows that case while defaulting to
the old behaviour.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agosambatool sites: PEP8/flake8 improvements
Douglas Bagnall [Thu, 17 Sep 2015 06:30:28 +0000 (18:30 +1200)]
sambatool sites: PEP8/flake8 improvements

We were nearly there, so lets make the jump. This involves removing
some unused variables.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agotorture/gentest time_skew(): don't use labs() on unsigned NTTIME
Douglas Bagnall [Tue, 22 Dec 2015 01:18:19 +0000 (14:18 +1300)]
torture/gentest time_skew(): don't use labs() on unsigned NTTIME

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agorepl: Skip new subdomains and partitions when replicating
Andrew Bartlett [Mon, 21 Dec 2015 03:40:28 +0000 (16:40 +1300)]
repl: Skip new subdomains and partitions when replicating

These will need to be handled later, but probably via reading the cross-ref objects.

This avoids total failure when cloning a DC that has
subdomains.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agos4:samba-tool domain raise tool - make it aware of newer domain function levels
Matthias Dieter Wallnöfer [Fri, 14 Mar 2014 16:54:48 +0000 (17:54 +0100)]
s4:samba-tool domain raise tool - make it aware of newer domain function levels

http://msdn.microsoft.com/en-us/library/Cc223742.aspx

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Thu Dec 24 04:08:04 CET 2015 on sn-devel-144

8 years agos4:samba-tool domain raise tool - handle Windows 2000 mode AD domains correctly
Matthias Dieter Wallnöfer [Fri, 14 Mar 2014 16:36:17 +0000 (17:36 +0100)]
s4:samba-tool domain raise tool - handle Windows 2000 mode AD domains correctly

Considering http://msdn.microsoft.com/en-us/library/cc220262.aspx they do not
provide any "msDS-Behavior-Version" attributes.

gulikoza <gulikoza@users.sourceforge.net> noticed this correctly.

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agos3:smbd: fix a corner case of the symlink verification
Michael Adam [Wed, 23 Dec 2015 17:01:23 +0000 (18:01 +0100)]
s3:smbd: fix a corner case of the symlink verification

Commit 7606c0db257b3f9d84da5b2bf5fbb4034cc8d77d fixes the
path checks in check_reduced_name[_with_privilege]() to
prevent unintended access via wide links.

The fix fails to correctly treat a corner case where the share
path is "/". This case is important for some real world
scenarios, notably the use of the glusterfs VFS module:

For the share path "/", the newly introduced checks deny all
operations in the share.

This change fixes the checks for the corner case.
The point is that the assumptions on which the original
checks are based are not true for the rootdir "/" case.
This is the case where the rootdir starts _and ends_ with
a slash. Hence a subdirectory does not continue with a
slash after the rootdir, since the candidate path has
been normalized.

This fix just omits the string comparison and the
next character checks in the case of rootdir "/",
which is correct because we know that the candidate
path is normalized and hence starts with a '/'.

The patch is fairly minimal, but changes indentation,
hence best viewed with 'git show -w'.

A side effect is that the rootdir="/" case needs
one strncmp less.

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

Pair-Programmed-With: Jose A. Rivera <jarrpa@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Dec 24 00:57:31 CET 2015 on sn-devel-144

8 years agos3: smbd: Replace lp_posix_pathnames() with req->posix_pathnames in dir.c. Only one...
Jeremy Allison [Tue, 22 Dec 2015 22:46:36 +0000 (14:46 -0800)]
s3: smbd: Replace lp_posix_pathnames() with req->posix_pathnames in dir.c. Only one remaining.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Dec 23 21:27:46 CET 2015 on sn-devel-144

8 years agos3: smbd: Remove lp_posix_pathnames() checks on paths sent in via old Win9X RPC calls.
Jeremy Allison [Tue, 22 Dec 2015 22:09:52 +0000 (14:09 -0800)]
s3: smbd: Remove lp_posix_pathnames() checks on paths sent in via old Win9X RPC calls.

No unix client makes these.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Replace lp_posix_pathnames() with smbreq->posix_pathnames in smb2_query_dir...
Jeremy Allison [Tue, 22 Dec 2015 21:55:21 +0000 (13:55 -0800)]
s3: smbd: Replace lp_posix_pathnames() with smbreq->posix_pathnames in smb2_query_directory.c.

Currently SMB2/3 doesn't do posix pathname processing, leave this
as a placeholder for when SMB2 unix extensions are added.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: smb2_create.c - remove all uses of lp_posix_pathnames().
Jeremy Allison [Tue, 22 Dec 2015 21:52:10 +0000 (13:52 -0800)]
s3: smbd: smb2_create.c - remove all uses of lp_posix_pathnames().

Currently SMB2/3 doesn't do POSIX pathname processing.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Convert all but one use of lp_posix_pathnames() into req->posix_pathnames...
Jeremy Allison [Tue, 22 Dec 2015 21:49:55 +0000 (13:49 -0800)]
s3: smbd: Convert all but one use of lp_posix_pathnames() into req->posix_pathnames in trans2.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Remove *all* uses of lp_posix_pathnames() from open.c
Jeremy Allison [Tue, 22 Dec 2015 21:45:30 +0000 (13:45 -0800)]
s3: smbd: Remove *all* uses of lp_posix_pathnames() from open.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Replace most uses of lp_posix_pathnames() with req->posix_pathnames in...
Jeremy Allison [Tue, 22 Dec 2015 21:44:10 +0000 (13:44 -0800)]
s3: smbd: Replace most uses of lp_posix_pathnames() with req->posix_pathnames in nttrans.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Replace most uses of lp_posix_pathnames() with req->posix_pathnames in...
Jeremy Allison [Tue, 22 Dec 2015 21:41:45 +0000 (13:41 -0800)]
s3: smbd: Replace most uses of lp_posix_pathnames() with req->posix_pathnames in reply.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Now struct smb_request has a bool posix_pathnames, remove the lp_posix_path...
Jeremy Allison [Tue, 22 Dec 2015 21:36:57 +0000 (13:36 -0800)]
s3: smbd: Now struct smb_request has a bool posix_pathnames, remove the lp_posix_pathnames() call inside srvstr_get_path_req_wcard().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: VFS change. Add new field bool posix_pathnames into struct smb_request.
Jeremy Allison [Tue, 22 Dec 2015 21:35:10 +0000 (13:35 -0800)]
s3: smbd: VFS change. Add new field bool posix_pathnames into struct smb_request.

Initialize from lp_posix_pathnames() global.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: srvstr_get_path() is now only called when lp_posix_pathnames() is false.
Jeremy Allison [Tue, 22 Dec 2015 21:27:55 +0000 (13:27 -0800)]
s3: smbd: srvstr_get_path() is now only called when lp_posix_pathnames() is false.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Split all calls to srvstr_get_path() to calls to srvstr_get_path_posix...
Jeremy Allison [Tue, 22 Dec 2015 21:26:49 +0000 (13:26 -0800)]
s3: smbd: Split all calls to srvstr_get_path() to calls to srvstr_get_path_posix() or srvstr_get_path() depending on lp_posix_pathnames().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Add srvstr_get_path_posix().
Jeremy Allison [Tue, 22 Dec 2015 21:18:03 +0000 (13:18 -0800)]
s3: smbd: Add srvstr_get_path_posix().

Not yet used, will be plumbed into existing callers of srvstr_get_path()
when lp_posix_pathnames() is true.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: We now know that srvstr_get_path_wcard() is only called when lp_posix_pathn...
Jeremy Allison [Tue, 22 Dec 2015 21:14:41 +0000 (13:14 -0800)]
s3: smbd: We now know that srvstr_get_path_wcard() is only called when lp_posix_pathnames() is false.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Split all calls to srvstr_get_path_wcard() into srvstr_get_path_wcard_posix...
Jeremy Allison [Tue, 22 Dec 2015 21:13:44 +0000 (13:13 -0800)]
s3: smbd: Split all calls to srvstr_get_path_wcard() into srvstr_get_path_wcard_posix() or srvstr_get_path_wcard() depending on lp_posix_pathnames().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Add srvstr_get_path_wcard_posix().
Jeremy Allison [Tue, 22 Dec 2015 21:07:49 +0000 (13:07 -0800)]
s3: smbd: Add srvstr_get_path_wcard_posix().

Allows us to call this directly and eventually remove the lp_posix_pathnames() call
from inside of srvstr_get_path_wcard().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Move lp_posix_pathnames() out into srvstr_get_path_req_wcard().
Jeremy Allison [Tue, 22 Dec 2015 21:04:11 +0000 (13:04 -0800)]
s3: smbd: Move lp_posix_pathnames() out into srvstr_get_path_req_wcard().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Move lp_posix_pathnames() out into srvstr_get_path().
Jeremy Allison [Tue, 22 Dec 2015 21:01:08 +0000 (13:01 -0800)]
s3: smbd: Move lp_posix_pathnames() out into srvstr_get_path().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agos3: smbd: Move lp_posix_pathnames() out of srvstr_get_path_wcard_internal().
Jeremy Allison [Tue, 22 Dec 2015 20:52:58 +0000 (12:52 -0800)]
s3: smbd: Move lp_posix_pathnames() out of srvstr_get_path_wcard_internal().

Pass as parameter. Part of moving this switch out to the external request
parsing code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
8 years agonet: Fix Coverity ID 241039 Unchecked return value
Volker Lendecke [Wed, 23 Dec 2015 10:32:04 +0000 (11:32 +0100)]
net: Fix Coverity ID 241039 Unchecked return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Dec 23 17:17:53 CET 2015 on sn-devel-144

8 years agos3: smbd: open_file: use FSP_POSIX_FLAGS_PATHNAMES
Jeremy Allison [Fri, 11 Dec 2015 22:49:44 +0000 (14:49 -0800)]
s3: smbd: open_file: use FSP_POSIX_FLAGS_PATHNAMES

Start using FSP_POSIX_FLAGS_PATHNAMES instead of the kitchen sink
FSP_POSIX_FLAGS_OPEN.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Dec 23 10:37:07 CET 2015 on sn-devel-144

8 years agosmbd: file_struct: factor out POSIX pathname processing out of POSIX open
Ralph Boehme [Sat, 12 Dec 2015 21:31:24 +0000 (22:31 +0100)]
smbd: file_struct: factor out POSIX pathname processing out of POSIX open

Factor out another POSIX cabability from file_struct.posix_flags
FSP_POSIX_FLAGS_OPEN.

Places that still use FSP_POSIX_FLAGS_OPEN when dealing with pathnames
can be converted later, because for the time being we always set
FSP_POSIX_FLAGS_ALL in file_struct.posix_flags.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos3: smbd: Remove lp_posix_pathnames() from filename.c
Jeremy Allison [Tue, 22 Dec 2015 19:32:20 +0000 (11:32 -0800)]
s3: smbd: Remove lp_posix_pathnames() from filename.c

Now correctly passed in everywhere as the UCF_POSIX_PATHNAMES flag.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Dec 23 06:31:28 CET 2015 on sn-devel-144

8 years agos3: smbd: In trans2.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathna...
Jeremy Allison [Tue, 22 Dec 2015 19:31:20 +0000 (11:31 -0800)]
s3: smbd: In trans2.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In smb2_query_directory.c.c, add in UCF_POSIX_PATHNAMES to the ucf_flags...
Jeremy Allison [Tue, 22 Dec 2015 19:27:39 +0000 (11:27 -0800)]
s3: smbd: In smb2_query_directory.c.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In smb2_create.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_p...
Jeremy Allison [Tue, 22 Dec 2015 19:26:18 +0000 (11:26 -0800)]
s3: smbd: In smb2_create.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In reply.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnam...
Jeremy Allison [Tue, 22 Dec 2015 19:25:16 +0000 (11:25 -0800)]
s3: smbd: In reply.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In open.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathname...
Jeremy Allison [Tue, 22 Dec 2015 19:19:23 +0000 (11:19 -0800)]
s3: smbd: In open.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In srv_srvsvc_nt.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix...
Jeremy Allison [Tue, 22 Dec 2015 19:18:19 +0000 (11:18 -0800)]
s3: smbd: In srv_srvsvc_nt.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In nttrans2.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_path...
Jeremy Allison [Tue, 22 Dec 2015 19:16:27 +0000 (11:16 -0800)]
s3: smbd: In nttrans2.c, add in UCF_POSIX_PATHNAMES to the ucf_flags if lp_posix_pathnames() requested.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In smb2_query_directory.c Use ucf_flags variable instead of passing as...
Jeremy Allison [Tue, 22 Dec 2015 19:12:34 +0000 (11:12 -0800)]
s3: smbd: In smb2_query_directory.c Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In smb2_create.c Use ucf_flags variable instead of passing as parameter.
Jeremy Allison [Tue, 22 Dec 2015 19:08:38 +0000 (11:08 -0800)]
s3: smbd: In smb2_create.c Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In srv_srvsvc_nt.c Use ucf_flags variable instead of passing as parameter.
Jeremy Allison [Tue, 22 Dec 2015 19:07:16 +0000 (11:07 -0800)]
s3: smbd: In srv_srvsvc_nt.c Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In trans2.c Use ucf_flags variable instead of passing as parameter.
Jeremy Allison [Tue, 22 Dec 2015 19:05:46 +0000 (11:05 -0800)]
s3: smbd: In trans2.c Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In reply.c Use ucf_flags variable instead of passing as parameter.
Jeremy Allison [Tue, 22 Dec 2015 18:58:44 +0000 (10:58 -0800)]
s3: smbd: In reply.c Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: In open.c Use ucf_flags variable instead of passing as parameter.
Jeremy Allison [Tue, 22 Dec 2015 18:51:35 +0000 (10:51 -0800)]
s3: smbd: In open.c Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agos3: smbd: Use ucf_flags variable instead of passing as parameter.
Jeremy Allison [Tue, 22 Dec 2015 18:49:08 +0000 (10:49 -0800)]
s3: smbd: Use ucf_flags variable instead of passing as parameter.

This will allow us to move lp_posix_pathnames() out of unix_convert()
later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
8 years agoFix typo in winbindd_cm.c
Marc Muehlfeld [Tue, 22 Dec 2015 20:13:52 +0000 (21:13 +0100)]
Fix typo in winbindd_cm.c

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 years agos3: fix encryption help messages
Ralph Boehme [Mon, 2 Nov 2015 15:33:34 +0000 (16:33 +0100)]
s3: fix encryption help messages

Encryption is a SMB3 feature and not tied to UNIX extensions, so fix the
help messages of various utilities.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 22 02:22:50 CET 2015 on sn-devel-144

8 years agos4:torture:vfs_fruit: add test test_read_afpinfo
Ralph Boehme [Fri, 18 Dec 2015 16:14:41 +0000 (17:14 +0100)]
s4:torture:vfs_fruit: add test test_read_afpinfo

This works against any SMB server and test basic IO on the AFP_AfpInfo
stream.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: add tests for AFP_Resource delete-on-close and eof
Ralph Boehme [Sat, 19 Dec 2015 17:44:18 +0000 (18:44 +0100)]
s4:torture:vfs_fruit: add tests for AFP_Resource delete-on-close and eof

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: ignore delete on the AFP_Resource stream
Ralph Boehme [Sat, 19 Dec 2015 17:27:06 +0000 (18:27 +0100)]
vfs_fruit: ignore delete on the AFP_Resource stream

OS X ignores deletes on the AFP_Resource stream. This was discovered by
torture tests against OS X SMB server.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: update AFP_AfpInfo IO tests
Ralph Boehme [Sat, 19 Dec 2015 10:10:54 +0000 (11:10 +0100)]
s4:torture:vfs_fruit: update AFP_AfpInfo IO tests

When reading from the AFP_AfpInfo stream, OS X ignores the offset from
the request and always reads from offset=0.

The offset bounds check has a off-by-1 bug in OS X, so a request
offset=60 (AFP_AfpInfo stream has a ficed size of 60 bytes), len=1
returns 1 byte from offset 0 insteaf of returning 0.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: fix offset and len handling for AFP_AfpInfo stream
Ralph Boehme [Sat, 19 Dec 2015 10:06:19 +0000 (11:06 +0100)]
vfs_fruit: fix offset and len handling for AFP_AfpInfo stream

When reading from the AFP_AfpInfo stream, OS X ignores the offset from
the request and always reads from offset=0.

The offset bounds check has a off-by-1 bug in OS X, so a request
offset=60 (AFP_AfpInfo stream has a ficed size of 60 bytes), len=1
returns 1 byte from offset 0 insteaf of returning 0.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: test nulling out AFP_AfpInfo stream
Ralph Boehme [Sun, 20 Dec 2015 18:55:06 +0000 (19:55 +0100)]
s4:torture:vfs_fruit: test nulling out AFP_AfpInfo stream

This must delete the stream.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: writing all 0 to AFP_AfpInfo stream
Ralph Boehme [Thu, 17 Dec 2015 19:08:35 +0000 (20:08 +0100)]
vfs_fruit: writing all 0 to AFP_AfpInfo stream

When writing all 0 to AFP_AfpInfo stream we can remove the underlying
storage object. This beaviour of OS X SMB server was found with a
torture test.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: add tests for AFP_AfpInfo delete-on-close and eof
Ralph Boehme [Thu, 17 Dec 2015 18:47:18 +0000 (19:47 +0100)]
s4:torture:vfs_fruit: add tests for AFP_AfpInfo delete-on-close and eof

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: handling of ftruncate() on AFP_AfpInfo stream
Ralph Boehme [Mon, 14 Dec 2015 15:09:54 +0000 (16:09 +0100)]
vfs_fruit: handling of ftruncate() on AFP_AfpInfo stream

With help of some torture tests I verified the following behaviour of OS
X SMB server:

* ftruncate AFP_AfpInfo stream > 60 bytes results in an error
  NT_STATUS_ALLOTTED_SPACE_EXCEEDED

* ftruncate AFP_AfpInfo stream <=60 returns success but has no effect

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: file without AFP_AfpInfo
Ralph Boehme [Sun, 20 Dec 2015 17:42:23 +0000 (18:42 +0100)]
s4:torture:vfs_fruit: file without AFP_AfpInfo

Opening the AFP_AfpInfo on a file that doesn't have that stream must
return ENOENT.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: stat AFP_AfpInfo must fail when it doesn't exist
Ralph Boehme [Thu, 17 Dec 2015 19:05:04 +0000 (20:05 +0100)]
vfs_fruit: stat AFP_AfpInfo must fail when it doesn't exist

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: fix some debug messages
Ralph Boehme [Fri, 11 Dec 2015 16:27:50 +0000 (17:27 +0100)]
vfs_fruit: fix some debug messages

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos3:lib/errmap_unix: map EOVERFLOW to NT_STATUS_ALLOTTED_SPACE_EXCEEDED
Ralph Boehme [Thu, 17 Dec 2015 18:16:43 +0000 (19:16 +0100)]
s3:lib/errmap_unix: map EOVERFLOW to NT_STATUS_ALLOTTED_SPACE_EXCEEDED

vfs_fruit returns the correct error NT_STATUS_ALLOTTED_SPACE_EXCEEDED
when an attempt is made to extend the AFP_AfpInfo stream beyond 60
bytes.

This will be used in a subsequent commit in vfs_fruit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: fix flakey test_write_atalk_rfork_io with OS X
Ralph Boehme [Sat, 19 Dec 2015 17:56:24 +0000 (18:56 +0100)]
s4:torture:vfs_fruit: fix flakey test_write_atalk_rfork_io with OS X

Adjust desired_access to prevent flaky test with OS X SMB server.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: fix test_rename_dir_openfile() to work with OS X
Ralph Boehme [Fri, 18 Dec 2015 16:25:07 +0000 (17:25 +0100)]
s4:torture:vfs_fruit: fix test_rename_dir_openfile() to work with OS X

OS X allows renaming of directories with open files regardless of AAPL
negotiation. Samba will only allow this after negotiating AAPL.

The first check in this test is that renaming fails without AAPL, so
skip this test if the server is OS X.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: fix test_aapl() to work with OS X
Ralph Boehme [Fri, 18 Dec 2015 16:23:40 +0000 (17:23 +0100)]
s4:torture:vfs_fruit: fix test_aapl() to work with OS X

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: skip test_stream_names() without "localdir"
Ralph Boehme [Fri, 18 Dec 2015 16:24:12 +0000 (17:24 +0100)]
s4:torture:vfs_fruit: skip test_stream_names() without "localdir"

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: skip test_adouble_conversion() without "localdir"
Ralph Boehme [Fri, 18 Dec 2015 16:22:32 +0000 (17:22 +0100)]
s4:torture:vfs_fruit: skip test_adouble_conversion() without "localdir"

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: skip test test_read_atalk_metadata() without "localdir" and...
Ralph Boehme [Fri, 18 Dec 2015 16:10:18 +0000 (17:10 +0100)]
s4:torture:vfs_fruit: skip test test_read_atalk_metadata() without "localdir" and rename it

The test is Netatalk specific. Skip the test if "localdir" is not
specified.

Use torture_assert() to check the result from check_stream().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: add explicit cleanup of testfiles
Ralph Boehme [Fri, 18 Dec 2015 16:18:41 +0000 (17:18 +0100)]
s4:torture:vfs_fruit: add explicit cleanup of testfiles

smb2_deltree() doesn't work with OS X (looks like OS X doesn't handle
FILE_NON_DIRECTORY_FILE correctly). As a workaround, use explicit
cleanup of all testfiles and directories.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: add --option=torture:osx for enable_aapl()
Ralph Boehme [Fri, 18 Dec 2015 16:08:32 +0000 (17:08 +0100)]
s4:torture:vfs_fruit: add --option=torture:osx for enable_aapl()

Check if the server is OS X and don't check the AAPL context size if it
is.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: enhance check_stream
Ralph Boehme [Thu, 17 Dec 2015 18:22:12 +0000 (19:22 +0100)]
s4:torture:vfs_fruit: enhance check_stream

Don't sleep when create fails and use torture_ macros.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: use AFPINFO_STREAM_NAME
Ralph Boehme [Thu, 17 Dec 2015 15:51:10 +0000 (16:51 +0100)]
s4:torture:vfs_fruit: use AFPINFO_STREAM_NAME

I got erratic results from OS X SMB server with AFPINFO_STREAM
(":AFP_AfpInfo:$DATA") in some tests. Using AFPINFO_STREAM_NAME
(just the ":AFP_AfpInfo" part) instead fixed this.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: tweak check_stream_list()
Ralph Boehme [Thu, 17 Dec 2015 12:31:12 +0000 (13:31 +0100)]
s4:torture:vfs_fruit: tweak check_stream_list()

Modify check_stream_list() to open the basefile (or directory) itself
insteaf of having the callers pass in a filehandle. Removes some code
duplication in the callers.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: rename tree1 -> tree
Ralph Boehme [Sun, 20 Dec 2015 09:18:31 +0000 (10:18 +0100)]
s4:torture:vfs_fruit: rename tree1 -> tree

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4:torture:vfs_fruit: remove unused tree2
Ralph Boehme [Sun, 20 Dec 2015 09:16:25 +0000 (10:16 +0100)]
s4:torture:vfs_fruit: remove unused tree2

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-torture: add a negoex ndr pullpush test.
Günther Deschner [Fri, 18 Dec 2015 12:16:28 +0000 (13:16 +0100)]
s4-torture: add a negoex ndr pullpush test.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Dec 21 01:37:29 CET 2015 on sn-devel-144

8 years agotdb: Refuse to load a database with hash size 0
Andrew Bartlett [Mon, 9 Nov 2015 01:10:11 +0000 (14:10 +1300)]
tdb: Refuse to load a database with hash size 0

This just ensures we reject (rather than div-by-0) a corrupt
DB with a zero hash size.

Found with american fuzzy lop

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 18 08:26:25 CET 2015 on sn-devel-144

8 years agolibads: Remove "foreign" from ads_struct
Volker Lendecke [Wed, 16 Dec 2015 20:44:50 +0000 (21:44 +0100)]
libads: Remove "foreign" from ads_struct

AFAICS this was never actually used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agonegoex.idl: use DATA_BLOB for negoex_BYTE_VECTOR
Stefan Metzmacher [Mon, 7 Dec 2015 08:31:03 +0000 (09:31 +0100)]
negoex.idl: use DATA_BLOB for negoex_BYTE_VECTOR

That's much easier for the callers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec 18 04:07:56 CET 2015 on sn-devel-144

8 years agonegoex.idl: initial version
Stefan Metzmacher [Mon, 7 Dec 2015 08:30:47 +0000 (09:30 +0100)]
negoex.idl: initial version

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
8 years agos3: libsmb: Correctly initialize the list head when keeping a list of primary followe...
Jeremy Allison [Wed, 16 Dec 2015 19:04:20 +0000 (11:04 -0800)]
s3: libsmb: Correctly initialize the list head when keeping a list of primary followed by DFS connections.

Greatly helped by <shargagan@novell.com> to
track down this issue.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Dec 18 01:02:55 CET 2015 on sn-devel-144

8 years agovfs_glusterfs: Fix a memory leak in AIO
Jose A. Rivera [Thu, 17 Dec 2015 14:19:22 +0000 (08:19 -0600)]
vfs_glusterfs: Fix a memory leak in AIO

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Thu Dec 17 20:55:22 CET 2015 on sn-devel-144

8 years agos3:libsmb: remove unused spnego related includes
Stefan Metzmacher [Wed, 9 Dec 2015 11:25:46 +0000 (12:25 +0100)]
s3:libsmb: remove unused spnego related includes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec 17 17:49:14 CET 2015 on sn-devel-144

8 years agos3:smbd: remove unused spnego related includes
Stefan Metzmacher [Wed, 9 Dec 2015 11:25:46 +0000 (12:25 +0100)]
s3:smbd: remove unused spnego related includes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
8 years agoselftest: Ensure that if the SAMBA_PID is not set, that the env is not OK
Andrew Bartlett [Mon, 7 Dec 2015 00:32:25 +0000 (13:32 +1300)]
selftest: Ensure that if the SAMBA_PID is not set, that the env is not OK

This ensures that we must instead start the selftest environment, it is not already running

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec 17 06:27:14 CET 2015 on sn-devel-104

8 years agoselftest: Do not start tests on an environment that has failed to start up
Andrew Bartlett [Mon, 7 Dec 2015 00:18:38 +0000 (13:18 +1300)]
selftest: Do not start tests on an environment that has failed to start up

This avoids debugging subsequent test failures, which may not be as clear

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agoldb torture: test ldb_unpack_data_only_attr_list ldb-1.1.25
Adrian Cochrane [Fri, 14 Aug 2015 02:27:03 +0000 (14:27 +1200)]
ldb torture: test ldb_unpack_data_only_attr_list

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11602
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>