1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-15 02:50:27 +03:00

102549 Commits

Author SHA1 Message Date
Ralph Boehme
5bf53f0f2e 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

(cherry picked from commit 6efd0af5e8d8ee81b5f53afb126d87950088b7cd)
2016-08-04 11:10:20 +02:00
Ralph Boehme
234dec5249 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>
(cherry picked from commit bb90a8484a734b76ddd4d270f31fcdb4ae6cc48d)
2016-08-04 11:10:20 +02:00
Ralph Boehme
7f7e9d737d smbd/cleanupd: 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>
(cherry picked from commit 3a0c16b08c7dcfe389fbc429aae734ff52c84166)
2016-08-04 11:10:19 +02:00
Ralph Boehme
965e6ed51a 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)
2016-08-04 11:10:19 +02:00
Ralph Boehme
036a6bd2bb 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)
2016-08-04 11:10:19 +02:00
Ralph Boehme
d5af3f3b65 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)
2016-08-04 11:10:19 +02:00
Ralph Boehme
01632a8ffc 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)
2016-08-04 11:10:19 +02:00
Ralph Boehme
5437525a1b 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)
2016-08-04 11:10:19 +02:00
Jeremy Allison
34f5dc791a 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>

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Tue Aug  2 16:25:32 CEST 2016 on sn-devel-144
2016-08-02 16:25:32 +02:00
Jeremy Allison
250a064439 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>
2016-08-02 12:46:24 +02:00
Stefan Metzmacher
2a71f2e42d python/remove_dc: handle dnsNode objects without dnsRecord attribute
If we have dnsNode objects without dnsRecord attribute values we trigger
the following error triggered by 'samba-tool domain demote --remove-other-dead-server=server2'

  ERROR(<type 'exceptions.TypeError'>): uncaught exception - __ndr_unpack__()
  argument 1 must be string or read-only buffer, not dnsp.DnssrvRpcRecord
    File "/usr/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 175,
  in _run
      return self.run(*args, **kwargs)
    File "/usr/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 720, in
  run
      remove_dc.remove_dc(samdb, logger, remove_other_dead_server)
    File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 423, in
  remove_dc
      remove_dns_account=True)
    File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 351, in
  offline_remove_ntds_dc
      remove_dns_account=remove_dns_account)
    File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 266, in
  offline_remove_server
      remove_dns_references(samdb, logger, dnsHostName)
    File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 186, in
  remove_dns_references
      for v in values if not to_remove(v) ]
    File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 160, in
  to_remove
      dnsRecord = ndr_unpack(dnsp.DnssrvRpcRecord, value)
    File "/usr/lib64/python2.6/site-packages/samba/ndr.py", line 45, in ndr_unpack
      object.__ndr_unpack__(data, allow_remaining=allow_remaining)
  A transaction is still active in ldb context [0xe1f320] on
  tdb:///var/lib/samba/private/sam.ldb

"next" is used in perl not in python!

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

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): Wed Jul 13 10:10:30 CEST 2016 on sn-devel-144

(cherry picked from commit f8181360a89ac9e53cc991e966958e496271fa15)
2016-08-02 12:46:24 +02:00
Jeremy Allison
bba6aa0496 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)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
ea0770f049 third_party/zlib/zlib.h: use HAVE___ATTRIBUTE__ instead of __GNUC__
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Mar 24 18:43:34 CET 2016 on sn-devel-144

(cherry picked from commit d64877541036c6b82aa0204671bfdae08936b529)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
ceb8542485 s4/lib/wmi_wrap: use HAVE___ATTRIBUTE__ instead of __GNUC__
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 82258aa2a6ff1a8d139f60abb170aaffb0934025)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
3d62a68e05 mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of __GNUC__
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 7b92b84415dd3292538eb4e44fac12b4e564b984)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
8c473033c9 s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of __GNUC__
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit fb0ebbfcbfb5754b0fca7b309eaded0e57877230)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
fc4863a9d9 tevent.h: use HAVE___ATTRIBUTE__ instead of __GNUC__
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit a20ee62984bdb623f8fa55a9900cb69a99bf38e6)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
e8e6d4b157 libreplace: use HAVE___ATTRIBUTE__ instead of __GNUC__
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 6ba2fe2e3f1ad27b12f4ef67f41c7ad4f29f17c3)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
7ae14463b3 util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons
The comparisons that look like

    #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )

fail if __GNUC_MINOR__ is 0.  The intended comparison is something
more like

    #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)

However, given that:

 * these checks are really trying to test the presence of
   __attribute__,

 * there are now credible compilers that are not GCC, which have
   __attribute__ but might not be good at emulating __GNUC__
   numbers, and

 * we really face little risk of running into GCC 2.95

 * we have a HAVE___ATTRIBUTE__ check in ./configure

