]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
8 years agosamba-tool/ldapcmp: ignore differences of whenChanged
Stefan Metzmacher [Mon, 8 Aug 2016 10:53:26 +0000 (12:53 +0200)] 
samba-tool/ldapcmp: ignore differences of whenChanged

This is implicitly replicated, but may diverge on updates of non-replicated
attributes.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Aug  8 17:34:24 CEST 2016 on sn-devel-144

(cherry picked from commit a0e60e96aa38407ded8d63650dcf8f39304c958a)

8 years agoscript/autobuild.py: include the branch name in the output
Stefan Metzmacher [Wed, 10 Aug 2016 10:44:26 +0000 (12:44 +0200)] 
script/autobuild.py: include the branch name in the output

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Aug 11 08:38:47 CEST 2016 on sn-devel-144

(cherry picked from commit 98d289d2e5162a23d15562b009d0edf20a55a56b)

8 years agoautobuild: fix typo in autobuild success subject line
Garming Sam [Wed, 4 May 2016 22:37:08 +0000 (10:37 +1200)] 
autobuild: fix typo in autobuild success subject line

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Thu May  5 04:15:16 CEST 2016 on sn-devel-144

(cherry picked from commit 2fe2e662dba080536a0f6c5485514097dd74a65a)

8 years agoautobuild: Return the last 50 log lines
Garming Sam [Mon, 14 Mar 2016 01:18:54 +0000 (14:18 +1300)] 
autobuild: Return the last 50 log lines

This means that you don't have to deal with tars for quickly determining
the cause of a failure.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 3751ffbbe75524984a822d65f623a040ca79c8f7)

8 years agoautobuild: Give a clearer failure message
Andrew Bartlett [Wed, 21 Oct 2015 01:35:33 +0000 (14:35 +1300)] 
autobuild: Give a clearer failure message

This helps when autobuild.py is used in --tail mode and
where there is neither e-mail nor access to the logs.tar.gz

Working back to find where the error happened is typically
quite difficult, as many failures are actually due to the
cleanup.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 9a91fce2deccfe0445363b2a35f2cfb72fdff766)

8 years agodbwrap_ctdb: treat empty records in ltdb as non-existing
Ralph Boehme [Mon, 8 Aug 2016 14:58:51 +0000 (16:58 +0200)] 
dbwrap_ctdb: treat empty records in ltdb as non-existing

When fetching records from remote ctdb nodes via ctdbd_parse() or in
db_ctdb_traverse(), we already check for tombstone records and skip
them. This was originally also done for the ltdb checks.

See also bug: https://bugzilla.samba.org/show_bug.cgi?id=10008
(commit 1cae59ce112ccb51b45357a52b902f80fce1eef1).

Commit 925625b52886d40b50fc631bad8bdc81970f7598 reverted part of the
patch of bug 10008 due to a deadlock it introduced.

This patch re-introduces the consistent treatment of empty records in
the ltdb but avoids the deadlock by correctly signalling
NT_STATUS_NOT_FOUND if an empty record is found authoritatively in
the ltdb and not calling ctdb in this case.

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

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Aug  9 04:38:44 CEST 2016 on sn-devel-144

(backported from commit 25df582739918b7afd4e5497eaffe279e2d92cd1)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Wed Aug 10 14:58:12 CEST 2016 on sn-devel-104

8 years agos4/torture: add a test for ctdb-tombstrone-record deadlock
Ralph Boehme [Sat, 23 Jul 2016 09:08:13 +0000 (11:08 +0200)] 
s4/torture: add a test for ctdb-tombstrone-record deadlock

This tests for a possible deadlock between smbd and ctdb dealing with
ctdb tombstone records.

Commit 925625b52886d40b50fc631bad8bdc81970f7598 explains the deadlock in
more details and contains the fix. It's a fix for a regression
introduced by the patch for bug 10008 (1cae59ce112c).

If you ever want to use this test against that specific commit:

$ git checkout 925625b52886d40b50fc631bad8bdc81970f7598
$ git cherry-pick THIS_COMMIT

This should not deadlock on a ctdb cluster.

$ git revert 925625b52886d40b50fc631bad8bdc81970f7598

This will deadlock.

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

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit b17e2f5c740fb081c007ed2e1c23138ffcba1469)

8 years agosmbd: ignore ctdb tombstone records in fetch_share_mode_unlocked_parser()
Ralph Boehme [Wed, 20 Jul 2016 10:36:24 +0000 (12:36 +0200)] 
smbd: ignore ctdb tombstone records in fetch_share_mode_unlocked_parser()

dbwrap_parse_record() can return ctdb tombstone records from the lctdb,
ignore them.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 7147859c7afc1344e76485e2cbc286679110d96e)

8 years agoctdb-daemon: Fix CID 1125627 Resource leak (RESOURCE_LEAK)
Martin Schwenke [Fri, 5 Aug 2016 06:50:58 +0000 (16:50 +1000)] 
ctdb-daemon: Fix CID 1125627 Resource leak (RESOURCE_LEAK)

Also fixes CID 1125628.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 940272d215049f5f5079aa926e69eae1985a4bfa)

8 years agoctdb-common: Fix CID 1125585 Dereference after null check (FORWARD_NULL)
Martin Schwenke [Fri, 5 Aug 2016 06:39:50 +0000 (16:39 +1000)] 
ctdb-common: Fix CID 1125585 Dereference after null check (FORWARD_NULL)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit b4f23a7e95cd9c8fc4a6324d4ec5a2881eaec207)

8 years agoctdb-common: Fix CID 1125583 Dereference after null check (FORWARD_NULL)
Martin Schwenke [Fri, 5 Aug 2016 06:38:45 +0000 (16:38 +1000)] 
ctdb-common: Fix CID 1125583 Dereference after null check (FORWARD_NULL)

This also fixes CID 1125584.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit bbf0b907cb04184515d0f5f09f14824df1c2e59f)

8 years agoctdb-common: Fix CID 1125581 Dereference after null check (FORWARD_NULL)
Martin Schwenke [Fri, 5 Aug 2016 06:37:00 +0000 (16:37 +1000)] 
ctdb-common: Fix CID 1125581 Dereference after null check (FORWARD_NULL)

This also fixes CID 1125582.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 7ae3699831427725f12e0a26a0681e59f2fbb2d9)

8 years agoctdb-daemon: Fix CID 1363067 Resource leak (RESOURCE_LEAK)
Martin Schwenke [Thu, 28 Jul 2016 02:06:23 +0000 (12:06 +1000)] 
ctdb-daemon: Fix CID 1363067 Resource leak (RESOURCE_LEAK)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit c6a7f680ce74d4a630fa9305d0a926cc1a4b3d2c)

