[SCM] Samba Shared Repository - branch master updated

2019-07-01 Thread Andrew Bartlett
The branch, master has been updated
   via  82f327fce89 kcc: default to logging to DBGLVL_WARNING
   via  731f0b7b52c docs/smbclient: document -Tcn
   via  9c9f88758b6 man net: include --json option
   via  dfe32af975a net idmap check: correct spelling of --force
   via  66620567ae3 s4/scripting/smbstatus: approach py3 compatibility
   via  9c630b4bfd0 pytests/subunitrun: not usefully executable
   via  a4cea294d3d s4/tests/dsdb_schema: not usefully executable as script
   via  ae1472834b3 s4/script/rodcdns: str type doesn't need decoding
   via  6972b53f505 wintest: py3 telnet.sendline() doesn't like string with 
^Z
   via  5331f913ac4 script/bisect-test: fix for py3
   via  e406b6d7960 s4/scripting/autoidl: another py3 incompatible except
   via  98848142cde repl_md: Avoid dropping cross-partition links
   via  dba9987bf50 tests: Add getncchanges test for cross-partition links 
+ TGT
  from  92f9f836aba WHATSNEW.txt: samba-tool --backend-size-parameter

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 82f327fce897f452e269d22a8ed348bb5cddfa0b
Author: Gary Lockyer 
Date:   Thu Jun 6 11:40:08 2019 +1200

kcc: default to logging to DBGLVL_WARNING

If the "-d" debug level parameter is not supplied, default to 
DBGLVL_WARNING.
Overiding the "log level" set in smb.conf.

When samba runs the kcc command stderr output is logged at DBGLVL_ERR,
the default log destination is stderr.  As a result any log messages
generated by the kcc command, are effectively logged at DBGLVL_ERR.
This causes issues if auth or audit logging are enabled in smb.conf.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 
Pair-programmed-with: Tim Beale 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Tue Jul  2 05:49:43 UTC 2019 on sn-devel-184

commit 731f0b7b52c666cabdc74c42f2f6cbe1e6abaf33
Author: Douglas Bagnall 
Date:   Thu Jun 20 12:13:56 2019 +1200

docs/smbclient: document -Tcn

BUG:https://bugzilla.samba.org/show_bug.cgi?id=2352
Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 9c9f88758b6dd3daa5636135ada83d5d8c8fa9ec
Author: Douglas Bagnall 
Date:   Mon Jun 3 23:02:57 2019 +1200

man net: include --json option

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit dfe32af975ae45782e0d8e1954457e7ad43770af
Author: Douglas Bagnall 
Date:   Tue Jun 4 02:37:44 2019 +1200

net idmap check: correct spelling of --force

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 66620567ae325d6c20b0a38c41fa138e902ec8e0
Author: Douglas Bagnall 
Date:   Sun Mar 17 17:17:28 2019 +1300

s4/scripting/smbstatus: approach py3 compatibility

It is still unused and untested, probably not working.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 9c630b4bfd09dbfdb3709bf9499ebcc584bd3239
Author: Douglas Bagnall 
Date:   Sun Mar 17 15:38:04 2019 +1300

pytests/subunitrun: not usefully executable

it only defines classes and fiddles with signals.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit a4cea294d3d394fd134e67f4ce463d6673ed6831
Author: Douglas Bagnall 
Date:   Sun Mar 17 14:57:06 2019 +1300

s4/tests/dsdb_schema: not usefully executable as script

You could run the script, but it wouldn't do anything.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit ae1472834b3256dbe53733abecbee2129d364594
Author: Douglas Bagnall 
Date:   Sun Mar 17 14:50:44 2019 +1300

s4/script/rodcdns: str type doesn't need decoding

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 6972b53f505a97985cb9127c181a5a7cfa987368
Author: Douglas Bagnall 
Date:   Sun Mar 17 14:49:14 2019 +1300

wintest: py3 telnet.sendline() doesn't like string with ^Z

Try using bytes instead.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 5331f913ac4dd3d94bed45846b64b89475029994
Author: Douglas Bagnall 
Date:   Sun Mar 17 15:38:43 2019 +1300