let's not do the version comparisons.

(Untested on GCC 2.95, GCC 3.0 and GCC 3.1).

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 88be24c279e29a363c2aabcb68b5f0a1e039f477)
2016-08-02 12:46:24 +02:00
Douglas Bagnall
385c341604 configure: set HAVE___ATTRIBUTE__ for heimdal
Without this, heimdal ends up defining __attribute__ away, causing
gcc-6 compile errors with -Werror=return-type because it can't tell
when functions have __attribute__((noreturn)).

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

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>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar  9 13:52:26 CET 2016 on sn-devel-144

(cherry picked from commit 1c796547f20fa3c7c2e93fd5ce6ee8453a2bb435)
2016-08-02 12:46:24 +02:00
Andrew Bartlett
f8cfb888cc 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)
2016-08-02 12:46:24 +02:00
Andrew Bartlett
72430196d2 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)
2016-08-02 12:46:24 +02:00
Stefan Metzmacher
8cfac46fc8 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)
2016-08-02 12:46:24 +02:00
Stefan Metzmacher
98634bf110 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)
2016-08-02 12:46:23 +02:00
Uri Simchoni
b5aa461a00 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-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Fri Jul  8 12:59:29 CEST 2016 on sn-devel-144
2016-07-08 12:59:28 +02:00
Uri Simchoni
ebc1e9aba4 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)
2016-07-08 09:27:08 +02:00
Stefan Metzmacher
e93603f1a4 VERSION: Bump version up to 4.4.6...
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(v4-4-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-4-test): Fri Jul  8 07:34:51 CEST 2016 on sn-devel-144
2016-07-08 07:34:51 +02:00
Karolin Seeger
bc776bc4b4 samba: tag release samba-4.4.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iD8DBQBXe2K+bzORW2Vot+oRArKsAJ976uGql/ZeHOwTvqqOJXs2kIQNtQCfZawq
 aeAWTK4AFM3iOVK3gVhiUyk=
 =T7P8
 -----END PGP SIGNATURE-----

Merge tag 'samba-4.4.5' into v4-4-test

samba: tag release samba-4.4.5
2016-07-07 11:22:37 +02:00
Karolin Seeger
fb3e6296bb VERSION: Disable git snapshots for the 4.4.5 release.
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>
samba-4.4.5
2016-07-05 09:30:11 +02:00
Karolin Seeger
a1a715fb94 WHATSNEW: Add release notes for Samba 4.4.5.
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>
2016-07-05 09:30:11 +02:00
Stefan Metzmacher
f7e1a590cc 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>
2016-07-05 09:20:56 +02:00
Stefan Metzmacher
94295b7aa2 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>
2016-07-05 09:20:56 +02:00
Stefan Metzmacher
46b5e4aca6 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>
2016-07-05 09:20:55 +02:00
Stefan Metzmacher
a9a1ec7ad4 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)
2016-07-05 09:20:55 +02:00
Stefan Metzmacher
eb09411ca4 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)
2016-07-05 09:20:55 +02:00
Stefan Metzmacher
cba64f242d 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)
2016-07-05 09:20:55 +02:00
Stefan Metzmacher
203c0a5e4f 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)
2016-07-05 09:20:55 +02:00
Andreas Schneider
a2353bebe7 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)

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Mon Jul  4 13:04:53 CEST 2016 on sn-devel-144
2016-07-04 13:04:53 +02:00
Karolin Seeger
3eb32148bd VERSION: Bump version up to 4.4.5...
and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
(cherry picked from commit e9ea633d3c673432dc6ce21e1fddde59f88f3720)
2016-07-04 09:31:10 +02:00
Andreas Schneider
8bac275e33 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-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Tue Jun 28 16:54:43 CEST 2016 on sn-devel-144
2016-06-28 16:54:43 +02:00
Ralph Boehme
833bbdd351 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)
2016-06-28 13:11:21 +02:00
Ralph Boehme
efd6eaf2d0 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)
2016-06-28 13:11:21 +02:00
Ralph Boehme
7448b50a62 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>
2016-06-28 13:11:21 +02:00
Ralph Boehme
c8d3d3c323 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)
2016-06-28 13:11:21 +02:00
Ralph Boehme
3296ee715c 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)
2016-06-28 13:11:21 +02:00
Ralph Boehme
60587e823d 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)
2016-06-28 13:11:21 +02:00
Stefan Metzmacher
9e4b9e5bfb 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)
2016-06-28 13:11:21 +02:00
Stefan Metzmacher
1a0775e85f 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)
2016-06-28 13:11:21 +02:00
Stefan Metzmacher
81d7c8513c 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)
2016-06-28 13:11:21 +02:00
Stefan Metzmacher
2e69fda2e0 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)
2016-06-28 13:11:21 +02:00