[Pkg-samba-maint] [Git][samba-team/samba][upstream_4.8] 101 commits: VERSION: Bump version up to 4.8.3...

Mathieu Parent gitlab at salsa.debian.org
Sat Aug 18 00:48:20 BST 2018


Mathieu Parent pushed to branch upstream_4.8 at Debian Samba Team / samba


Commits:
cc678c4f by Karolin Seeger at 2018-05-16T10:06:21Z
VERSION: Bump version up to 4.8.3...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger at samba.org>

- - - - -
4bbc5a87 by Andreas Schneider at 2018-05-24T09:29:22Z
selftest: Make sure we have correct group mappings

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 9bc2b922bbc6539341a2056f33f117ac350e61f1)

- - - - -
ee22c6fb by Andreas Schneider at 2018-05-24T09:29:22Z
nsswitch: Add a test looking up the user using the upn

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 0d2f743d826b87b369e25fc6bb9ff61f2b0896aa)

- - - - -
a28d7c41 by Andreas Schneider at 2018-05-24T09:29:22Z
nsswitch: Add a test looking up domain sid

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 0aceca6a94e868f9c01a66f79624ca10d80560ab)

- - - - -
40a13413 by Andreas Schneider at 2018-05-24T09:29:22Z
nsswitch: Lookup the domain in tests with the wb seperator

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 4fa811ec7bc301e96f5e40ba281e8d4e8709b94f)

- - - - -
5c946ebf by Andreas Schneider at 2018-05-24T09:29:22Z
selftest: Add a user with a different userPrincipalName

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 5319cae00096dcecc29aa9fa675a983352ad64d8)

- - - - -
a52b0675 by Andreas Schneider at 2018-05-24T09:29:22Z
nsswitch:tests: Add test for wbinfo --user-info

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 2715f52f54e66a73131a92d752a8c2447da1fd33)

- - - - -
f1dfb9fe by Stefan Metzmacher at 2018-05-24T09:29:23Z
winbind: Pass upn unmodified to lookup names

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

Pair-Programmed-With: Andreas Schneider <asn at samba.org>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 789c89e6ecb7d388fb5acdd5abc8fe99c58524f0)

- - - - -
b5ba5da4 by Andreas Schneider at 2018-05-24T09:29:23Z
winbind: Remove unused function parse_domain_user_talloc()

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 32770e929ace8fe3f2469037ed887be14b3c5503)

- - - - -
124f0e4b by Andreas Schneider at 2018-05-24T09:29:23Z
winbind: Fix UPN handling in parse_domain_user()

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

Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit a05b63db627fdbe0bdea4d144dfaeedb39025592)

- - - - -
682a2e26 by Andreas Schneider at 2018-05-24T09:29:23Z
winbind: Fix UPN handling in canonicalize_username()

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>

Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Fri May 11 12:02:37 CEST 2018 on sn-devel-144

(cherry picked from commit 1766f77493c5a76e4d7d1e5eedcaa150cc9ea552)

- - - - -
6ea5d164 by Ralph Boehme at 2018-05-24T09:29:23Z
s4:torture/smb2: new test for interaction between chown and SD flags

This passes against Windows, but fails against Samba.

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

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

- - - - -
bcee5472 by Ralph Boehme at 2018-05-24T09:29:23Z
s3:smbd: fix interaction between chown and SD flags

A change ownership operation that doesn't set the NT ACLs must not touch
the SD flags (type).

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

Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>

Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri May 11 23:30:32 CEST 2018 on sn-devel-144

(cherry picked from commit ced55850034a3653525823bf9623912a4fcf18a0)

- - - - -
2fb77a2b by Volker Lendecke at 2018-05-24T14:37:02Z
libgpo: Fix the build --without-ads

Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>

Autobuild-User(master): David Disseldorp <ddiss at samba.org>
Autobuild-Date(master): Tue Feb  6 15:36:01 CET 2018 on sn-devel-144

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

(cherry picked from commit a222b7506b53e689708834237f18877231dca589)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Thu May 24 16:37:02 CEST 2018 on sn-devel-144

- - - - -
e153636f by Stefan Metzmacher at 2018-06-04T07:55:28Z
auth/ntlmssp: add ntlmssp_client:ldap_style_send_seal option

This will be used to similate a Windows client only
using NTLMSSP_NEGOTIATE_SIGN without NTLMSSP_NEGOTIATE_SEAL
on an LDAP connection, which is indicated internally by
GENSEC_FEATURE_LDAP_STYLE.

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

Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 7f2bebf09cd8056b3f901dd9ff1fc9e9525f3e9d)

- - - - -
7faa201d by Stefan Metzmacher at 2018-06-04T07:55:28Z
s4:selftest: run test_ldb_simple.sh with more auth options

This demonstrates the broken GENSEC_FEATURE_LDAP_STYLE
handling in our LDAP server.

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

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

- - - - -
9cb64598 by Stefan Metzmacher at 2018-06-04T07:55:28Z
auth/ntlmssp: fix handling of GENSEC_FEATURE_LDAP_STYLE as a server

This fixes "NTLMSSP NTLM2 packet check failed due to invalid signature!"
error messages, which were generated if the client only sends
NTLMSSP_NEGOTIATE_SIGN without NTLMSSP_NEGOTIATE_SEAL on an LDAP
connection.

This fixes a regession in the combination of commits
77adac8c3cd2f7419894d18db735782c9646a202 and
3a0b835408a6efa339e8b34333906bfe3aacd6e3.

We need to evaluate GENSEC_FEATURE_LDAP_STYLE at the end
of the authentication (as a server, while we already
do so at the beginning as a client).

As a reminder I introduced GENSEC_FEATURE_LDAP_STYLE
(as an internal flag) in order to let us work as a
Windows using NTLMSSP for LDAP. Even if only signing is
negotiated during the authentication the following PDUs
will still be encrypted if NTLMSSP is used. This is exactly the
same as if the client would have negotiated NTLMSSP_NEGOTIATE_SEAL.
I guess it's a bug in Windows, but we have to reimplement that
bug. Note this only applies to NTLMSSP and only to LDAP!
Signing only works fine for LDAP with Kerberos
or DCERPC and NTLMSSP.

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

Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Wed May 16 03:26:03 CEST 2018 on sn-devel-144