8 years agoctdb-daemon: Fix CID 1363233 Resource leak (RESOURCE_LEAK)
Martin Schwenke [Thu, 28 Jul 2016 02:00:27 +0000 (12:00 +1000)] 
ctdb-daemon: Fix CID 1363233 Resource leak (RESOURCE_LEAK)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 74aca5f4c671d9f15ae6c3a901978a1cf247dd6f)

8 years agoctdb-utils: Fix CID 1297451 Explicit null dereferenced (FORWARD_NULL)
Martin Schwenke [Wed, 27 Jul 2016 07:43:34 +0000 (17:43 +1000)] 
ctdb-utils: Fix CID 1297451 Explicit null dereferenced (FORWARD_NULL)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit d46960f20e795cd4abc1c727705f77b2f0e0e564)

8 years agoctdb-common: Consistently use strlcpy() on interface names
Martin Schwenke [Mon, 1 Aug 2016 05:03:56 +0000 (15:03 +1000)] 
ctdb-common: Consistently use strlcpy() on interface names

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit aff33a59479cafcb1f24a07ff76383d47bb196b3)

8 years agoctdb-common: Fix CID 1125553 Buffer not null terminated (BUFFER_SIZE_WARNING)
Martin Schwenke [Wed, 27 Jul 2016 06:22:36 +0000 (16:22 +1000)] 
ctdb-common: Fix CID 1125553 Buffer not null terminated (BUFFER_SIZE_WARNING)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 763f9c13f2998a8858e8a3ec013d166a3d429835)

8 years agoctdb-daemon: Fix CID 1364527/8/9: Null pointer dereferences (NULL_RETURNS)
Martin Schwenke [Wed, 27 Jul 2016 01:45:49 +0000 (11:45 +1000)] 
ctdb-daemon: Fix CID 1364527/8/9: Null pointer dereferences (NULL_RETURNS)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit ed81e51cc1633cecfef05b84c0595418db8a384b)

9 years agoctdb-scripts: Fix regression in updateip code
Martin Schwenke [Fri, 18 Dec 2015 04:33:38 +0000 (15:33 +1100)] 
ctdb-scripts: Fix regression in updateip code

Regression introduced in commit
6471541d6d2bc9f2af0ff92b280abbd1d933cf88.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12106

(cherry picked from commit d8e4c5a468286ecc1c38ecd66a3606e84db02373)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Fri Aug  5 13:17:21 CEST 2016 on sn-devel-104

9 years agoasync_req: make async_connect_send() "reentrant"
Ralph Boehme [Wed, 3 Aug 2016 13:00:45 +0000 (15:00 +0200)] 
async_req: make async_connect_send() "reentrant"

Allow callers to pass in socket fds that where already passed to an
earlier call of async_connect_send(). Callers expect this behaviour and
it was working until 05d4dbda8357712cb81008e0d611fdb0e7239587 broke it.

The proper fix would be to change callers to close the fd and start from
scratch with a fresh socket.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Aug  4 05:03:21 CEST 2016 on sn-devel-144

(cherry picked from commit 9c6a4ea2788808bdcc7bfea798d838ea56c3b5ec)

9 years agovfs_acl_xattr: objects without NT ACL xattr
Ralph Boehme [Fri, 15 Jul 2016 15:48:19 +0000 (17:48 +0200)] 
vfs_acl_xattr: objects without NT ACL xattr

Even with "ignore system acls" set to "yes", for objects without NT ACL
xattr we use the underlying filesystem permissions to construct an NT
ACL. This can result in *very* unexpected permissions, eg:

- a directory with the following ACL:

$ ./bin/smbcacls -Uslow%pass //localhost/normal ""
REVISION:1
CONTROL:SR|DP
OWNER:SLOW\slow
GROUP:Unix Group\root
ACL:SLOW\slow:ALLOWED/0x0/FULL

So only one non-inheritable(!) ACE.

- creating a subdirectory:

$ ./bin/smbclient -Uslow%pass //localhost/normal -c "mkdir dir1"

- checking whether there's an ACL xattr:

$ getfattr -m "" /Volumes/normal/dir1
getfattr: Removing leading '/' from absolute path names
system.posix_acl_access
system.posix_acl_default
user.DOSATTRIB

So there isn't an ACL xattr, because there where no inheritable ACEs on
the parent folder.

- reading the new subdirectories ACL:

$ ./bin/smbcacls -Uslow%pass //localhost/normal "dir1"
REVISION:1
CONTROL:SR|DP
OWNER:SLOW\slow
GROUP:Unix Group\slow
ACL:SLOW\slow:ALLOWED/0x0/FULL
ACL:Unix Group\slow:ALLOWED/0x0/READ
ACL:Everyone:ALLOWED/0x0/READ
ACL:NT Authority\SYSTEM:ALLOWED/0x0/FULL

The ACES for "SLOW\slow", "Unix Group\slow" and "Everyone" are coming
from the underlying filesystem. This is the problem.

- Windows assigns the following ACL in this situation:

$ ./bin/smbcacls -UAdministrator%Passw0rd //10.10.10.14/data "dir"
REVISION:1
CONTROL:SR|PD|DI|DP
OWNER:VORDEFINIERT\Administratoren
GROUP:WIN2008R2\Domänen-Benutzer
ACL:WIN2008R2\Administrator:ALLOWED/0x0/FULL

$ ./bin/smbclient -UAdministrator%Passw0rd //10.10.10.14/data -c "mkdir dir\dir1"

$ ./bin/smbcacls -UAdministrator%Passw0rd //10.10.10.14/data "dir\dir1"
REVISION:1
CONTROL:SR|DI|DP
OWNER:VORDEFINIERT\Administratoren
GROUP:WIN2008R2\Domänen-Benutzer
ACL:VORDEFINIERT\Administratoren:ALLOWED/0x0/FULL
ACL:NT-AUTORITÄT\SYSTEM:ALLOWED/0x0/FULL

By changing make_default_filesystem_acl() to only adds user and system
ACE to the ACL of objects that lack an ACL xattr, we match Windows
behaviour:

$ ./bin/smbclient -Uslow%pass //localhost/normal -c "mkdir dir2"

$ ./bin/smbcacls -Uslow%pass //localhost/normal "dir2"
REVISION:1
CONTROL:SR|DP
OWNER:SLOW\slow
GROUP:Unix Group\slow
ACL:SLOW\slow:ALLOWED/0x0/FULL
ACL:NT Authority\SYSTEM:ALLOWED/0x0/FULL

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jul 19 10:22:05 CEST 2016 on sn-devel-144

(cherry picked from commit 961c4b591bb102751079d9cc92d7aa1c37f1958c)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Wed Aug  3 14:42:05 CEST 2016 on sn-devel-104