script/bisect-test: fix for py3

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit e406b6d79603e31d2179717c0a4c7dbeeed7c337
Author: Douglas Bagnall 
Date:   Thu Mar 14 23:12:38 2019 +1300

s4/scripting/autoidl: another py3 incompatible except

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 98848142cde51d4b280a6fb5cd95dc4bd2471e17
Author: Tim Beale 
Date:   Mon Jul 1 13:41:14 2019 +1200

repl_md: Avoid dropping cross-partition links

Cross-partition links could still be dropped if GET_TGT was already
previously set for the replication.

This was due to a slight error in the order of logic. We never want to
ignore 

[SCM] Samba Shared Repository - branch master updated

2019-07-01 Thread Gary Lockyer
The branch, master has been updated
   via  92f9f836aba WHATSNEW.txt: samba-tool --backend-size-parameter
   via  5583208aed0 samba-tool domain join: remove the subdomain option
   via  54fbac97ef7 join subdomain: changes for --backend-store-size
   via  2face29963d samba-tool domain dcpromo: add --backend-store-size 
option
   via  bdd72acd32b samba-tool dcpromo tests: add --backend-store-size 
option
   via  97bc3db68a5 samba-tool clone-dc-database: Add --backend-store-size 
option
   via  0ee3b06640b clone-dc-database tests: Add --backend-store-size option
   via  ddfc1ddd4f9 samba-tool domain join: Add --backend-store-size option
   via  f93cb76ab01 domain join tests: Add --backend-store-size option.
   via  236f5f6a8c1 provision: Add --backend-store-size option
   via  bbc2791 lib ldb ldb_mdb: Pass the lmdb map size as an ldb option
   via  e46d5bb669d ldb: Release ldb 2.0.4
   via  3b52ca59a2d lib ldb: save a copy of the options on the context
   via  b281fc624e5 provision: If --targetdir has been specified then we 
must always reset posix:eadb and xattr_tdb:file
   via  5cbe76e395d samba-tool domain provision: add lmdb database size 
option
   via  4644416a921 samba-tool: Make the 'bytes' option type avaiable
   via  b8446c08025 python getopt: Add bytes option type
   via  b27817d4917 provision tests: Add --backend-store-size option.
  from  6e65c283120 selftest: add a test that itime is not set when setting 
DOS attrs

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 92f9f836abaf0fa85e6fd4fc08c2993c9a4af70b
Author: Gary Lockyer 
Date:   Mon Jul 1 11:44:36 2019 +1200

WHATSNEW.txt: samba-tool --backend-size-parameter

Document the --backend-store-size option added to the samba-tool sub
commands:
 * domain provision
 * domain join
 * domain dcpromo
 * drs clone-dc-database

And the removal os the join subdomain option.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Gary Lockyer 
Autobuild-Date(master): Tue Jul  2 04:19:29 UTC 2019 on sn-devel-184

commit 5583208aed0e4647269e48aa1d3c5c48a73001ac
Author: Gary Lockyer 
Date:   Fri Jun 28 15:13:13 2019 +1200

samba-tool domain join: remove the subdomain option

Remove the sub domain option from join, as it currently does not work.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 

commit 54fbac97ef70ece7a0607d5d6073501f08f8adc6
Author: Gary Lockyer 
Date:   Fri Jun 28 15:11:11 2019 +1200

join subdomain: changes for --backend-store-size

Pass the 'backend_store_size' parameter through to DCJoinContext.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 

commit 2face29963da2192c81e62a98d181fe7fd22c977
Author: Gary Lockyer 
Date:   Fri Jun 28 15:12:31 2019 +1200

samba-tool domain dcpromo: add --backend-store-size option

Add a new "samba-tool domain dcpromo" option "backend-store-size".
This allows the lmdb map size to be set during a promotion, instead of
hard-wiring it to 8Gb.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 

commit bdd72acd32b6777b80b54d82688048e1cb0b8f32
Author: Gary Lockyer 
Date:   Fri Jun 28 15:14:51 2019 +1200

samba-tool dcpromo tests: add --backend-store-size option

Add a new "samba-tool domain dcpromo" option "backend-store-size".
This allows the lmdb map size to be set during a promotion, instead of
hard-wiring it to 8Gb.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 