(cherry picked from commit c7a3ce95ac4ce837d8fde36578b3b1f56c3ac2fa)

- - - - -
9c794a21 by Andreas Schneider at 2018-06-04T07:55:29Z
s3:utils: Do not segfault on error in DoDNSUpdate()

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>

(cherry picked from commit cdd98aa1e2116fb97e16718d115ee883fe1bc8ba)

- - - - -
8f01d946 by Andrew Bartlett at 2018-06-04T07:55:29Z
s3-lib: Remove support for libexc for IRIX backtraces

IRIX is long dead, and this code needs become_root() which is not in
the top level code.

Additionally, the check for libexc never made it into waf, so this
has been dead code since Samba 4.1.

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
(cherry picked from commit 85dc9ee14023a8fb84b5c74555d43008bb6bb0c0)

- - - - -
d14cd61f by Andrew Bartlett at 2018-06-04T07:55:29Z
lib/util: Log PANIC before calling pacic action just like s3

This is like the changes made in s3 by
4fa555980070d78b39711ef21d77628d26055bc2

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
(cherry picked from commit 3acc00b6808d5d5ad035d9d43526204db1608c8a)

- - - - -
5733e906 by Andrew Bartlett at 2018-06-04T07:55:29Z
lib/util: Move log_stack_trace() to common code

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454
(cherry picked from commit bf9551902afdb32310db4a3381964c435dd08bf0)

- - - - -
68999b8e by Andrew Bartlett at 2018-06-04T12:30:55Z
lib/util: Call log_stack_trace() in smb_panic_default()

This matches the AD DC with the behaviour in smbd.

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13454

Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Apr 11 04:03:07 CEST 2018 on sn-devel-144

(cherry picked from commit 462eb4a44cc51dc17aebbcd5c609c9ff7f088554)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Mon Jun  4 14:30:55 CEST 2018 on sn-devel-144

- - - - -
2e5bc85b by Christof Schmitt at 2018-06-07T07:39:14Z
selftest: Add dfq_cache share with 'dfree cache time' set

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

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 7ffcbd5ce1222971cb9879f78765d87cdc4102a8)

- - - - -
88d19df4 by Christof Schmitt at 2018-06-07T07:39:14Z
selftest: Add test for 'dfree cache'

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

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit a55b3d2fcc2f7737a2702bf908dcf1f80969bf21)

- - - - -
3fd685e7 by Christof Schmitt at 2018-06-07T07:39:14Z
memcache: Add new cache type for dfree information

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

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit f5d05562679f6aa691b98b4a75952f7dda7ed343)

- - - - -
f7e53f86 by Christof Schmitt at 2018-06-07T07:39:14Z
smbd: Cache dfree information based on query path

Sub directories in a SMB share can have different free space information
(e.g. when a different file system is mounted there). Caching the dfree
information per SMB share will return invalid data. Address this by
switching to memcache and store the cached data based on the query path.

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

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 8f121747b06ca78cf51801a3931b2ddd1a424c77)

- - - - -
a7a51bd9 by Christof Schmitt at 2018-06-07T12:09:12Z
smbd: Flush dfree memcache on service reload

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

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit e30d0c0e0d11f65b2d1886be3c0fe9e32eaf3926)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Thu Jun  7 14:09:12 CEST 2018 on sn-devel-144

- - - - -
ce899317 by Jeremy Allison at 2018-06-20T07:22:23Z
s3: smbd: Fix SMB2-FLUSH against directories.

Directories opened with either FILE_ADD_FILE or
FILE_ADD_SUBDIRECTORY can be flushed even if
they're not writable in the conventional sense.

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

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

- - - - -
2839bf2e by Jeremy Allison at 2018-06-20T07:22:23Z
s3: smbtorture: Add new SMB2-DIR-FSYNC test to show behavior of FSYNC on directories.

Tests against a directory handle on the root of a share,
and a directory handle on a sub-directory in a share.

Check SEC_DIR_ADD_FILE and SEC_DIR_ADD_SUBDIR separately,
either allows flush to succeed.

Passes against Windows.

Regression test for:

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

Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>

Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri May 18 02:38:50 CEST 2018 on sn-devel-144

(cherry picked from commit d42f467a25e75e5487a00378609a24809ddc83ee)

- - - - -
c5f3606c by Günther Deschner at 2018-06-20T07:22:23Z
s4-heimdal: Fix the format-truncation errors.

../source4/heimdal/lib/com_err/compile_et.c: In function ‘generate_h’:
../source4/heimdal/lib/com_err/compile_et.c:138:33: error: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 126 [-Werror=format-truncation=]
     snprintf(fn, sizeof(fn), "__%s__", hfn);
                                 ^~     ~~~
../source4/heimdal/lib/com_err/compile_et.c:138:5: note: ‘snprintf’ output between 5 and 132 bytes into a destination of size 128
     snprintf(fn, sizeof(fn), "__%s__", hfn);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source4/heimdal/lib/com_err/compile_et.c: In function ‘main’:
../source4/heimdal/lib/com_err/compile_et.c:234:35: error: ‘.h’ directive output may be truncated writing 2 bytes into a region of size between 1 and 128 [-Werror=format-truncation=]
     snprintf(hfn, sizeof(hfn), "%s.h", Basename);
                                   ^~
../source4/heimdal/lib/com_err/compile_et.c:234:5: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 128
     snprintf(hfn, sizeof(hfn), "%s.h", Basename);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source4/heimdal/lib/com_err/compile_et.c:235:35: error: ‘.c’ directive output may be truncated writing 2 bytes into a region of size between 1 and 128 [-Werror=format-truncation=]
     snprintf(cfn, sizeof(cfn), "%s.c", Basename);
                                   ^~