9 years agos3/smbd: move make_default_filesystem_acl() to vfs_acl_common.c
Ralph Boehme [Fri, 15 Jul 2016 15:56:02 +0000 (17:56 +0200)] 
s3/smbd: move make_default_filesystem_acl() to vfs_acl_common.c

This function is only used in vfs_acl_common.c and will be modified in
the next commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit afc2417b107af572081974ff9d013ddec890d31f)

9 years agosmbd/notifyd: use smbd_reinit_after_fork()
Ralph Boehme [Tue, 5 Jul 2016 13:37:53 +0000 (15:37 +0200)] 
smbd/notifyd: use smbd_reinit_after_fork()

Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures
am_parent is reset to NULL. Otherwise, when exiting for some reason, the
inherited atexit handler killkids() calls kill(0,SIGTERM) terminating
our whole process group including the main smbd.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(backported from commit bb90a8484a734b76ddd4d270f31fcdb4ae6cc48d)

9 years agos3-rpc_server/mdssd: use smbd_reinit_after_fork()
Ralph Boehme [Tue, 5 Jul 2016 13:38:31 +0000 (15:38 +0200)] 
s3-rpc_server/mdssd: use smbd_reinit_after_fork()

Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures
am_parent is reset to NULL. Otherwise, when exiting for some reason, the
inherited atexit handler killkids() calls kill(0,SIGTERM) terminating
our whole process group including the main smbd.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jul 11 02:02:33 CEST 2016 on sn-devel-144

(backported from commit 6efd0af5e8d8ee81b5f53afb126d87950088b7cd)

9 years agoselftest: test idmap backend id allocation for unknown SIDS
Ralph Boehme [Sun, 12 Jun 2016 17:03:11 +0000 (19:03 +0200)] 
selftest: test idmap backend id allocation for unknown SIDS

If an SID is is not found becaues the RID doesn't exist in a domain and
the domain is configured to use a non-allocating idmap backend like
idmap_ad or idmap_rfc2307, winbindd must not return a mapping for the
SID.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 2a322a7671c9ffd0dd600142dd76b5b51a67e185)

9 years agoselftest: make autorid the default idmap backend in admember_rfc2307
Ralph Boehme [Fri, 24 Jun 2016 16:33:01 +0000 (18:33 +0200)] 
selftest: make autorid the default idmap backend in admember_rfc2307

This is needed for a new test in the next commit. Exisiting tests aren't
affected by this, at least a private autobuild passed with this
change.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit aa54fa4e88cc80bc7841beba3a5561ad2c83dc80)

9 years agowinbindd: in wb_lookupsids return domain name if we have it
Ralph Boehme [Fri, 24 Jun 2016 13:16:42 +0000 (15:16 +0200)] 
winbindd: in wb_lookupsids return domain name if we have it

When doing a SID to xid mapping for an unknown SID, the idmap child gets
passed a lsa_RefDomainList with an empty domain name (ie ""). This is
coming from LsaLookupSids() and causes the mapping request to end up in
the default idmap domain.

Example request with domain name "":

  wbint_Sids2UnixIDs: struct wbint_Sids2UnixIDs
     in: struct wbint_Sids2UnixIDs
         domains                  : *
             domains: struct lsa_RefDomainList
                 count                    : 0x00000001 (1)
                 domains                  : *
                     domains: ARRAY(1)
                         domains: struct lsa_DomainInfo
                             name: struct lsa_StringLarge
                                 length                   : 0x0000 (0)
                                 size                     : 0x0002 (2)
                                 string                   : *
                                     string                   : ''
                             sid                      : *
                                 sid                      : S-1-5-21-3152989960-574718769-2188965058
                 max_size                 : 0x00000020 (32)
         ids                      : *
             ids: struct wbint_TransIDArray
                 num_ids                  : 0x00000001 (1)
                 ids: ARRAY(1)
                     ids: struct wbint_TransID
                         type                     : ID_TYPE_NOT_SPECIFIED (0)
                         domain_index             : 0x00000000 (0)
                         rid                      : 0x000029aa (66666)
                         xid: struct unixid
                             id                       : 0xffffffff (4294967295)
                             type                     : ID_TYPE_NOT_SPECIFIED (0)

In _wbint_Sids2UnixIDs() we call idmap_find_domain_with_sid() with the
domain name "" and this triggers use of the default idmap domain which
in case of idmap_autorid will allocate an id from a idmap_autorid range.

If we know the domain, ensure we return it for SIDs were the SID was not
found but the domain of the SID was found. Callers like sids2xids depend
on the domain name and returning an empty string "" for valid domain can
trigger unwanted idmap range allocations.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 9be918116e356c358ef77cc2933e471090088293)

9 years agowinbindd/idmap_rfc2307: fix a crash
Ralph Boehme [Fri, 24 Jun 2016 16:31:45 +0000 (18:31 +0200)] 
winbindd/idmap_rfc2307: fix a crash

map->map is NULL if lookupsid failed.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 5e346af078847512e86755a4634583a8a5178c0e)

9 years agos3:mdssvc: older glib2 versions require g_type_init()
Ralph Boehme [Thu, 17 Mar 2016 13:05:58 +0000 (14:05 +0100)] 
s3:mdssvc: older glib2 versions require g_type_init()

Older glib2 versions will crash if g_type_init is not called:

(process:6712): GLib-GObject-CRITICAL **: ... ./gobject/gtype.c:2722:
You forgot to call g_type_init()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 18 03:52:55 CET 2016 on sn-devel-144

(cherry picked from commit 3563d79a8cb625ae78523cb32330c9f61c6c3a2f)

9 years agoctdb-common: For AF_PACKET socket types, protocol is in network order
Amitay Isaacs [Thu, 3 Mar 2016 03:17:40 +0000 (14:17 +1100)] 
ctdb-common: For AF_PACKET socket types, protocol is in network order

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

From man page of packet(7):

                                             protocol is the  IEEE  802.3
   protocol  number  in  network  byte  order.  See the <linux/if_ether.h>
   include file for a list of allowed protocols.  When protocol is set  to
   htons(ETH_P_ALL),  then all protocols are received.

Protocol argument was changed from network order to host order wrongly
in commit 9f8395cb7d49b63a82f75bf504f5f83920102b29.

Specifying "protocol" field to socket(AF_PACKET, ...) call only affects
the packets that are recevied.  So use protocol = 0 when sending raw
packets.

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 Mar  4 12:58:50 CET 2016 on sn-devel-144

(cherry picked from commit f5b6a5b13406c245ab9cc8c1699483af9eb21f88)

9 years agos3: smbd: Fix delete operations enumerating streams inside a file. This must always...
Jeremy Allison [Wed, 20 Jul 2016 18:34:48 +0000 (11:34 -0700)] 
s3: smbd: Fix delete operations enumerating streams inside a file. This must always be done as a Windows operation.