commit 97bc3db68a5ec2cd20e5059d77089e76a0625479
Author: Gary Lockyer 
Date:   Fri Jun 28 08:56:31 2019 +1200

samba-tool clone-dc-database: Add --backend-store-size option

Add a new "samba-tool drs clone-dc-database" option "backend-store-size".
This allows the lmdb map size to be set during a clone, instead of
hard-wiring it to 8Gb.

Signed-off-by: Gary Lockyer '
Reviewed-by: Andrew Bartlett 

commit 0ee3b06640b9032f4b462aad03f076e28b8763ed
Author: Gary Lockyer 
Date:   Fri Jun 28 08:54:31 2019 +1200

clone-dc-database tests: Add --backend-store-size option

Add a new "samba-tool drs clone-dc-database" option "backend-store-size".
This allows the lmdb map size to be set during a clone, instead of
hard-wiring it to 8Gb.

Signed-off-by: Gary Lockyer '
Reviewed-by: Andrew Bartlett 

commit ddfc1ddd4f9e9b4b70e036023d7868cb48c7391f
Author: Gary Lockyer 
Date:   Fri Jun 28 08:52:50 2019 +1200

samba-tool domain join: Add --backend-store-size option

Add a new "samba-tool domain join" option "backend-store-size".
This allows the lmdb map size to be set during a provision, instead of
hard-wiring it to 8Gb.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew 

[SCM] Samba Shared Repository - branch master updated

2019-07-01 Thread Jeremy Allison
The branch, master has been updated
   via  6e65c283120 selftest: add a test that itime is not set when setting 
DOS attrs
   via  03690ec2180 vfs_fruit: change default for "fruit:zero_file_id" to 
false
   via  eb986786562 vfs_fruit: make "fruit:zero_file_id" a per share option
   via  076f26dd5c9 vfs_fruit: move zero file-id to vfs_fruit
   via  36d100e4b89 s3:smbd: set file_id in fetch_dos_mode_done()
   via  a3caf4140c0 s3:smbd: use stored file_id in SMB_VFS_FS_FILE_ID()
   via  df5752ec90d s3:vfs: move get_fs_file_id to vfs_default
   via  71996fef09f s3:vfs: add SMB_VFS_FS_FILE_ID()
   via  d2bac65e2ef s3:smbd: rename get_FileIndex() to get_fs_file_id()
   via  e6cdd4862f9 s3:smbd: return inode number, not FileIndex for UNIX 
query info level
   via  ebe7b8c58ca s3:smbd: use xattr_DosInfo4 in set_ea_dos_attribute()
   via  d54424a758b s3:smbd: parse xattr_DosInfo4 in 
parse_dos_attribute_blob()
   via  c03094cc1f9 s3:smbd: mark itime non-calculated if we created a file 
or dir
   via  a5a2ce953bb s3/lib: add make_file_index_from_itime()
   via  295d3501d71 s3/lib: add update_stat_ex_file_id()
   via  506ef2761c2 s3/lib: add update_stat_ex_itime()
   via  30b7f9ae2df s3: add st_ex_file_id to struct stat_ex
   via  df4a380d9f4 s3: add st_ex_itime to struct stat_ex
   via  d18bdc1c43b s3: convert struct stat_ex st_ex_calculated_birthtime 
bool to flags
   via  a5f4e33f87f s3: remove unused st_ex_mask from struct stat_ex
   via  3e005fb8f4f idl: add xattr_DosInfo4 to xattr_DosInfo in xattr.idl
   via  ae6dd4853e3 vfs_catia: pass stat info to synthetic_smb_fname()
  from  163c0cc84a1 s3:winbind: Add support for storing KRB5 credential in 
KCM

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6e65c283120e3e627f0d8570601263f904529996
Author: Ralph Boehme 
Date:   Thu Jun 27 09:38:57 2019 +0200

selftest: add a test that itime is not set when setting DOS attrs

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Mon Jul  1 23:21:07 UTC 2019 on sn-devel-184

commit 03690ec2180d10c6d0c01ed2d7392aa9f8d30c0b
Author: Ralph Boehme 
Date:   Sun Jun 30 13:33:39 2019 +0200