../source4/heimdal/lib/com_err/compile_et.c:235:5: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 128
     snprintf(cfn, sizeof(cfn), "%s.c", Basename);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

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

Guenther

Signed-off-by: Günther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>

Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Fri Jun  8 13:23:51 CEST 2018 on sn-devel-144

- - - - -
c70a0d52 by Günther Deschner at 2018-06-20T07:22:23Z
s3-winbindd: use fill_domain_username_talloc() in winbind.

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

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 3c6481d75cea175d0a69988577163efb40e2316b)

- - - - -
35de20bd by Günther Deschner at 2018-06-20T07:22:24Z
s3-winbindd: remove unused fill_domain_username()

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

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit b24d4eb7afad82afc3a9bab65e1d799edc4b5172)

- - - - -
1b420a21 by Günther Deschner at 2018-06-20T07:22:24Z
s3-printing: fix format-truncation in print_queue_update()

../source3/printing/printing.c: In function ‘print_queue_update’:
../source3/printing/printing.c:1809:42: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 244 [-Werror=format-truncation=]
  snprintf(key, sizeof(key), "MSG_PENDING/%s", sharename);
                                          ^~   ~~~~~~~~~
../source3/printing/printing.c:1809:2: note: ‘snprintf’ output between 13 and 268 bytes into a destination of size 256
  snprintf(key, sizeof(key), "MSG_PENDING/%s", sharename);

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

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 6326b3415f3e225aafd5912d0965c80abcd7b22c)

- - - - -
23f19c83 by Günther Deschner at 2018-06-20T07:22:24Z
s4-torture: fix format-truncation warning in smb2 session tests.

../source4/torture/smb2/session.c: In function ‘test_session_reauth5’:
../source4/torture/smb2/session.c:645:36: error: ‘\file.dat’ directive output may be truncated writing 9 bytes into a region of size between 1 and 256 [-Werror=format-truncation=]
  snprintf(fname, sizeof(fname), "%s\\file.dat", dname);
                                    ^~~~~~~~~~
../source4/torture/smb2/session.c:645:2: note: ‘snprintf’ output between 10 and 265 bytes into a destination of size 256
  snprintf(fname, sizeof(fname), "%s\\file.dat", dname);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source4/torture/smb2/session.c:696:38: error: ‘\file2.dat’ directive output may be truncated writing 10 bytes into a region of size between 1 and 256 [-Werror=format-truncation=]
  snprintf(fname2, sizeof(fname2), "%s\\file2.dat", dname);
                                      ^~~~~~~~~~~
../source4/torture/smb2/session.c:696:2: note: ‘snprintf’ output between 11 and 266 bytes into a destination of size 256
  snprintf(fname2, sizeof(fname2), "%s\\file2.dat", dname);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

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

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 5729898248041794ffdd0b769332e015baf12cce)

- - - - -
3e42a24c by Günther Deschner at 2018-06-20T07:22:24Z
s3-utils: fix format-truncation in smbpasswd

../source3/utils/smbpasswd.c: In function ‘process_root’:
../source3/utils/smbpasswd.c:414:37: error: ‘$’ directive output may be truncated writing 1 byte into a region of size between 0 and 255 [-Werror=format-truncation=]
   slprintf(buf, sizeof(buf) - 1, "%s$", user_name);
                                     ^
In file included from ../source3/include/includes.h:23,
                 from ../source3/utils/smbpasswd.c:19:
../lib/replace/../replace/replace.h:514:18: note: ‘snprintf’ output between 2 and 257 bytes into a destination of size 255
 #define slprintf snprintf
../source3/utils/smbpasswd.c:414:3: note: in expansion of macro ‘slprintf’
   slprintf(buf, sizeof(buf) - 1, "%s$", user_name);
   ^~~~~~~~
../source3/utils/smbpasswd.c:397:35: error: ‘$’ directive output may be truncated writing 1 byte into a region of size between 0 and 255 [-Werror=format-truncation=]
   slprintf(buf, sizeof(buf)-1, "%s$", user_name);
                                   ^
In file included from ../source3/include/includes.h:23,
                 from ../source3/utils/smbpasswd.c:19:
../lib/replace/../replace/replace.h:514:18: note: ‘snprintf’ output between 2 and 257 bytes into a destination of size 255
 #define slprintf snprintf
../source3/utils/smbpasswd.c:397:3: note: in expansion of macro ‘slprintf’
   slprintf(buf, sizeof(buf)-1, "%s$", user_name);
   ^~~~~~~~
cc1: some warnings being treated as errors

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

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

Signed-off-by: Guenther Deschner <gd at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 9b6dc8f504c406ed8a044e5becca7e8f01da6c84)

- - - - -
c16e479f by Andreas Schneider at 2018-06-20T07:22:24Z
lib:util: Fix string check in mkdir_p()

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 7cec343a89a0862c09f5ddd4707eb442157a4af2)

- - - - -
3ef6d6ab by Andreas Schneider at 2018-06-20T07:22:24Z
s4:torture: Use strlcpy() in gen_name()

../source4/torture/basic/mangle_test.c: In function ‘gen_name’:
../source4/torture/basic/mangle_test.c:148:3: error: ‘strncpy’ output
    truncated before terminating nul copying 5 bytes from a string of the
    same length [-Werror=stringop-truncation]
   strncpy(p, "ABCDE", 5);
   ^~~~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 7a00d90d668f53914ffe035c41a5e79e60b51521)

- - - - -
aff12616 by Andreas Schneider at 2018-06-20T07:22:24Z
s3:lib: Use memcpy() in escape_ldap_string()

../source3/lib/ldap_escape.c: In function ‘escape_ldap_string’:
../source3/lib/ldap_escape.c:79:4: error: ‘strncpy’ output truncated
    before terminating nul copying 3 bytes from a string of the same length
[-Werror=stringop-truncation]
    strncpy (p, sub, 3);
    ^~~~~~~~~~~~~~~~~~~