When using UNIX extensions to delete a file containing streams,
the open for delete and close operations need to enumerate the
contained streams and do CREATE and UNLINK operations on the
stream names. These must always be done as Windows operations
(use lp_set_posix_pathnames(false) to flip the processing) as
the stream names are Windows paths.

Without this the create operation under the unlink will
recurse and cause the client to time out (or a server crash).

This (hack) is only needed for 4.4.x and below, it is fixed
correctly in 4.5.x.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
9 years agos3: smbd: Change lp_set_posix_pathnames() to take a newval parameter and return the...
Jeremy Allison [Wed, 20 Jul 2016 18:25:20 +0000 (11:25 -0700)] 
s3: smbd: Change lp_set_posix_pathnames() to take a newval parameter and return the old one.

Currently only used in one place, but we'll need to use it to
temporarily change pathname processing to fix bug 12021.

This (hack) is only needed for 4.4.x and below, it is fixed
correctly in 4.5.x.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
9 years agos4: ldb: Ignore case of "range" in sscanf as we've already checked for its presence.
Jeremy Allison [Tue, 28 Jun 2016 22:38:22 +0000 (15:38 -0700)] 
s4: ldb: Ignore case of "range" in sscanf as we've already checked for its presence.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 1d4b20d4f3829eb3778006397990cd9fee4966a5)

9 years agoparam: Correct the defaults for "dcerpc endpoint services"
Andrew Bartlett [Sat, 9 Jul 2016 05:36:18 +0000 (17:36 +1200)] 
param: Correct the defaults for "dcerpc endpoint services"

We must not list any services that we skip building, as otherwise all RPC services fail to start.

We now build without the source4 spoolss server in non-developer builds

This fixes commit 0b4c741b9c03d147ee5f56d027bacda75c1b5282

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12025
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit 748384992b96c3936d82bc09f39459fb4bd489bd)

9 years agobuild: Always build eventlog6. This is not a duplicate of eventlog
Andrew Bartlett [Sat, 9 Jul 2016 05:34:39 +0000 (17:34 +1200)] 
build: Always build eventlog6. This is not a duplicate of eventlog

The eventlog6 pipe is not a duplicate with the source3 code, so should be built even
for the default build with smbd for file serving

This fixes commit 0b4c741b9c03d147ee5f56d027bacda75c1b5282

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12026
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit d183261e6844724394d618912403cd0217401741)

9 years agolibads: ensure the right ccache is used during spnego bind
Stefan Metzmacher [Wed, 6 Jul 2016 10:44:11 +0000 (12:44 +0200)] 
libads: ensure the right ccache is used during spnego bind

When doing spnego sasl bind:
1. Try working without kinit only if a password is not
   provided
2. When using kinit, ensure the KRB5CCNAME env var is set
   to a private memory ccache, so that the bind is on behalf
   of the requested user.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 12 03:23:33 CEST 2016 on sn-devel-144

(cherry picked from commit a1743de74f09d5bf695f077f5127d02352a014e2)

9 years agolibads: ensure the right ccache is used during gssapi bind
Stefan Metzmacher [Wed, 6 Jul 2016 10:48:11 +0000 (12:48 +0200)] 
libads: ensure the right ccache is used during gssapi bind

When doing gssapi sasl bind:
1. Try working without kinit only if a password is not
   provided
2. When using kinit, ensure the KRB5CCNAME env var is set
   to a private memory ccache, so that the bind is on behalf
   of the requested user.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 2672968851966e5c01e4fc4d906b45b5c047e655)

9 years agoauth: fix a memory leak in gssapi_get_session_key()
Uri Simchoni [Sun, 3 Jul 2016 19:50:22 +0000 (22:50 +0300)] 
auth: fix a memory leak in gssapi_get_session_key()

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Wed Jul  6 00:40:15 CEST 2016 on sn-devel-144

(cherry picked from commit 77f3730295735dc9465c8e3d07fc761c83761b6e)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Fri Jul  8 14:11:21 CEST 2016 on sn-devel-104

9 years agos3-libads: fix a memory leak in ads_sasl_spnego_bind()
Uri Simchoni [Sun, 3 Jul 2016 19:51:56 +0000 (22:51 +0300)] 
s3-libads: fix a memory leak in ads_sasl_spnego_bind()

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit a646d9e796902dcb5246eb585433d4859796be2f)

9 years agoVERSION: Bump version up to 4.3.12...
Stefan Metzmacher [Thu, 7 Jul 2016 14:49:23 +0000 (16:49 +0200)] 
VERSION: Bump version up to 4.3.12...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(v4-3-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-3-test): Fri Jul  8 10:51:50 CEST 2016 on sn-devel-104

9 years agoMerge tag 'samba-4.3.11' into v4-3-test
Karolin Seeger [Thu, 7 Jul 2016 09:23:17 +0000 (11:23 +0200)] 
Merge tag 'samba-4.3.11' into v4-3-test

samba: tag release samba-4.3.11

9 years agoVERSION: Disable git snapshots for the 4.3.11 release. samba-4.3.11
Karolin Seeger [Tue, 5 Jul 2016 10:36:33 +0000 (12:36 +0200)] 
VERSION: Disable git snapshots for the 4.3.11 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
9 years agoWHATSNEW: Add release notes for Samba 4.3.11.
Karolin Seeger [Tue, 5 Jul 2016 10:34:21 +0000 (12:34 +0200)] 
WHATSNEW: Add release notes for Samba 4.3.11.

CVE-2016-2119: Client side SMB2 signing downgrade
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860

Signed-off-by: Karolin Seeger <kseeger@samba.org>
9 years agoCVE-2016-2019: s3:selftest: add regression tests for guest logins and mandatory signing
Stefan Metzmacher [Thu, 28 Apr 2016 00:24:52 +0000 (02:24 +0200)] 
CVE-2016-2019: s3:selftest: add regression tests for guest logins and mandatory signing

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agoCVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with manda...
Stefan Metzmacher [Thu, 28 Apr 2016 00:36:35 +0000 (02:36 +0200)] 
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agoCVE-2016-2019: libcli/smb: don't allow guest sessions if we require signing
Stefan Metzmacher [Wed, 20 Apr 2016 09:26:57 +0000 (11:26 +0200)] 
CVE-2016-2019: libcli/smb: don't allow guest sessions if we require signing

Note real anonymous sessions (with "" as username) don't hit this
as we don't even call smb2cli_session_set_session_key() in that case.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agodcerpc.idl: remove unused DCERPC_NCACN_PAYLOAD_MAX_SIZE
Stefan Metzmacher [Wed, 22 Jun 2016 18:38:01 +0000 (20:38 +0200)] 
dcerpc.idl: remove unused DCERPC_NCACN_PAYLOAD_MAX_SIZE

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit d9e242e9035c15e49b041afc61e5a4a08877f289)