vfs_fruit: change default for "fruit:zero_file_id" to false

Now that we have reliable File-IDs, change the default for the option
"zero_file_id" to false.

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit eb986786562d2551743e97f5cd59d59f574657ca
Author: Ralph Boehme 
Date:   Sun Jun 30 14:24:59 2019 +0200

vfs_fruit: make "fruit:zero_file_id" a per share option

Now that File-ID calculation goes through the VFS, we can nicely make a
per-share option out of it.

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit 076f26dd5c9d5b2c5836f2cb66c9b2d895076ab6
Author: Ralph Boehme 
Date:   Sat Jun 29 14:35:49 2019 +0200

vfs_fruit: move zero file-id to vfs_fruit

Now that this stuff goes through the VFS, let's do it right. :)

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit 36d100e4b8945edbccc94175c716197db9df12c9
Author: Ralph Boehme 
Date:   Thu Jun 27 14:47:57 2019 +0200

s3:smbd: set file_id in fetch_dos_mode_done()

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit a3caf4140c01136a412c129cae28b433e33ab014
Author: Ralph Boehme 
Date:   Thu Jun 27 14:46:37 2019 +0200

s3:smbd: use stored file_id in SMB_VFS_FS_FILE_ID()

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit df5752ec90d2b648b221887840262acf8fe43ef6
Author: Ralph Boehme 
Date:   Sat Jun 29 14:18:13 2019 +0200

s3:vfs: move get_fs_file_id to vfs_default

This makes get_fs_file_id() the default implementation of
SMB_VFS_FS_FILE_ID(). No change in behaviour.

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit 71996fef09f28fba39637acb86a51b5e0c1da36b
Author: Ralph Boehme 
Date:   Sat Jun 29 14:08:04 2019 +0200

s3:vfs: add SMB_VFS_FS_FILE_ID()

Not yet used, that comes next.

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit d2bac65e2ef76b7ceecd57e39072311008aea7f8
Author: Ralph Boehme 
Date:   Fri Jun 28 10:12:44 2019 +0200

s3:smbd: rename get_FileIndex() to get_fs_file_id()

Also rename all variable used to store the result of the renamed
get_fs_file_id() in the callers.

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

commit e6cdd4862f9c07101c8bab7c21b7c438164e13ec
Author: Ralph Boehme 
Date:   Tue Jun 25 12:07:59 2019 +0200

s3:smbd: return inode number, not FileIndex for UNIX query info level

get_FileIndex() returns a stable and unique numerical identifier when 
"store dos
attributes" is 

[SCM] Samba Shared Repository - branch master updated

2019-07-01 Thread Andreas Schneider
The branch, master has been updated
   via  163c0cc84a1 s3:winbind: Add support for storing KRB5 credential in 
KCM
  from  a77fda0cd4b lib tdb: memcmp ubsan warning

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 163c0cc84a1f2ded56389db80e9e4046f76f6185
Author: Andreas Schneider 
Date:   Mon Jul 1 10:43:42 2019 +0200

s3:winbind: Add support for storing KRB5 credential in KCM

This can store crentiials in the Kerberos Credential Manager e.g.
provided by sssd.

Signed-off-by: Andreas Schneider 
Reviewed-by: Alexander Bokovoy 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Mon Jul  1 19:22:02 UTC 2019 on sn-devel-184

---

Summary of changes:
 docs-xml/manpages/pam_winbind.conf.5.xml | 28 ++--
 source3/winbindd/winbindd_pam.c  |  5 +
 2 files changed, 23 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/pam_winbind.conf.5.xml 