We concatenat and do not care about NUL-termination till the loop has
finished.

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit ff7568daaeb19ff30f47f7f600ead247eaf4e826)

- - - - -
aa833e8b by Andreas Schneider at 2018-06-20T07:22:24Z
s3:passdb: Fix size of ascii_p16

../source3/passdb/pdb_smbpasswd.c: In function ‘mod_smbfilepwd_entry’:
../source3/passdb/pdb_smbpasswd.c:1015:7: error: ‘:LCT-’ directive
    output may be truncated writing 5 bytes into a region of size between 0
    and 255 [-Werror=format-truncat ion=]
    "%s:LCT-%08X:",
       ^~~~~
../source3/passdb/pdb_smbpasswd.c:1015:4: note: using the range [0,
    4294967295] for directive argument
    "%s:LCT-%08X:",
    ^~~~~~~~~~~~~~
In file included from ../source3/include/includes.h:23,
                 from ../source3/passdb/pdb_smbpasswd.c:23:
../lib/replace/../replace/replace.h:514:18: note: ‘snprintf’ output
    between 15 and 270 bytes into a destination of size 255
 #define slprintf snprintf
../source3/passdb/pdb_smbpasswd.c:1013:3: note: in expansion of macro ‘slprintf’
   slprintf(&ascii_p16[strlen(ascii_p16)],
   ^~~~~~~~

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 728297ca889b39ce2006778bf6a5bf1c3ce82d6d)

- - - - -
ca1acede by Andreas Schneider at 2018-06-20T07:22:24Z
s3:winbind: Fix uninitialzed variable warning

Raised by GCC8.

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 6b728b87bf5726f14100d76956c3df3fd9bb1058)

- - - - -
05dab794 by Andreas Schneider at 2018-06-20T07:22:24Z
lib:util: Fix parameter aliasing in tfork test

../lib/util/tests/tfork.c:483:24: error: passing argument 1 to
    restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
   ret = pthread_create(&threads[i],
                        ^~~~~~~~~~~
../lib/util/tests/tfork.c:486:10:
          (void *)&threads[i]);
          ~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 6f06a0154f5769cb85f6e189eecd78cd7805090a)

- - - - -
15c13f73 by Andreas Schneider at 2018-06-20T07:22:24Z
lib:util: Fix size types in debug.c

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit fb6cd9c44ac6fcc9f6abe3b63fc742aeac42969a)

- - - - -
fd836721 by Andreas Schneider at 2018-06-20T07:22:24Z
s4:ntvfs: Fix string copy of share_name

../source4/ntvfs/ipc/rap_server.c:70:3: error: ‘strncpy’ specified bound 13 equals destination size [-Werror=stringop-truncation]
   strncpy((char *)r->out.info[j].info1.share_name,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    snames[i],
    ~~~~~~~~~~
    sizeof(r->out.info[0].info1.share_name));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 609ef35c12900bbd5ecaa557f7b5d71b5784a103)

- - - - -
0e3d52f5 by Andreas Schneider at 2018-06-20T07:22:24Z
lib: Fix array size in audit_logging

../lib/audit_logging/audit_logging.c: In function ‘json_add_timestamp’:
../lib/audit_logging/audit_logging.c:603:12: error: ‘%s’ directive
       output may be truncated writing up to 9 bytes into a region of size
       between 0 and 43 [-Werror=format-truncation=]
   "%s.%06ld%s",
            ^~
../lib/audit_logging/audit_logging.c:606:3:
   tz);
   ~~
../lib/audit_logging/audit_logging.c:600:2: note: ‘snprintf’ output
       between 8 and 70 bytes into a destination of size 50
  snprintf(
  ^~~~~~~~~
   timestamp,
   ~~~~~~~~~~
   sizeof(timestamp),
   ~~~~~~~~~~~~~~~~~~
   "%s.%06ld%s",
   ~~~~~~~~~~~~~
   buffer,
   ~~~~~~~
   tv.tv_usec,
   ~~~~~~~~~~~
   tz);
   ~~~

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>

(cherry picked from commit 8b7c8eb3907e2123acee67949e88c26072afc81a)

- - - - -
e5ffffdd by Jeremy Allison at 2018-06-20T07:22:24Z
s3: torture: Add DELETE-PRINT test.

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

Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 42f049858f2037aab5b2097036db3e0375fdbf30)

- - - - -
6121a6fe by Jeremy Allison at 2018-06-20T07:22:24Z
s3: smbd: printing: Re-implement delete-on-close semantics for print files missing since 3.5.x.

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

Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>

Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Jun  1 20:32:03 CEST 2018 on sn-devel-144

(cherry picked from commit 364175b359f018c8641359440fa07b0ea567b045)

- - - - -
7f32430c by Jeremy Allison at 2018-06-20T11:53:29Z
python: Fix talloc frame use in make_simple_acl().

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

Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>

This was fixed differently by commit
539f51f0dfbe4ce317a2978982fd0fc9a7fd6922 in master.

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Wed Jun 20 13:53:29 CEST 2018 on sn-devel-144

- - - - -
df16008c by Karolin Seeger at 2018-06-25T11:07:26Z
bla

- - - - -
228e5d4f by Christof Schmitt at 2018-06-25T11:07:26Z
krb5_wrap: fix keep_old_entries logic for older kerberos libraries

MIT kerberos 1.13 and older only stores 8 bits of the KVNO. The change
from commit 35b2fb4ff32 resulted in breakage for these kerberos
versions: 'net ads keytab create' reads a large KVNO from AD, and only
the lower 8 bits are stored. The next check then removed the entry again
as the 8 bit value did not match the currently valid KVNO.

Fix this by limiting the check to only 8 bits.

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

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>

Autobuild-User(master): Christof Schmitt <cs at samba.org>
Autobuild-Date(master): Sat Jun 23 00:57:47 CEST 2018 on sn-devel-144

(cherry picked from commit 97eaeea6a130871cfac5be42459380c0c4e0fae6)