9 years agos4:rpc_server: use a variable for the max total reassembled request payload
Stefan Metzmacher [Wed, 22 Jun 2016 15:18:28 +0000 (17:18 +0200)] 
s4:rpc_server: use a variable for the max total reassembled request payload

We still use the same limit of 4 MByte (DCERPC_NCACN_REQUEST_DEFAULT_MAX_SIZE)
by default.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 23 04:51:16 CEST 2016 on sn-devel-144

(cherry picked from commit 3f36d31c848496bf509db573e4c12821905b448d)

9 years agos4:librpc/rpc: allow a total reassembled response payload of 240 MBytes
Stefan Metzmacher [Wed, 22 Jun 2016 15:18:28 +0000 (17:18 +0200)] 
s4:librpc/rpc: allow a total reassembled response payload of 240 MBytes

This will replace DCERPC_NCACN_PAYLOAD_MAX_SIZE (4 MByte),
The limit of DCERPC_NCACN_PAYLOAD_MAX_SIZE (4 MByte) was too
strict for some workloads, e.g. DRSUAPI replication with large objects.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 7413e73c5331b760dc84b3843059230ec5fcfc7b)

9 years agodcerpc.idl: add DCERPC_NCACN_{REQUEST,RESPONSE}_DEFAULT_MAX_SIZE
Stefan Metzmacher [Wed, 22 Jun 2016 14:58:03 +0000 (16:58 +0200)] 
dcerpc.idl: add DCERPC_NCACN_{REQUEST,RESPONSE}_DEFAULT_MAX_SIZE

This will replace DCERPC_NCACN_PAYLOAD_MAX_SIZE (4 MByte),
this limit is too strict for some workloads, e.g. DRSUAPI replication
with large objects.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 281e11b53f676647997fb9ce21227782529a62ad)

9 years agoVERSION: Bump version up to 4.3.11...
Karolin Seeger [Tue, 14 Jun 2016 07:34:22 +0000 (09:34 +0200)] 
VERSION: Bump version up to 4.3.11...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
(cherry picked from commit 55785c95e7f74fb81fc95b435377a7879743dc37)

9 years agos3-winbind: Fix memory leak with each cached credential login
Andreas Schneider [Wed, 29 Jun 2016 11:38:19 +0000 (13:38 +0200)] 
s3-winbind: Fix memory leak with each cached credential login

When we allow offline logon and have a lot of logins, windbind will leak
4k of memory which each log in. On systems with heavy load this can grow
quickly and the OOM killer will kill Winbind.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 29 19:03:53 CEST 2016 on sn-devel-144

(cherry picked from commit 826f61960ec74deedc9d556a3b8fe04d9178dcd8)

9 years agobuild: Enable NTVFS file server to be omitted
Andrew Bartlett [Fri, 9 Oct 2015 20:30:17 +0000 (09:30 +1300)] 
build: Enable NTVFS file server to be omitted

We now only build it by default with --enable-sefltest, or otherwise
if requested.

The NTVFS file server still has features not present in the smbd file
server, such as a CIFS/SMB proxy, and a radically different design,
but it is also not undergoing any ongoing development so this keeps it
in a safe state for care and maintaince, with less of a security risk
if such an issue were to come up.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 71dcc76b70d8e249624f9bf057fc4fd3a44125e1)

9 years agobuild: Build less of Samba when building --without-ntvfs-fileserver
Andrew Bartlett [Tue, 10 May 2016 17:33:17 +0000 (05:33 +1200)] 
build: Build less of Samba when building --without-ntvfs-fileserver

We would build, but not use, many components of the NTVFS file server
even when we asked not to.  They would then consume disk, but not be
of any use

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit 0b4c741b9c03d147ee5f56d027bacda75c1b5282)

9 years agolibutil: Support systemd 230
Andreas Schneider [Wed, 22 Jun 2016 09:13:15 +0000 (11:13 +0200)] 
libutil: Support systemd 230

systemd 230 version finally deprecated
libsystemd-daemon/libsystemd-journal split and put everything in
libsystemd library.

Make sure HAVE_LIBSYSTEMD define is supported in the code (we already
have it defined by the waf).

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Mon Jun 27 00:01:55 CEST 2016 on sn-devel-144

(cherry picked from commit 8813faffe3ce4b598b626afea4bf90405c8129d8)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Tue Jun 28 19:35:32 CEST 2016 on sn-devel-104

9 years agos4/torture: add a test for dosmode and hidden files
Ralph Boehme [Thu, 23 Jun 2016 17:13:05 +0000 (19:13 +0200)] 
s4/torture: add a test for dosmode and hidden files

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 2db5c10ac59d5362e81c50d9a854071477de9c12)

9 years agos3/smbd: only use stored dos attributes for open_match_attributes() check
Ralph Boehme [Thu, 23 Jun 2016 10:24:33 +0000 (12:24 +0200)] 
s3/smbd: only use stored dos attributes for open_match_attributes() check

This changes the way we check for old vs new DOS attributes on open with
overwrite: only check against the DOS attributes actually set by a
client and stored in the DOS attributes xattr.

With this change "hide dot files" and "hide files" continue to work with
"store dos attributes = yes".

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 36b7cff3188bbc21048c12ec971d9c2ac3666226)

9 years agos3/smbd: make get_ea_dos_attribute() public
Ralph Boehme [Mon, 27 Jun 2016 09:39:47 +0000 (11:39 +0200)] 
s3/smbd: make get_ea_dos_attribute() public

Needed in a subsequent commit to read the stored dosmode for a file.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
9 years agos3/smbd: move check for "hide files" to dos_mode_from_name()
Ralph Boehme [Thu, 23 Jun 2016 15:14:55 +0000 (17:14 +0200)] 
s3/smbd: move check for "hide files" to dos_mode_from_name()

Consolidate the "hide dot files" and "hide files" handling stuff in one
function. No change in overall behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f2a53efb1aab0986d6a7d9621b1efff2127df4e6)

9 years agos3/smbd: call dos_mode_from_name after get_ea_dos_attribute()
Ralph Boehme [Thu, 23 Jun 2016 14:40:15 +0000 (16:40 +0200)] 
s3/smbd: call dos_mode_from_name after get_ea_dos_attribute()

This doesn't change overall behaviour in any way, it just prepares for
the next step where the IS_HIDDEN_PATH() stuff will be moved to the
function dos_mode_from_name().

It allows an optimisation by not checking "hide to files" patch if
FILE_ATTRIBUTE_HIDDEN was already set in the DOS xattr.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(backported from commit 1be877038c53c88802bc19c00a49c1974f17c4eb)

9 years agos3/smbd: add helper func dos_mode_from_name()
Ralph Boehme [Thu, 23 Jun 2016 10:23:33 +0000 (12:23 +0200)] 
s3/smbd: add helper func dos_mode_from_name()