b/docs-xml/manpages/pam_winbind.conf.5.xml
index 537007ba2fa..a5aaa01504d 100644
--- a/docs-xml/manpages/pam_winbind.conf.5.xml
+++ b/docs-xml/manpages/pam_winbind.conf.5.xml
@@ -113,19 +113,27 @@
store the retrieved Ticket Granting Ticket (TGT) in a
credential cache. The type of credential cache can be
controlled with this option.  The supported values are:
-   KEYRING (when supported by the system's
-   Kerberos library and Kernel), FILE and
-   DIR (when the DIR type is supported by
-   the system's Kerberos library). In case of FILE a credential
-   cache in the form of /tmp/krb5cc_UID will be created -  in case
-   of DIR you NEED to specify a directory. UID is replaced with
-   the numeric user id.
+   KCM or KEYRING
+   (when supported by the system's Kerberos library and
+   operating system),
+   FILE and DIR
+   (when the DIR type is supported by the system's Kerberos
+   library). In case of FILE a credential cache in the form of
+   /tmp/krb5cc_UID will be created -  in case of DIR you NEED
+   to specify a directory. UID is replaced with the numeric
+   user id.
 
When using the KEYRING type, the supported mechanism is
KEYRING:persistent:UID, which uses the Linux
-   kernel keyring to store credentials on a per-UID basis. This is
-   the recommended choice on latest Linux distributions, as it is
-   the most secure and predictable method.
+   kernel keyring to store credentials on a per-UID basis.
+
+   When using th KCM type, the supported mechanism is
+   KCM:UID, which uses a Kerberos credential
+   manaager to store credentials on a per-UID basis simliar to
+   KEYRING. This is the recommended choice on latest Linux
+   distributions, offering a Kerberos Credential Manager. If not
+   we suggest to use KEYRING as those are the most secure and
+   predictable method.
 
It is also possible to define custom filepaths and use 
the "%u"
pattern in order to substitue the numeric user id.
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 190f23f1b24..eaf16d0dced 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -569,6 +569,11 @@ static const char *generate_krb5_ccache(TALLOC_CTX 
*mem_ctx,
gen_cc = talloc_asprintf(
mem_ctx, "KEYRING:persistent:%d", uid);
}
+   if (strequal(type, "KCM")) {
+   gen_cc = talloc_asprintf(mem_ctx,
+"KCM:%d",
+uid);
+   }
 
if (strnequal(type, "FILE:/", 6) ||
strnequal(type, "WRFILE:/", 8) ||


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2019-07-01 Thread Noel Power
The branch, master has been updated
   via  a77fda0cd4b lib tdb: memcmp ubsan warning
   via  2b7236ffe1a lib/krb5_wrap: clang: Fix warning: Null pointer passed 
as an argument
   via  8b92539997a lib/krb5_wrap: clang: Fix warning: Call to function 
'mktemp' is insecure
   via  7bddd6aefe3 lib/util: clang: Fix warning: Value stored to 'ret' is 
never read warning
   via  3b43daaccbb lib/ldb/common: clang: Fix Value stored to 'ret' is 
never read warning
   via  9e78f7b53d9 lib/tdb/common: Fix Array access results in a null 
pointer dereference
   via  848290d37fd lib/tdb/common: Fix warning: Null pointer passed as 
argument to param
   via  dcaaf9ff7a2 lib/util: Fix Value stored to 'ret' is never read 
warning
  from  043334f2eb6 util: Fix signed/unsigned comparisons by casting

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a77fda0cd4b9ec89024c7ac8a3f77797e00f4263
Author: Gary Lockyer 
Date:   Thu Jun 6 14:57:45 2019 +1200

lib tdb: memcmp ubsan warning

Fix the ubsan warning

lib/tdb/common/tdb.c:184:9: runtime error: null pointer passed as
argument 2, which is declared to never be null"

memcmp call now guarded by a length check.

memcmp returns zero when called with a zero length parameter.

Signed-off-by: Gary Lockyer 
Reviewed-by: Noel Power 

Autobuild-User(master): Noel Power 
Autobuild-Date(master): Mon Jul  1 14:50:54 UTC 2019 on sn-devel-184

commit 2b7236ffe1a0454756b76f8dc302649e92cefbaa
Author: Noel Power 
Date:   Tue Jun 18 10:47:29 2019 +

lib/krb5_wrap: clang: Fix warning: Null pointer passed as an argument

Fixes:

lib/krb5_wrap/krb5_samba.c:3241:3: warning: Null pointer passed as an 
argument to a 'nonnull' parameter <--[clang]
memcpy(gss_cksum + 28, in_data->data, orig_length);
^

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

commit 8b92539997a9df8e0d217790fd82fc8f59ea50cc
Author: Noel Power 
Date:   Tue Jun 18 10:42:06 2019 +

lib/krb5_wrap: clang: Fix warning: Call to function 'mktemp' is insecure

Fixes:

lib/krb5_wrap/krb5_samba.c:2012:2: warning: Call to function 'mktemp' is 
insecure as it always creates or uses insecure temporary file.  Use 'mkstemp' 
instead <--[clang]
mktemp(tmp_name);
^~

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

commit 7bddd6aefe3bd764560e5284f9a192797051bb2d
Author: Noel Power 
Date:   Tue Jun 18 10:19:09 2019 +

lib/util: clang: Fix warning: Value stored to 'ret' is never read warning

Fixes:

lib/util/server_id_db.c:181:3: warning: Value stored to 'ret' is never read 
<--[clang]
ret = tdb_store(tdb, key, talloc_tdb_data(ids), TDB_MODIFY);
^ ~

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

commit 3b43daaccbb80824d8da10c84306ebf99268ec01
Author: Noel Power 
Date:   Tue Jun 18 10:12:49 2019 +

lib/ldb/common: clang: Fix Value stored to 'ret' is never read warning

Fixes:

lib/ldb/common/ldb.c:1091:3: warning: Value stored to 'ret' is never read 
<--[clang]
ret = 0;
^ ~
1 warning generated.

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

commit 9e78f7b53d94816446e33f3d53a4d240807552ec
Author: Noel Power 
Date:   Tue Jun 18 10:04:54 2019 +

lib/tdb/common: Fix Array access results in a null pointer dereference

Fixes;

lib/tdb/common/transaction.c:613:7: warning: Array access (via field 
'blocks') results in a null pointer dereference <--[clang]
if (tdb->transaction->blocks[i] != NULL) {
^
1 warning generated.

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

commit 848290d37fdb381b43db12675e771b462eefe7ef
Author: Noel Power 
Date:   Mon Jun 17 16:54:32 2019 +0100

lib/tdb/common: Fix warning: Null pointer passed as argument to param

Fixes:

lib/tdb/common/rescue.c:299:2: warning: Null pointer passed as an argument 
to a 'nonnull' parameter <--[clang]
qsort(found.arr, found.num, sizeof(found.arr[0]), cmp_key);
^ ~

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

commit dcaaf9ff7a281910ba12e7e9f701641f6eb97262
Author: Noel Power 
Date:   Mon Jun 17 15:23:42 2019 +

lib/util: Fix Value stored to 'ret' is never read warning

Fixes:

lib/util/tfork.c:260:3: warning: Value stored to 'ret' is never read 
<--[clang]

Signed-off-by: Noel Power 
Reviewed-by: Gary Lockyer 

---

Summary of changes:
 lib/krb5_wrap/krb5_samba.c   |  4 

[SCM] Samba Shared Repository - branch master updated

2019-07-01 Thread Andreas Schneider
The branch, master has been updated
   via  043334f2eb6 util: Fix signed/unsigned comparisons by casting
   via  115353a0014 util: Fix signed/unsigned comparisons by declaring as 
size_t
   via  abea597b7fc util: Fix signed/unsigned comparisons by declaring as 
size_t
  from  d5383297f03 tests-util: Adding test to verify "allow no conversion" 
flag

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 043334f2eb67ec82c3c6b757fef5eb986d58ad25
Author: Martin Schwenke 
Date:   Fri Jun 21 15:11:49 2019 +1000

util: Fix signed/unsigned comparisons by casting

One case needs a variable declared, so it can be compared to -1 and
then cast to size_t for comparison.

Signed-off-by: Martin Schwenke 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Mon Jul  1 08:00:29 UTC 2019 on sn-devel-184

commit 115353a00149997f01fb9964cdbc9be4c7a0cd0a
Author: Martin Schwenke 
Date:   Tue Jun 25 10:50:05 2019 +1000

util: Fix signed/unsigned comparisons by declaring as size_t

I may be missing something subtle but I can't see a reason for
declaring these as ssize_t.

Signed-off-by: Martin Schwenke 
Reviewed-by: Andreas Schneider 

commit abea597b7fc5c221205143d537cf5fb009a234bf
Author: Martin Schwenke 
Date:   Fri Jun 21 15:10:19 2019 +1000

util: Fix signed/unsigned comparisons by declaring as size_t

Signed-off-by: Martin Schwenke 
Reviewed-by: Andreas Schneider 

---

Summary of changes:
 lib/util/fault.c |  4 ++--
 lib/util/msghdr.c|  4 ++--
 lib/util/pidfile.c   |  2 +-
 lib/util/substitute.c| 16 
 lib/util/sys_rw_data.c   |  4 ++--
 lib/util/talloc_report.c |  2 +-
 lib/util/util_file.c |  8 +---
 lib/util/util_strlist.c  |  6 +++---
 8 files changed, 24 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/fault.c b/lib/util/fault.c
index bde20e33460..5be9162679e 100644
--- a/lib/util/fault.c
+++ b/lib/util/fault.c
@@ -261,10 +261,10 @@ libunwind_failed:
  (unsigned long)backtrace_size));
 
if (backtrace_strings) {
-   int i;
+   size_t i;
 
for (i = 0; i < backtrace_size; i++)
-   DEBUGADD(0, (" #%u %s\n", i, backtrace_strings[i]));
+   DEBUGADD(0, (" #%zu %s\n", i, backtrace_strings[i]));
 
/* Leak the backtrace_strings, rather than risk what free() 
might do */
}
diff --git a/lib/util/msghdr.c b/lib/util/msghdr.c
index fec54462844..3a1d6f5a017 100644
--- a/lib/util/msghdr.c
+++ b/lib/util/msghdr.c
@@ -223,7 +223,7 @@ ssize_t msghdr_copy(struct msghdr_buf *msg, size_t msgsize,
return -1;
}
 
-   if (bufsize >= fd_len) {
+   if (bufsize >= (size_t)fd_len) {
bufsize -= fd_len;
} else {
bufsize = 0;
@@ -256,7 +256,7 @@ ssize_t msghdr_copy(struct msghdr_buf *msg, size_t msgsize,
}
 
needed = offsetof(struct msghdr_buf, buf) + fd_len;
-   if (needed < fd_len) {
+   if (needed < (size_t)fd_len) {
return -1;
}
needed += iov_len;
diff --git a/lib/util/pidfile.c b/lib/util/pidfile.c
index 5cd09cee75c..b90ff12a8c7 100644
--- a/lib/util/pidfile.c
+++ b/lib/util/pidfile.c
@@ -82,7 +82,7 @@ int pidfile_path_create(const char *path, int *outfd)
ret = errno;
goto fail_unlink;
}
-   if (len >= sizeof(tmp)) {
+   if ((size_t)len >= sizeof(tmp)) {
ret = ENOSPC;
goto fail_unlink;
}
diff --git a/lib/util/substitute.c b/lib/util/substitute.c
index 2c18257da25..2249035f704 100644
--- a/lib/util/substitute.c
+++ b/lib/util/substitute.c
@@ -52,14 +52,14 @@ static void string_sub2(char *s,const char *pattern, const 
char *insert, size_t
bool allow_trailing_dollar)
 {
char *p;
-   ssize_t ls, lp, li, i;
+   size_t ls, lp, li, i;
 
if (!insert || !pattern || !*pattern || !s)
return;
 
-   ls = (ssize_t)strlen(s);
-   lp = (ssize_t)strlen(pattern);
-   li = (ssize_t)strlen(insert);
+   ls = strlen(s);
+   lp = strlen(pattern);
+   li = strlen(insert);
 
if (len == 0)
len = ls + 1; /* len is number of *bytes* */
@@ -176,14 +176,14 @@ _PUBLIC_ char *string_sub_talloc(TALLOC_CTX *mem_ctx, 
const char *s,
 _PUBLIC_ void all_string_sub(char *s,const char *pattern,const char *insert, 
size_t len)
 {
char *p;
-   ssize_t ls,lp,li;
+   size_t ls,lp,li;
 
if (!insert || !pattern || !s)
return;
 
-   ls = (ssize_t)strlen(s);
-   lp = (ssize_t)strlen(pattern);
-   li =