- - - - -
0196569d by Andreas Schneider at 2018-06-25T11:07:26Z
krb5_plugin: Add winbind localauth plugin for MIT Kerberos

Applications (like OpenSSH) don't know about users and and
their relationship to Kerberos principals. This plugin allows that
Kerberos principals can be validated against local user accounts.

Administrator at WURST.WORLD -> WURST\Administrator

https://web.mit.edu/kerberos/krb5-latest/doc/plugindev/localauth.html

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
(cherry picked from commit 5e89a23ffaceccdc83d70a4ab2798ae25c10d580)

- - - - -
be00b892 by Jeffrey Altman at 2018-06-25T15:30:14Z
heimdal: lib/krb5: do not fail set_config_files due to parse error

Follow Apple's lead and do not fail krb5_set_config_files() simply
because one of the files in the profile list fails to parse correctly.
Doing so can lead to hard to find failures and could lead to an end
user shooting themselves in the foot and no longer be able to login
to their system to fix it.

Parse as many of the files as we can.  Only fail krb5_set_config_files()
if init_context_from_config_file() fails.

Change-Id: I122664c6d707a5f926643808ba414bf4f681f8b8

Cherry-pick of Heimdal commit b7cf5e7caf9b270f4d4151d2690177b11a7a1bdf

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

Signed-off-by: Björn Baumbach <bb at sernet.de>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
(cherry picked from commit f05a1554b770c6a2c905170347bfb41157f4aa78)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Mon Jun 25 17:30:14 CEST 2018 on sn-devel-144

- - - - -
5f2859e9 by Andreas Schneider at 2018-06-25T19:47:19Z
s3:registry: Fix buffer truncation issues issues with gcc8

../source3/registry/reg_perfcount.c: In function ‘reg_perfcount_get_hkpd’:
../source3/registry/reg_perfcount.c:337:29: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
   snprintf(buf, buflen,"%d%s", key_part1, key_part2);

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 29f6842ee86b768f3677b38c5640655e312c398e)

- - - - -
941b5663 by Andreas Schneider at 2018-06-25T19:47:19Z
s3:smbget: Fix buffer truncation issues with gcc8

../source3/utils/smbget.c: In function ‘smb_download_file’:
../source3/utils/smbget.c:97:27: error: ‘b’ directive output may be truncated writing 1 byte into a region of size between 0 and 19 [-Werror=format-truncation=]
   snprintf(buffer, l, "%jdb", (intmax_t)s);
                           ^

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 4a3164e0beea35c1f4ce44fbe43547f7104587d1)

- - - - -
ee6bd861 by Andreas Schneider at 2018-06-25T19:47:19Z
s3:winbind: Fix regression introduced with bso #12851

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

Pair-Programmed-With: Guenther Deschner <gd at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Signed-off-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit c1c764925e24788905ab91aa455b415765d6f71f)

- - - - -
8b32d297 by Andreas Schneider at 2018-06-26T00:26:14Z
samdb: Fix build error with gcc8

../source4/dsdb/samdb/ldb_modules/samldb.c: In function ‘samldb_add’:
../source4/dsdb/samdb/ldb_modules/samldb.c:424:6: error: ‘found’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (found) {
      ^
../source4/dsdb/samdb/ldb_modules/samldb.c:348:11: note: ‘found’ was declared here
  bool ok, found;
           ^~~~~

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

Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 76828876faa3cd463023e323983df0be597c7361)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Tue Jun 26 02:26:15 CEST 2018 on sn-devel-144

- - - - -
5c1d9b0b by Andrew Bartlett at 2018-06-26T07:19:16Z
ldb: Save a copy of the index result before calling the callbacks.

Otherwise Samba modules like subtree_rename can fail as they modify the
index during the callback.

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

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

- - - - -
d1b59c26 by Andrew Bartlett at 2018-06-26T07:19:16Z
ldb: Indicate that the ltdb_dn_list_sort() in list_union is a bit subtle.

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
(cherry picked from commit 3632775d7ad31e06437ed76b8731d9895930caa1)

- - - - -
703ca1a4 by Andrew Bartlett at 2018-06-26T07:19:16Z
ldb: Explain why an entry can vanish from the index

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
(cherry picked from commit 9e143ee9b9f7be53c193cee3153f64c4dedc07e9)

- - - - -
b8df3cd9 by Andrew Bartlett at 2018-06-26T07:19:16Z
ldb: One-level search was incorrectly falling back to full DB scan

When no search filter is specified, the code falls back to using
'(|(objectClass=*)(distinguishedName=*)'. ltdb_index_dn() then failed
because matching against '*' is not indexed. The error return then
caused the code to fallback to a full-scan of the DB, which could have a
considerable performance hit.

Instead, we want to continue on and do the ltdb_index_filter() over the
indexed results that were returned.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
(cherry picked from commit 88ae60ed186c9c479722ad62d65a07d0c2e71469)

- - - - -
b4331a3a by Andrew Bartlett at 2018-06-26T07:19:16Z
ldb: Add tests for when we should expect a full scan

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

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
(cherry picked from commit e99c199d811e607e7867e7b40d82a1642226c647)

- - - - -
1fb72464 by Lukas Slebodnik at 2018-06-26T07:19:16Z
ldb: Fix memory leak on module context

Introduced in e8cdacc509016d9273d63faf334d9f827585c3eb

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

Signed-off-by: Lukas Slebodnik <lslebodn at fedoraproject.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Fri Jun  1 11:10:24 CEST 2018 on sn-devel-144

(cherry picked from commit d161aa3522576545d269208426bb0014ee2ab35f)

- - - - -
9b5f368a by Andrew Bartlett at 2018-06-26T07:19:17Z
ldb_tdb: Use mem_ctx and so avoid leak onto long-term memory on duplicated add.

After a duplicated add a small amount of memory can be leaked onto a
long-term context.

Found by Andrej Gessel https://github.com/andiges