This just moves the computation of "hide dot files" files to a helper
functions without changing overall behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit c8c67c9a2a6347e36f4628e2d0260bd6c58d8c65)

9 years agodcerpc.idl: remove unused DCERPC_NCACN_PAYLOAD_MAX_SIZE
Stefan Metzmacher [Wed, 22 Jun 2016 18:38:01 +0000 (20:38 +0200)] 
dcerpc.idl: remove unused DCERPC_NCACN_PAYLOAD_MAX_SIZE

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit d9e242e9035c15e49b041afc61e5a4a08877f289)

9 years agos4:rpc_server: use a variable for the max total reassembled request payload
Stefan Metzmacher [Wed, 22 Jun 2016 15:18:28 +0000 (17:18 +0200)] 
s4:rpc_server: use a variable for the max total reassembled request payload

We still use the same limit of 4 MByte (DCERPC_NCACN_REQUEST_DEFAULT_MAX_SIZE)
by default.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 23 04:51:16 CEST 2016 on sn-devel-144

(cherry picked from commit 3f36d31c848496bf509db573e4c12821905b448d)

9 years agos4:librpc/rpc: allow a total reassembled response payload of 240 MBytes
Stefan Metzmacher [Wed, 22 Jun 2016 15:18:28 +0000 (17:18 +0200)] 
s4:librpc/rpc: allow a total reassembled response payload of 240 MBytes

This will replace DCERPC_NCACN_PAYLOAD_MAX_SIZE (4 MByte),
The limit of DCERPC_NCACN_PAYLOAD_MAX_SIZE (4 MByte) was too
strict for some workloads, e.g. DRSUAPI replication with large objects.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 7413e73c5331b760dc84b3843059230ec5fcfc7b)

9 years agodcerpc.idl: add DCERPC_NCACN_{REQUEST,RESPONSE}_DEFAULT_MAX_SIZE
Stefan Metzmacher [Wed, 22 Jun 2016 14:58:03 +0000 (16:58 +0200)] 
dcerpc.idl: add DCERPC_NCACN_{REQUEST,RESPONSE}_DEFAULT_MAX_SIZE

This will replace DCERPC_NCACN_PAYLOAD_MAX_SIZE (4 MByte),
this limit is too strict for some workloads, e.g. DRSUAPI replication
with large objects.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 281e11b53f676647997fb9ce21227782529a62ad)

9 years agopython/tests: add auth_pad test for the dcerpc raw_protocol test
Stefan Metzmacher [Thu, 23 Jun 2016 10:06:40 +0000 (12:06 +0200)] 
python/tests: add auth_pad test for the dcerpc raw_protocol test

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 24 18:08:44 CEST 2016 on sn-devel-144

(cherry picked from commit c49f9abb19adca999d0b1d897d00d91f0ad91bbd)

9 years agos4:rpc_server: generate the correct error when we got an invalid auth_pad_length...
Stefan Metzmacher [Thu, 23 Jun 2016 11:50:39 +0000 (13:50 +0200)] 
s4:rpc_server: generate the correct error when we got an invalid auth_pad_length on BIND,ALTER,AUTH3

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 7d8edcc24148658e92729b3d155e432994e27525)

9 years agolibrpc/rpc: ignore invalid auth_pad_length values in BIND, ALTER and AUTH3 pdus
Stefan Metzmacher [Mon, 20 Jun 2016 14:26:56 +0000 (16:26 +0200)] 
librpc/rpc: ignore invalid auth_pad_length values in BIND, ALTER and AUTH3 pdus

This is a workarround for a bug in old Samba releases.
For BIND_ACK <= 3.5.x and for ALTER_RESP <= 4.2.x (see bug #11061).

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit aef032302863e5f3a888dbf4c52b21d561a0dff4)

9 years agolibrpc/rpc: let dcerpc_pull_auth_trailer() check that auth_pad_length fits within...
Stefan Metzmacher [Mon, 20 Jun 2016 14:25:12 +0000 (16:25 +0200)] 
librpc/rpc: let dcerpc_pull_auth_trailer() check that auth_pad_length fits within the whole pdu.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 3f7e3ed8a276f16aaed87c1f3cd5b9781aa7e1af)

9 years agolibrpc/rpc: let dcerpc_pull_auth_trailer() only accept auth_length!=NULL or auth_data...
Stefan Metzmacher [Mon, 20 Jun 2016 14:17:45 +0000 (16:17 +0200)] 
librpc/rpc: let dcerpc_pull_auth_trailer() only accept auth_length!=NULL or auth_data_only=true

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit f386e81b982cd551313eb9c0f7d2f70d65515d80)

9 years agos4:librpc/rpc: don't ask for auth_length if we ask for auth data only
Stefan Metzmacher [Mon, 20 Jun 2016 14:16:23 +0000 (16:16 +0200)] 
s4:librpc/rpc: don't ask for auth_length if we ask for auth data only

dcerpc_pull_auth_trailer() handles auth_length=NULL just fine.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit e05c732c6074df2524403ad7bb30eade91443525)

9 years agos4:rpc_server: parse auth data only for BIND,ALTER_REQ,AUTH3
Stefan Metzmacher [Mon, 20 Jun 2016 14:11:37 +0000 (16:11 +0200)] 
s4:rpc_server: parse auth data only for BIND,ALTER_REQ,AUTH3

We should tell dcerpc_pull_auth_trailer() that we only want
auth data.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 505a4e68d96e6fb3d8c7493632ecb4b0fc6caa9d)

9 years agos3: libsmb: Correctly trim a trailing \\ character in cli_smb2_create_fnum_send(...
Jeremy Allison [Tue, 21 Jun 2016 22:49:27 +0000 (15:49 -0700)] 
s3: libsmb: Correctly trim a trailing \\ character in cli_smb2_create_fnum_send() when passing a pathname to SMB2 create.

We already trim any leading \\ characters in this function, so this is the simplest place
to clean the pathname.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Jun 22 10:33:29 CEST 2016 on sn-devel-144

(cherry picked from commit c0704d99ce43a5497a29bfc53331159e4f978441)

9 years agos4/dns_server: disable signing of DNS-TKEY responses
Stefan Metzmacher [Wed, 11 May 2016 15:53:36 +0000 (17:53 +0200)] 
s4/dns_server: disable signing of DNS-TKEY responses

DNS packet signing is broken in 4.3 and older. Fixes are available in
master and 4.4. Backporting the complete patchset turned out to be too
difficult, so we use this hack to get authenticated DDNS updates working
again.

By simply NOT signing out DNS-TKEY response, the client won't get a
broken DNS-TSIG record which caused the client to not start the
authenticated DDNS update.

DNS RFCs do require signing TKEY responses, but luckily real world
clients are forgiving and accept unsigned TKEY responses. This was
tested with Windows 7.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Thu Jun 23 15:35:39 CEST 2016 on sn-devel-104

9 years agos3: docs: Fix "strict rename" doc to match code.
Jeremy Allison [Tue, 24 Nov 2015 16:45:50 +0000 (08:45 -0800)] 
s3: docs: Fix "strict rename" doc to match code.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 24 23:47:19 CET 2015 on sn-devel-104

(cherry picked from commit 2b0df3788aaadcf907de15a6b6a518244c59aa81)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Wed Jun 22 16:34:25 CEST 2016 on sn-devel-104

9 years agos3: smbd: Change semantics of strict rename to search the file open db.
Jeremy Allison [Tue, 24 Nov 2015 16:43:14 +0000 (08:43 -0800)] 
s3: smbd: Change semantics of strict rename to search the file open db.

Without strict rename just look in local process. POSIX renames are
already dealt with above.

Documentation change to follow.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 16f202871ca850bec87e0ec243644b2c20266c44)

9 years agolibnet: ignore realm setting for domain security joins to AD domains if 'winbind...
Michael Adam [Wed, 15 Jun 2016 21:03:32 +0000 (23:03 +0200)] 
libnet: ignore realm setting for domain security joins to AD domains if 'winbind rpc only = true'

Inspired by initial patch from Matt Rogers @ RedHat.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Jun 22 05:05:47 CEST 2016 on sn-devel-144

(cherry picked from commit e29d8f108cd090706dc3f54282f5c33ec30df899)

9 years agos3-libnet: Print error string even on successfuly completion of libnetjoin.
Günther Deschner [Wed, 15 Jun 2016 14:04:29 +0000 (16:04 +0200)] 
s3-libnet: Print error string even on successfuly completion of libnetjoin.

Sometimes useful information should be printed to the users.

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 632faa87610b3afca3f8d3e9f3f46ee6b87f362a)

9 years agos4: torture: Added raw readX test to ensure 'reserved' fields are zero.
Jeremy Allison [Fri, 10 Jun 2016 16:32:32 +0000 (09:32 -0700)] 
s4: torture: Added raw readX test to ensure 'reserved' fields are zero.

Passes against Win2k12+, and smbd with the previous patch.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Sat Jun 18 19:32:22 CEST 2016 on sn-devel-144

(cherry picked from commit 747de99fcd70f400ec0ca6b2ca020664f7464454)

9 years agos3: smbd: In reply_read_and_X() SMB1 server is overwriting part of the 'reserved...
Jeremy Allison [Mon, 13 Jun 2016 16:30:25 +0000 (09:30 -0700)] 
s3: smbd: In reply_read_and_X() SMB1 server is overwriting part of the 'reserved' zero fields with reply data length.

This occurred due to old code that used to do:

SSVAL(smb_buf(req->outbuf),-2,nread);

to set the reply length. This code was not needed,
as srv_set_message() was already correctly setting
the bcc length and was probably left from much
earlier legacy code.

However, in commit ddaa65ef6e049a185281c4d5deca4045e3b085e2
this was converted to do:

SSVAL(req->outbuf,smb_vwv11,smb_maxcnt);

This code actually overwrites the last 'reserved'
field in the SMB_COM_READ_ANDX packet reply, but we
never noticed as no client (or server code) looks at or
checks vwv11 in a SMB_COM_READ_ANDX reply.

[MS-SMB] shows for SMB_COM_READ_ANDX reply:

SMB_Parameters
{
        UCHAR WordCount;
        Words
        {
                UCHAR AndXCommand;
                UCHAR AndXReserved;
                USHORT AndXOffset;
                USHORT Available;
                USHORT DataCompactionMode;
                USHORT Reserved1;
                USHORT DataLength;
                USHORT DataOffset;
                USHORT DataLengthHigh;
                USHORT Reserved2[4];
        }
}
SMB_Data
{
        USHORT ByteCount;
        Bytes
        {
                UCHAR Pad[] (optional);
                UCHAR Data[variable];
        }

and indeed checking wireshark from Win2012R2
we find that smbd is writing the returned
read length into smb_vwv11 and Windows leaves
it as zeros (reserved).

Also fix the same problem in the named pipes code.

Torture test to ensure Reserved2[4] replies
are zero to follow.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit e57f9e15d08ed46b2fac2562d1027c6a2ba80dac)

9 years agos3: smbd: Use common function setup_readX_header() in aio read code.
Jeremy Allison [Mon, 13 Jun 2016 16:25:02 +0000 (09:25 -0700)] 
s3: smbd: Use common function setup_readX_header() in aio read code.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 6507336d6646b7709768c19a03eac61ea30cce31)

9 years agos3: smbd: Make setup_readX_header() externally accessible
Jeremy Allison [Mon, 13 Jun 2016 16:22:56 +0000 (09:22 -0700)] 
s3: smbd: Make setup_readX_header() externally accessible

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 2ff3171fba931e621581336c975bae146a2ea3a9)

9 years agos3: smbd: Remove unused 'req' argument from setup_readX_header()
Jeremy Allison [Mon, 13 Jun 2016 16:20:43 +0000 (09:20 -0700)] 
s3: smbd: Remove unused 'req' argument from setup_readX_header()

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 1e29a1ce067e5f5b5159bcd20d37c6945bcc3900)

9 years agolibnet: make Kerberos domain join site-aware
Uri Simchoni [Thu, 3 Mar 2016 07:18:58 +0000 (09:18 +0200)] 
libnet: make Kerberos domain join site-aware

When joining a domain using Kerberos authentication, create a
configuration file for the Kerberos libs to prefer on-site
domain controllers, without relying on the winbindd Kerberos
locator, which many not be operational at this stage.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar  8 01:30:35 CET 2016 on sn-devel-144

(cherry picked from commit 0dbab0e33e9efc46f72b6a8b0dc894ea251df9aa)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Mon Jun 20 13:20:34 CEST 2016 on sn-devel-104

9 years agodsgetdcname: fix flag check
Uri Simchoni [Thu, 3 Mar 2016 07:18:57 +0000 (09:18 +0200)] 
dsgetdcname: fix flag check

Fix the check for zero requseted flags.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 6d717402e42131298ba670ee47686379854ec56d)

9 years agodsgetdcname: return an IP address on rediscovery
Uri Simchoni [Thu, 3 Mar 2016 07:18:44 +0000 (09:18 +0200)] 
dsgetdcname: return an IP address on rediscovery

When dsgetdcname return its result based on discovery
process (instead of retrieving cached value), always
return the found server's IP address in dc_address field,
rather than its netbios name.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ef84f4c018424b1fcc232a4780dc2c0435701d86)