https://github.com/samba-team/samba/commit/e8fb45125e6a279b918694668e0d4fbddac10aee#commitcomment-29334102

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13471
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>

Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Jun 15 04:39:41 CEST 2018 on sn-devel-144

(cherry picked from commit f4f3abfa0e18bb4968b37b1cac40cd8c185c8d7b)

- - - - -
7a1906d9 by Andrej Gessel at 2018-06-26T07:19:17Z
ldb: check return values

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

Signed-off-by: Andrej Gessel <Andrej.Gessel at janztec.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 6b52d21e6040699a72aff12fd6ebb34534dcb457)

- - - - -
2a3f91ea by Andrej Gessel at 2018-06-26T07:19:17Z
check return value before using key_values

there are also mem leaks in this function

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

Signed-off-by: Andrej Gessel <Andrej.Gessel at janztec.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit f75e8f58cd2390c092631803d333adadb475306a)

- - - - -
7ccd1eb5 by Andrej Gessel at 2018-06-26T07:19:17Z
Fix several mem leaks in ldb_index ldb_search ldb_tdb

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

Signed-off-by: Andrej Gessel <Andrej.Gessel at janztec.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Fri Jun 15 23:07:25 CEST 2018 on sn-devel-144

(cherry picked from commit 3ca1c09f686fbfa9257cd95710dba4a98c3eeb8f)

- - - - -
fb522c1b by Andrew Bartlett at 2018-06-26T07:19:17Z
.gitlab-ci.yml: Adapt to current GitLab CI setup

Signed-off-by: Andrew Bartlett <abartlet at samba.org>

- - - - -
e25631d6 by Andrew Bartlett at 2018-06-26T11:31:53Z
ldb: version 1.3.4

* Fix memory leaks and missing error checks (bug 13459, 13471, 13475)
* Fix fallback to full scan (performance regression) on
  one-level search (bug 13448)
* Fix read corruption (missing results) during writes, particularly
  during a Samba subtree rename (bug 13452)

Autobuild-User(v4-8-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-8-test): Tue Jun 26 13:31:53 CEST 2018 on sn-devel-144

- - - - -
519bc4de by Karolin Seeger at 2018-06-26T14:37:36Z
WHATSNEW: Add release notes for Samba 4.8.3.

Signed-off-by: Karolin Seeger <kseeger at samba.org>

- - - - -
a62c2f3e by Karolin Seeger at 2018-06-26T14:38:32Z
VERSION: Disable GIT_SNAPSHOT for the 4.8.3 release.

Signed-off-by: Karolin Seeger <kseeger at samba.org>

- - - - -
c0a8098a by Mathieu Parent at 2018-07-01T12:16:47Z
New upstream version 4.8.3+dfsg
- - - - -
4954a6da by Karolin Seeger at 2018-08-11T06:16:00Z
VERSION: Bump version up to 4.8.4...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger at samba.org>
(cherry picked from commit 1df7f93b6ede803ec01424c48d2f1f3526c9818c)

- - - - -
677fad5e by Jeremy Allison at 2018-08-11T06:16:00Z
CVE-2018-10858: libsmb: Ensure smbc_urlencode() can't overwrite passed in buffer.

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

CVE-2018-10858: Insufficient input validation on client directory
		listing in libsmbclient.

Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>

- - - - -
5923c3cc by Jeremy Allison at 2018-08-11T06:16:01Z
CVE-2018-10858: libsmb: Harden smbc_readdir_internal() against returns from malicious servers.

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

CVE-2018-10858: Insufficient input validation on client directory
                listing in libsmbclient.

Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>

- - - - -
87aa8361 by Andrew Bartlett at 2018-08-11T06:16:01Z
CVE-2018-10918: cracknames: Fix DoS (NULL pointer de-ref) when not servicePrincipalName is set on a user

This regression was introduced in Samba 4.7 by bug 12842 and in
master git commit eb2e77970e41c1cb62c041877565e939c78ff52d.

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

CVE-2018-10918: Denial of Service Attack on AD DC DRSUAPI server.

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

- - - - -
bbb72cfc by Tim Beale at 2018-08-11T06:16:01Z
CVE-2018-10919 security: Move object-specific access checks into separate function

Object-specific access checks refer to a specific section of the
MS-ADTS, and the code closely matches the spec. We need to extend this
logic to properly handle the Control-Access Right (CR), so it makes
sense to split the logic out into its own function.