9 years agos3: krb5: keytab - The done label can be jumped to with context == NULL.
Jeremy Allison [Wed, 8 Jun 2016 21:50:59 +0000 (14:50 -0700)] 
s3: krb5: keytab - The done label can be jumped to with context == NULL.

Ensure we don't crash in this case.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Jun  9 13:18:56 CEST 2016 on sn-devel-144

(cherry picked from commit e46cb9b835eb8f2bd998def82baf6f07fda9fe5c)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Wed Jun 15 15:05:50 CEST 2016 on sn-devel-104

9 years agolib: Fix uninitialized read in msghdr_copy
Jeremy Allison [Wed, 8 Jun 2016 12:34:20 +0000 (14:34 +0200)] 
lib: Fix uninitialized read in msghdr_copy

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11955

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jun  8 18:34:27 CEST 2016 on sn-devel-144

(cherry picked from commit 0e2711b2a0adeda6873f9c8161b9b01a56ae7098)

9 years agoVERSION: Bump version up to 4.3.11...
Karolin Seeger [Tue, 14 Jun 2016 07:34:22 +0000 (09:34 +0200)] 
VERSION: Bump version up to 4.3.11...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
9 years agoVERSION: Disable git snapshots for the 4.3.10 release. samba-4.3.10
Karolin Seeger [Tue, 14 Jun 2016 07:33:27 +0000 (09:33 +0200)] 
VERSION: Disable git snapshots for the 4.3.10 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
9 years agoWHATSNEW: Add release notes for Samba 4.3.10.
Karolin Seeger [Tue, 14 Jun 2016 07:32:44 +0000 (09:32 +0200)] 
WHATSNEW: Add release notes for Samba 4.3.10.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
9 years agolib: replace: snprintf - Fix length calculation for hex/octal 64-bit values.
Lorinczy Zsigmond [Thu, 2 Jun 2016 21:54:05 +0000 (14:54 -0700)] 
lib: replace: snprintf - Fix length calculation for hex/octal 64-bit values.

Prevents truncation due to buffer size being too small.

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

Signed-off-by: Lorinczy Zsigmond <lzsiga@freemail.c3.hu>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun  3 03:48:58 CEST 2016 on sn-devel-144

(cherry picked from commit 8814b2556583e1f8965e8bf5a93438d46e8d43e6)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Thu Jun  9 16:30:22 CEST 2016 on sn-devel-104

9 years agosamba-too: Allow 'samba-tool fsmo' to cope with empty or missing fsmo roles
Rowland Penny [Thu, 31 Mar 2016 11:07:00 +0000 (12:07 +0100)] 
samba-too: Allow 'samba-tool fsmo' to cope with empty or missing fsmo roles

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

Signed-off-by: Rowland Penny <rpenny@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 7583377473ecd3d096c4f924e61a04a84be32a96)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Thu Jun  2 15:50:53 CEST 2016 on sn-devel-104

9 years agos3:client:smbspool_krb5_wrapper: fix the non clearenv build.
Günther Deschner [Fri, 29 Apr 2016 11:28:42 +0000 (13:28 +0200)] 
s3:client:smbspool_krb5_wrapper: fix the non clearenv build.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Apr 29 19:52:23 CEST 2016 on sn-devel-144

(cherry picked from commit e0d8c6b6b428819206fb6e96c47e952845af0874)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Wed Jun  1 15:01:03 CEST 2016 on sn-devel-104

9 years agoProvide fallback code for non-portable clearenv(3)
Jérémie Courrèges-Anglas [Wed, 27 Apr 2016 16:01:51 +0000 (18:01 +0200)] 
Provide fallback code for non-portable clearenv(3)

clearenv(3) is a GNU extension that was rejected twice by POSIX,
without an easy, portable alternative.

As the dovecot project notes,
"""
environ = NULL crashes on OSX - and OpenBSD < 6.0
*environ = NULL doesn't work on FreeBSD 7.0
environ = emptyenv doesn't work on Haiku OS
environ = calloc should work everywhere
"""
(source: http://hg.dovecot.org/dovecot-2.0/file/48f90e7e92dc/src/lib/env-util.c)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11864
Signed-off-by: Jérémie Courrèges-Anglas <jca@wxcvbn.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr 29 00:12:02 CEST 2016 on sn-devel-144

(cherry picked from commit f198abcbb3f6e8b26c697d3ded2caa1076ae018b)

9 years agos3:selftest add a test for rpcclient --pw-nt-hash option
Christian Ambach [Wed, 11 May 2016 17:21:20 +0000 (19:21 +0200)] 
s3:selftest add a test for rpcclient --pw-nt-hash option

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit d0cdf02dc9733dae960021ff1ca07587d8155e58)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Tue May 31 16:34:38 CEST 2016 on sn-devel-104

9 years agos3:rpcclient make --pw-nt-hash option work
Christian Ambach [Wed, 11 May 2016 15:41:24 +0000 (17:41 +0200)] 
s3:rpcclient make --pw-nt-hash option work

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

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 4fe59879cc2a608194578e33e27e0dc1e2f0fc58)

9 years agos3-smbd: Support systemd 230
Alexander Bokovoy [Wed, 25 May 2016 12:41:52 +0000 (15:41 +0300)] 
s3-smbd: Support systemd 230

systemd 230 version finally deprecated libsystemd-daemon/libsystemd-journal split
and put everything in libsystemd library.

Make sure HAVE_LIBSYSTEMD define is supported in the code (we already
have it defined by the waf).

Patch is based on the code proposed by Zbigniew Jędrzejewski-Szmek
from systemd project.

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

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 25 20:25:44 CEST 2016 on sn-devel-144

(cherry picked from commit 92b4b6b3c58e6c8bc39e5693ad30ba6f8442ca99)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Tue May 31 12:21:40 CEST 2016 on sn-devel-104

9 years agos3-smbspool: Log to stderr
Andreas Schneider [Wed, 25 May 2016 11:39:29 +0000 (13:39 +0200)] 
s3-smbspool: Log to stderr

This way we will be able to see the log in the cups logs and are able to
debug issues.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit e59e0a5481196b1ddda0393306c514b8c32d6ea0)

9 years agoFix memory leak in share mode locking.
Hemanth Thummala [Wed, 25 May 2016 06:15:04 +0000 (23:15 -0700)] 
Fix memory leak in share mode locking.

Not freeing up(and reparenting to NULL context) ndr buffer
used for TDB updates resulting in huge memory leak when there
in high volume of opens and closes happening on same object.

Free the buffer before reparenting its parent to NULL context.

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

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Signed-off-by: Saji VR <saji.vr@nutanix.com>
Reviewed-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 May 27 18:43:31 CEST 2016 on sn-devel-144

(cherry picked from commit 7a725eea25f905fc5f611e8f3d7cfe414d5cf913)