This patch just moves the code, and should not alter the logic (apart
from ading in the boolean grant_access return variable.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
a81f32e7 by Tim Beale at 2018-08-11T06:16:01Z
CVE-2018-10919 security: Add more comments to the object-specific access checks

Reading the spec and then reading the code makes sense, but we could
comment the code more so it makes sense on its own.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
77421f33 by Tim Beale at 2018-08-11T06:16:01Z
CVE-2018-10919 tests: Add tests for guessing confidential attributes

Adds tests that assert that a confidential attribute cannot be guessed
by an unprivileged user through wildcard DB searches.

The tests basically consist of a set of DB searches/assertions that
get run for:
- basic searches against a confidential attribute
- confidential attributes that get overridden by giving access to the
  user via an ACE (run against a variety of ACEs)
- protecting a non-confidential attribute via an ACL that denies read-
  access (run against a variety of ACEs)
- querying confidential attributes via the dirsync controls

These tests all pass when run against a Windows Dc and all fail against
a Samba DC.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
03dba18b by Tim Beale at 2018-08-11T06:16:01Z
CVE-2018-10919 tests: Add test case for object visibility with limited rights

Currently Samba is a bit disclosive with LDB_OP_PRESENT (i.e.
attribute=*) searches compared to Windows.

All the acl.py tests are based on objectClass=* searches, where Windows
will happily tell a user about objects they have List Contents rights,
but not Read Property rights for. However, if you change the attribute
being searched for, suddenly the objects are no longer visible on
Windows (whereas they are on Samba).

This is a problem, because Samba can tell you about which objects have
confidential attributes, which in itself could be disclosive.

This patch adds a acl.py test-case that highlights this behaviour. The
test passes against Windows but fails against Samba.

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
a90cb03e by Tim Beale at 2018-08-11T06:16:01Z
CVE-2018-10919 security: Fix checking of object-specific CONTROL_ACCESS rights

An 'Object Access Allowed' ACE that assigned 'Control Access' (CR)
rights to a specific attribute would not actually grant access.

What was happening was the remaining_access mask for the object_tree
nodes would be Read Property (RP) + Control Access (CR). The ACE mapped
to the schemaIDGUID for a given attribute, which would end up being a
child node in the tree. So the CR bit was cleared for a child node, but
not the rest of the tree. We would then check the user had the RP access
right, which it did. However, the RP right was cleared for another node
in the tree, which still had the CR bit set in its remaining_access
bitmap, so Samba would not grant access.

Generally, the remaining_access only ever has one bit set, which means
this isn't a problem normally. However, in the Control Access case there
are 2 separate bits being checked, i.e. RP + CR.

One option to fix this problem would be to clear the remaining_access
for the tree instead of just the node. However, the Windows spec is
actually pretty clear on this: if the ACE has a CR right present, then
you can stop any further access checks.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
7016bfd3 by Gary Lockyer at 2018-08-11T06:16:02Z
CVE-2018-10919 tests: test ldap searches for non-existent attributes.

It is perfectly legal to search LDAP for an attribute that is not part
of the schema.  That part of the query should simply not match.

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

Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>

- - - - -
6e35ae37 by Tim Beale at 2018-08-11T06:16:02Z
CVE-2018-10919 acl_read: Split access_mask logic out into helper function

So we can re-use the same logic laster for checking the search-ops.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
f9fa4e5c by Tim Beale at 2018-08-11T06:16:02Z
CVE-2018-10919 acl_read: Small refactor to aclread_callback()

Flip the dirsync check (to avoid a double negative), and use a helper
boolean variable.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
1575ba42 by Tim Beale at 2018-08-11T06:16:02Z
CVE-2018-10919 acl_read: Flip the logic in the dirsync check

This better reflects the special case we're making for dirsync, and gets
rid of a 'if-else' clause.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
9891df45 by Tim Beale at 2018-08-11T06:16:02Z
CVE-2018-10919 acl_read: Fix unauthorized attribute access via searches

A user that doesn't have access to view an attribute can still guess the
attribute's value via repeated LDAP searches. This affects confidential
attributes, as well as ACLs applied to an object/attribute to deny
access.

Currently the code will hide objects if the attribute filter contains an
attribute they are not authorized to see. However, the code still
returns objects as results if confidential attribute is in the search
expression itself, but not in the attribute filter.

To fix this problem we have to check the access rights on the attributes
in the search-tree, as well as the attributes returned in the message.

Points of note:
- I've preserved the existing dirsync logic (the dirsync module code
  suppresses the result as long as the replPropertyMetaData attribute is
  removed). However, there doesn't appear to be any test that highlights
  that this functionality is required for dirsync.
- To avoid this fix breaking the acl.py tests, we need to still permit
  searches like 'objectClass=*', even though we don't have Read Property
  access rights for the objectClass attribute. The logic that Windows
  uses does not appear to be clearly documented, so I've made a best
  guess that seems to mirror Windows behaviour.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
a915e23a by Tim Beale at 2018-08-11T06:16:02Z
CVE-2018-10919 tests: Add extra test for dirsync deleted object corner-case

The acl_read.c code contains a special case to allow dirsync to
work-around having insufficient access rights. We had a concern that
the dirsync module could leak sensitive information for deleted objects.
This patch adds a test-case to prove whether or not this is happening.

The new test case is similar to the existing dirsync test except:
- We make the confidential attribute also preserve-on-delete, so it
  hangs around for deleted objcts. Because the attributes now persist
  across test case runs, I've used a different attribute to normal.
  (Technically, the dirsync search expressions are now specific enough
  that the regular attribute could be used, but it would make things
  quite fragile if someone tried to add a new test case).
- To handle searching for deleted objects, the search expressions are
  now more complicated. Currently dirsync adds an extra-filter to the
  '!' searches to exclude deleted objects, i.e. samaccountname matches
  the test-objects AND the object is not deleted. We now extend this to
  include deleted objects with lastKnownParent equal to the test OU.
  The search expression matches either case so that we can use the same
  expression throughout the test (regardless of whether the object is
  deleted yet or not).

This test proves that the dirsync corner-case does not actually leak
sensitive information on Samba. This is due to a bug in the dirsync
code - when the buggy line is removed, this new test promptly fails.
Test also passes against Windows.

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

Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>

- - - - -
c775bd8b by Douglas Bagnall at 2018-08-11T06:16:02Z
selftest/tests.py: remove always-needed, never-set with_cmocka flag

We have cmocka in third_party, so we are never without it.

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

(Backported from commit 33ef0e57a4f08eae5ea06f482374fbc0a1014de6
by Andrew Bartlett)

- - - - -
3454eae9 by Andrew Bartlett at 2018-08-11T06:16:03Z
CVE-2018-1139 libcli/auth: Add initial tests for ntlm_password_check()

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

Signed-off-by: Andrew Bartlett <abartlet at samba.org>

- - - - -
5fb35b7f by Günther Deschner at 2018-08-11T06:16:03Z
CVE-2018-1139 libcli/auth: fix debug messages in hash_password_check()

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

CVE-2018-1139: Weak authentication protocol allowed.

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>

- - - - -
f0bd8cc7 by Günther Deschner at 2018-08-11T06:16:03Z
CVE-2018-1139 s3-utils: use enum ntlm_auth_level in ntlm_password_check().

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

CVE-2018-1139: Weak authentication protocol allowed.

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>

- - - - -
6993f39d by Günther Deschner at 2018-08-11T06:16:03Z
CVE-2018-1139 selftest: verify whether ntlmv1 can be used via SMB1 when it is disabled.

Right now, this test will succeed.

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

CVE-2018-1139: Weak authentication protocol allowed.

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>

- - - - -
a5245e46 by Günther Deschner at 2018-08-11T06:16:03Z
CVE-2018-1139 libcli/auth: Do not allow ntlmv1 over SMB1 when it is disabled via "ntlm auth".

This fixes a regression that came in via 00db3aba6cf9ebaafdf39ee2f9c7ba5ec2281ea0.

Found by Vivek Das <vdas at redhat.com> (Red Hat QE).

In order to demonstrate simply run:

smbclient //server/share -U user%password -mNT1 -c quit \
--option="client ntlmv2 auth"=no \
--option="client use spnego"=no

against a server that uses "ntlm auth = ntlmv2-only" (our default
setting).

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

CVE-2018-1139: Weak authentication protocol allowed.

Guenther

Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>

- - - - -
95c95a4a by Andrej Gessel at 2018-08-11T06:16:03Z
CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()

Signed-off-by: Andrej Gessel <Andrej.Gessel at janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374

- - - - -
73317239 by Andrew Bartlett at 2018-08-11T06:16:03Z
CVE-2018-1140 ldb: Check for ldb_dn_get_casefold() failure in ldb_sqlite

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374

- - - - -
a36db4fc by Andrew Bartlett at 2018-08-11T06:16:04Z
CVE-2018-1140 ldb_tdb: Ensure the dn in distinguishedName= is valid before use

ldb_dn_from_ldb_val() does not validate this untrusted input, so a later
call to ldb_dn_get_casefold() can fail if the input is not valid.

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374

- - - - -
ebc3a1a1 by Andrew Bartlett at 2018-08-11T06:16:04Z
CVE-2018-1140 ldb_tdb: Check for DN validity in add, rename and search

This ensures we fail with a good error code before an eventual ldb_dn_get_casefold() which
would otherwise fail.

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374

- - - - -
47bf6f6e by Andrew Bartlett at 2018-08-11T06:16:04Z
CVE-2018-1140 ldb: Add tests for search add and rename with a bad dn= DN

Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374

- - - - -
5ad366eb by Andrew Bartlett at 2018-08-11T06:16:04Z
ldb: Release LDB 1.3.5 for CVE-2018-1140

* Security fix for CVE-2018-1140 (NULL pointer de-reference, bug 13374)

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

- - - - -
43aba6bd by Kai Blin at 2018-08-11T06:16:04Z
CVE-2018-1140 dns: Add a test to trigger the LDB casefolding issue on invalid chars

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

Signed-off-by: Kai Blin <kai at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>

- - - - -
032a6a46 by Karolin Seeger at 2018-08-11T06:16:04Z
WHATSNEW: Add release notes for Samba 4.8.4.

o  CVE-2018-1139  (Weak authentication protocol allowed.)
o  CVE-2018-1140  (Denial of Service Attack on DNS and LDAP server.)
o  CVE-2018-10858 (Insufficient input validation on client directory
                   listing in libsmbclient.)
o  CVE-2018-10918 (Denial of Service Attack on AD DC DRSUAPI server.)
o  CVE-2018-10919 (Confidential attribute disclosure from the AD LDAP
                   server.)

Signed-off-by: Karolin Seeger <kseeger at samba.org>

- - - - -
626c489c by Karolin Seeger at 2018-08-11T06:16:26Z
VERSION: Disable GIT_SNAPSHOT for the Samba 4.8.4 release.

o  CVE-2018-1139  (Weak authentication protocol allowed.)
o  CVE-2018-1140  (Denial of Service Attack on DNS and LDAP server.)
o  CVE-2018-10858 (Insufficient input validation on client directory
                   listing in libsmbclient.)
o  CVE-2018-10918 (Denial of Service Attack on AD DC DRSUAPI server.)
o  CVE-2018-10919 (Confidential attribute disclosure from the AD LDAP
                   server.)

Signed-off-by: Karolin Seeger <kseeger at samba.org>

- - - - -
ce9eaf97 by Mathieu Parent at 2018-08-15T02:09:29Z
New upstream version 4.8.4+dfsg
- - - - -


30 changed files:

- .gitlab-ci.yml → .gitlab-ci-private.yml
- VERSION
- WHATSNEW.txt
- auth/auth_log.c
- auth/ntlmssp/gensec_ntlmssp_server.c
- auth/ntlmssp/ntlmssp_client.c
- auth/ntlmssp/ntlmssp_server.c
- ctdb/doc/ctdb-etcd.7
- ctdb/doc/ctdb-statistics.7
- ctdb/doc/ctdb-tunables.7
- ctdb/doc/ctdb.1
- ctdb/doc/ctdb.7
- ctdb/doc/ctdb_diagnostics.1
- ctdb/doc/ctdb_mutex_ceph_rados_helper.7
- ctdb/doc/ctdbd.1
- ctdb/doc/ctdbd.conf.5
- ctdb/doc/ctdbd_wrapper.1
- ctdb/doc/ltdbtool.1
- ctdb/doc/onnode.1
- ctdb/doc/ping_pong.1
- docs/manpages/cifsdd.8
- docs/manpages/dbwrap_tool.1
- docs/manpages/eventlogadm.8
- docs/manpages/findsmb.1
- docs/manpages/idmap_ad.8
- docs/manpages/idmap_autorid.8
- docs/manpages/idmap_hash.8
- docs/manpages/idmap_ldap.8
- docs/manpages/idmap_nss.8
- docs/manpages/idmap_rfc2307.8


The diff was not included because it is too large.


View it on GitLab: https://salsa.debian.org/samba-team/samba/compare/3e3df112d7ae64d77876f2aa9956962d0386a69d...ce9eaf978eb9500aaed72f668b51eeb942ec4f16

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/compare/3e3df112d7ae64d77876f2aa9956962d0386a69d...ce9eaf978eb9500aaed72f668b51eeb942ec4f16
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20180817/69b150f8/attachment-0001.html>


More information about the Pkg-samba-maint mailing list