[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Mon Apr 29 17:08:02 UTC 2019


The branch, master has been updated
       via  cbee3037a29 waf: only set mandatory to False if not already set by the caller
       via  40f91924d6e gitlab-ci: Install missing krb5-kdc package on Ubuntu/Debian
       via  cf79ee15bd2 wafsamba: Enable warnings for missing field initializer
       via  99eb720338d s3:libsmb: Fix C99 initializer in cli_smb2_fnum.c
       via  bbef26860df s4:dsdb: Use C99 initializer in dsdb util_trusts
       via  2a1c19b82c3 s3:lib: Use correct C99 initializer for 'struct flock' in messages_dgm
       via  e0b9281cd73 lib:audit_logging: Use C99 initializer for server_id in audit_logging
       via  d24c9d5fa4b s3:utils: use struct initializer in async-tracker long_options
      from  633698c9715 Revert "lib/replace: define NAME_MAX for platforms that don't have it"

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


- Log -----------------------------------------------------------------
commit cbee3037a293273191c2c0c12a162589e01c884b
Author: Ralph Boehme <slow at samba.org>
Date:   Fri Mar 29 18:18:27 2019 +0100

    waf: only set mandatory to False if not already set by the caller
    
    There are a bunch of callers that call find_program with mandatory=True,
    we should not overwrite this when explicity passed, eg:
    
      ctx.find_program('objcopy', var='OBJCOPY', mandatory=True)
    
      conf.SAMBA_CHECK_PERL(mandatory=True)
        -> conf.find_program('perl', var='PERL', mandatory=mandatory)
    
    With this patch we only change the default from False to True, but allow
    callers to choose specific behaviour.
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Mon Apr 29 17:07:02 UTC 2019 on sn-devel-184

commit 40f91924d6e5ab6d87a5c65256d2df235429d313
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Apr 29 10:51:33 2019 +0200

    gitlab-ci: Install missing krb5-kdc package on Ubuntu/Debian
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit cf79ee15bd2e669d881f92bfd1a1ab1034615480
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Dec 13 11:41:56 2018 +0100

    wafsamba: Enable warnings for missing field initializer
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 99eb720338d9c7988dd6e8ba3db9ce072ba9536e
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 23 11:03:27 2019 +0200

    s3:libsmb: Fix C99 initializer in cli_smb2_fnum.c
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bbef26860dffee1905012c8a31845291c968544c
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jan 14 13:07:28 2019 +0100

    s4:dsdb: Use C99 initializer in dsdb util_trusts
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 2a1c19b82c34ebde17daee5548a4fdfb87f8104f
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jan 14 12:20:35 2019 +0100

    s3:lib: Use correct C99 initializer for 'struct flock' in messages_dgm
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit e0b9281cd7310581e971ca4fb1dce4bea497b30e
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Jan 14 13:24:24 2019 +0100

    lib:audit_logging: Use C99 initializer for server_id in audit_logging
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d24c9d5fa4bae5882844c6f0d5ab86bca74a4092
Author: Ralph Boehme <slow at samba.org>
Date:   Mon Apr 29 11:32:35 2019 +0200

    s3:utils: use struct initializer in async-tracker long_options
    
    s3:utils: use struct initializer in async-tracker long_options
    
    The previous initializer list was missing a NULL as last element. Using struct
    initializers instead for correct initialisation.
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 .gitlab-ci.yml                                    |  2 +-
 bootstrap/config.py                               |  2 +-
 bootstrap/generated-dists/debian7/bootstrap.sh    |  1 +
 bootstrap/generated-dists/debian7/packages.yml    |  1 +
 bootstrap/generated-dists/debian8/bootstrap.sh    |  1 +
 bootstrap/generated-dists/debian8/packages.yml    |  1 +
 bootstrap/generated-dists/debian9/bootstrap.sh    |  1 +
 bootstrap/generated-dists/debian9/packages.yml    |  1 +
 bootstrap/generated-dists/ubuntu1404/bootstrap.sh |  1 +
 bootstrap/generated-dists/ubuntu1404/packages.yml |  1 +
 bootstrap/generated-dists/ubuntu1604/bootstrap.sh |  1 +
 bootstrap/generated-dists/ubuntu1604/packages.yml |  1 +
 bootstrap/generated-dists/ubuntu1804/bootstrap.sh |  1 +
 bootstrap/generated-dists/ubuntu1804/packages.yml |  1 +
 bootstrap/sha1sum.txt                             |  2 +-
 buildtools/wafsamba/samba_autoconf.py             |  1 +
 buildtools/wafsamba/samba_waf18.py                |  4 ++-
 lib/audit_logging/audit_logging.c                 |  4 ++-
 source3/lib/messages_dgm.c                        |  4 ++-
 source3/libsmb/cli_smb2_fnum.c                    |  6 ++--
 source3/utils/async-tracker.c                     | 16 +++++++--
 source4/dsdb/common/util_trusts.c                 | 40 ++++++++++++++++-------
 22 files changed, 71 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fbb1e173c06..01ef8e0e6b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,7 +19,7 @@ variables:
   # Set this to the contents of bootstrap/sha1sum.txt
   # which is generated by bootstrap/template.py --render
   #
-  SAMBA_CI_CONTAINER_TAG: 14f5cb79a0fbeef9378506ecdc6881d8042736c9
+  SAMBA_CI_CONTAINER_TAG: a63fcd17331238531d472206e34aa24c9fc46bb1
   #
   # The following images are available
   # Please see the samba-o3 sections at the end of this file!
diff --git a/bootstrap/config.py b/bootstrap/config.py
index c0f3b37cfbf..b15a7d4c3cf 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -113,7 +113,7 @@ PKGS = [
     ('xsltproc', 'libxslt'),
     ('krb5-user', ''),
     ('krb5-config', ''),
-    ('', 'krb5-server'),
+    ('krb5-kdc', 'krb5-server'),
     ('apt-utils', 'yum-utils'),
     ('pkg-config', 'pkgconfig'),
     ('procps', 'procps-ng'),  # required for the free cmd in tests
diff --git a/bootstrap/generated-dists/debian7/bootstrap.sh b/bootstrap/generated-dists/debian7/bootstrap.sh
index a5cb63ace15..ac3ba7f399b 100755
--- a/bootstrap/generated-dists/debian7/bootstrap.sh
+++ b/bootstrap/generated-dists/debian7/bootstrap.sh
@@ -33,6 +33,7 @@ apt-get -y install \
     hostname \
     htop \
     krb5-config \
+    krb5-kdc \
     krb5-user \
     libacl1-dev \
     libaio-dev \
diff --git a/bootstrap/generated-dists/debian7/packages.yml b/bootstrap/generated-dists/debian7/packages.yml
index 03862993de3..0611dd8475c 100644
--- a/bootstrap/generated-dists/debian7/packages.yml
+++ b/bootstrap/generated-dists/debian7/packages.yml
@@ -22,6 +22,7 @@ packages:
   - hostname
   - htop
   - krb5-config
+  - krb5-kdc
   - krb5-user
   - libacl1-dev
   - libaio-dev
diff --git a/bootstrap/generated-dists/debian8/bootstrap.sh b/bootstrap/generated-dists/debian8/bootstrap.sh
index 73db186c1d9..bddc4548016 100755
--- a/bootstrap/generated-dists/debian8/bootstrap.sh
+++ b/bootstrap/generated-dists/debian8/bootstrap.sh
@@ -33,6 +33,7 @@ apt-get -y install \
     hostname \
     htop \
     krb5-config \
+    krb5-kdc \
     krb5-user \
     libacl1-dev \
     libaio-dev \
diff --git a/bootstrap/generated-dists/debian8/packages.yml b/bootstrap/generated-dists/debian8/packages.yml
index 7aaeb2a2f09..e0e5d53d5ea 100644
--- a/bootstrap/generated-dists/debian8/packages.yml
+++ b/bootstrap/generated-dists/debian8/packages.yml
@@ -22,6 +22,7 @@ packages:
   - hostname
   - htop
   - krb5-config
+  - krb5-kdc
   - krb5-user
   - libacl1-dev
   - libaio-dev
diff --git a/bootstrap/generated-dists/debian9/bootstrap.sh b/bootstrap/generated-dists/debian9/bootstrap.sh
index 7fa82c9f042..5e5a2fd43ed 100755
--- a/bootstrap/generated-dists/debian9/bootstrap.sh
+++ b/bootstrap/generated-dists/debian9/bootstrap.sh
@@ -33,6 +33,7 @@ apt-get -y install \
     hostname \
     htop \
     krb5-config \
+    krb5-kdc \
     krb5-user \
     libacl1-dev \
     libaio-dev \
diff --git a/bootstrap/generated-dists/debian9/packages.yml b/bootstrap/generated-dists/debian9/packages.yml
index 85736819f58..9fdb1d1c2e6 100644
--- a/bootstrap/generated-dists/debian9/packages.yml
+++ b/bootstrap/generated-dists/debian9/packages.yml
@@ -22,6 +22,7 @@ packages:
   - hostname
   - htop
   - krb5-config
+  - krb5-kdc
   - krb5-user
   - libacl1-dev
   - libaio-dev
diff --git a/bootstrap/generated-dists/ubuntu1404/bootstrap.sh b/bootstrap/generated-dists/ubuntu1404/bootstrap.sh
index 478d7c9a0d6..c4e2da48220 100755
--- a/bootstrap/generated-dists/ubuntu1404/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1404/bootstrap.sh
@@ -32,6 +32,7 @@ apt-get -y install \
     hostname \
     htop \
     krb5-config \
+    krb5-kdc \
     krb5-user \
     language-pack-en \
     libacl1-dev \
diff --git a/bootstrap/generated-dists/ubuntu1404/packages.yml b/bootstrap/generated-dists/ubuntu1404/packages.yml
index b796d0d2d37..854dfd863fb 100644
--- a/bootstrap/generated-dists/ubuntu1404/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1404/packages.yml
@@ -21,6 +21,7 @@ packages:
   - hostname
   - htop
   - krb5-config
+  - krb5-kdc
   - krb5-user
   - language-pack-en
   - libacl1-dev
diff --git a/bootstrap/generated-dists/ubuntu1604/bootstrap.sh b/bootstrap/generated-dists/ubuntu1604/bootstrap.sh
index 43c66be224b..356c59c808e 100755
--- a/bootstrap/generated-dists/ubuntu1604/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1604/bootstrap.sh
@@ -32,6 +32,7 @@ apt-get -y install \
     hostname \
     htop \
     krb5-config \
+    krb5-kdc \
     krb5-user \
     language-pack-en \
     libacl1-dev \
diff --git a/bootstrap/generated-dists/ubuntu1604/packages.yml b/bootstrap/generated-dists/ubuntu1604/packages.yml
index b9c4cb0308c..b06d7efe985 100644
--- a/bootstrap/generated-dists/ubuntu1604/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1604/packages.yml
@@ -21,6 +21,7 @@ packages:
   - hostname
   - htop
   - krb5-config
+  - krb5-kdc
   - krb5-user
   - language-pack-en
   - libacl1-dev
diff --git a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
index 0defc9325b6..7a5dc23e62e 100755
--- a/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
+++ b/bootstrap/generated-dists/ubuntu1804/bootstrap.sh
@@ -33,6 +33,7 @@ apt-get -y install \
     hostname \
     htop \
     krb5-config \
+    krb5-kdc \
     krb5-user \
     language-pack-en \
     libacl1-dev \
diff --git a/bootstrap/generated-dists/ubuntu1804/packages.yml b/bootstrap/generated-dists/ubuntu1804/packages.yml
index 6b3c00910c8..bbf8eb59640 100644
--- a/bootstrap/generated-dists/ubuntu1804/packages.yml
+++ b/bootstrap/generated-dists/ubuntu1804/packages.yml
@@ -22,6 +22,7 @@ packages:
   - hostname
   - htop
   - krb5-config
+  - krb5-kdc
   - krb5-user
   - language-pack-en
   - libacl1-dev
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index aa874cf24eb..a522f0566a6 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-14f5cb79a0fbeef9378506ecdc6881d8042736c9
+a63fcd17331238531d472206e34aa24c9fc46bb1
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 98ffdfea458..f2b049e40a7 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -731,6 +731,7 @@ def SAMBA_CONFIG_H(conf, path=None):
         conf.ADD_CFLAGS('-Wall', testflags=True)
         conf.ADD_CFLAGS('-Wshadow', testflags=True)
         conf.ADD_CFLAGS('-Wmissing-prototypes', testflags=True)
+        conf.ADD_CFLAGS('-Wmissing-field-initializers', testflags=True)
         conf.ADD_CFLAGS('-Wcast-align -Wcast-qual', testflags=True)
         conf.ADD_CFLAGS('-fno-common', testflags=True)
 
diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py
index cc310fbf512..c0bb6bfcf55 100644
--- a/buildtools/wafsamba/samba_waf18.py
+++ b/buildtools/wafsamba/samba_waf18.py
@@ -132,7 +132,9 @@ class ConfigurationContext(Configure.ConfigurationContext):
         return super(ConfigurationContext, self).init_dirs()
 
 def find_program_samba(self, *k, **kw):
-    kw['mandatory'] = False
+    # Override the waf default set in the @conf decorator in Configure.py
+    if 'mandatory' not in kw:
+        kw['mandatory'] = False
     ret = self.find_program_old(*k, **kw)
     return ret
 Configure.ConfigurationContext.find_program_old = Configure.ConfigurationContext.find_program
diff --git a/lib/audit_logging/audit_logging.c b/lib/audit_logging/audit_logging.c
index 6944da7f872..7d9c3b838b5 100644
--- a/lib/audit_logging/audit_logging.c
+++ b/lib/audit_logging/audit_logging.c
@@ -229,7 +229,9 @@ void audit_message_send(
 	uint32_t message_type,
 	struct json_object *message)
 {
-	struct server_id event_server = {};
+	struct server_id event_server = {
+		.pid = 0,
+	};
 	NTSTATUS status;
 
 	const char *message_string = NULL;
diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c
index 5a79a234271..2d90f525f1d 100644
--- a/source3/lib/messages_dgm.c
+++ b/source3/lib/messages_dgm.c
@@ -1524,7 +1524,9 @@ int messaging_dgm_cleanup(pid_t pid)
 	struct messaging_dgm_context *ctx = global_dgm_context;
 	struct sun_path_buf lockfile_name, socket_name;
 	int fd, len, ret;
-	struct flock lck = {};
+	struct flock lck = {
+		.l_pid = 0,
+	};
 
 	if (ctx == NULL) {
 		return ENOTCONN;
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 6a725cb1537..535beaab841 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -3072,9 +3072,9 @@ struct tevent_req *cli_smb2_query_mxac_send(TALLOC_CTX *mem_ctx,
 		return NULL;
 	}
 	*state = (struct cli_smb2_mxac_state) {
-		state->ev = ev,
-		state->cli = cli,
-		state->fname = fname,
+		.ev = ev,
+		.cli = cli,
+		.fname = fname,
 	};
 
 	if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
diff --git a/source3/utils/async-tracker.c b/source3/utils/async-tracker.c
index 4ccf26f907e..f45c0953238 100644
--- a/source3/utils/async-tracker.c
+++ b/source3/utils/async-tracker.c
@@ -207,8 +207,20 @@ int main(int argc, const char **argv)
 	poptContext pc;
 	struct poptOption long_options[] = {
 		POPT_AUTOHELP
-		{"tevent",	't', POPT_ARG_NONE,	NULL, 't', "Use tevent loop" },
-		{"glib",	'g', POPT_ARG_NONE, 	NULL, 'g', "Use glib loop" },
+		{
+			.longName  = "tevent",
+			.shortName = 't',
+			.argInfo   = POPT_ARG_NONE,
+			.val       = 'v',
+			.descrip   = "Use tevent loop",
+		},
+		{
+			.longName  = "glib",
+			.shortName = 'g',
+			.argInfo   = POPT_ARG_NONE,
+			.val       = 'g',
+			.descrip   = "Use glib loop",
+		},
 		POPT_COMMON_SAMBA
 		POPT_TABLEEND
 	};
diff --git a/source4/dsdb/common/util_trusts.c b/source4/dsdb/common/util_trusts.c
index 4fe20496ed8..d2183911470 100644
--- a/source4/dsdb/common/util_trusts.c
+++ b/source4/dsdb/common/util_trusts.c
@@ -382,7 +382,9 @@ static NTSTATUS dsdb_trust_parse_crossref_info(TALLOC_CTX *mem_ctx,
 	const char *dns = NULL;
 	const char *netbios = NULL;
 	struct ldb_dn *nc_dn = NULL;
-	struct dom_sid sid = {};
+	struct dom_sid sid = {
+		.num_auths = 0,
+	};
 	NTSTATUS status;
 
 	*_tdo = NULL;
@@ -621,11 +623,11 @@ static int dns_cmp(const char *s1, const char *s2)
 	size_t l1 = 0;
 	const char *p1 = NULL;
 	size_t num_comp1 = 0;
-	uint16_t comp1[UINT8_MAX] = {};
+	uint16_t comp1[UINT8_MAX] = {0};
 	size_t l2 = 0;
 	const char *p2 = NULL;
 	size_t num_comp2 = 0;
-	uint16_t comp2[UINT8_MAX] = {};
+	uint16_t comp2[UINT8_MAX] = {0};
 	size_t i;
 
 	if (s1 != NULL) {
@@ -1011,8 +1013,12 @@ NTSTATUS dsdb_trust_xref_forest_info(TALLOC_CTX *mem_ctx,
 		const char *dns = NULL;
 		const char *netbios = NULL;
 		struct ldb_dn *nc_dn = NULL;
-		struct dom_sid sid = {};
-		struct lsa_ForestTrustRecord e = {};
+		struct dom_sid sid = {
+			.num_auths = 0,
+		};
+		struct lsa_ForestTrustRecord e = {
+			.flags = 0,
+		};
 		struct lsa_ForestTrustDomainInfo *d = NULL;
 		struct lsa_StringLarge *t = NULL;
 		bool match = false;
@@ -1086,7 +1092,9 @@ NTSTATUS dsdb_trust_xref_forest_info(TALLOC_CTX *mem_ctx,
 	for (i=0; (tln_el != NULL) && i < tln_el->num_values; i++) {
 		const struct ldb_val *v = &tln_el->values[i];
 		const char *dns = (const char *)v->data;
-		struct lsa_ForestTrustRecord e = {};
+		struct lsa_ForestTrustRecord e = {
+			.flags = 0,
+		};
 		struct lsa_StringLarge *t = NULL;
 		bool match = false;
 		NTSTATUS status;
@@ -2037,7 +2045,9 @@ NTSTATUS dsdb_trust_merge_forest_info(TALLOC_CTX *mem_ctx,
 	 */
 	for (ni = 0; ni < nfti->count; ni++) {
 		const struct lsa_ForestTrustRecord *nftr = nfti->entries[ni];
-		struct lsa_ForestTrustRecord tftr = {};
+		struct lsa_ForestTrustRecord tftr = {
+			.flags = 0,
+		};
 		const char *ndns = NULL;
 		bool ignore_new = false;
 		bool found_old = false;
@@ -2152,7 +2162,9 @@ NTSTATUS dsdb_trust_merge_forest_info(TALLOC_CTX *mem_ctx,
 	 */
 	for (ni = 0; ni < nfti->count; ni++) {
 		const struct lsa_ForestTrustRecord *nftr = nfti->entries[ni];
-		struct lsa_ForestTrustRecord tftr = {};
+		struct lsa_ForestTrustRecord tftr = {
+			.flags = 0,
+		};
 		const struct lsa_ForestTrustDomainInfo *nd = NULL;
 		const char *ndns = NULL;
 		const char *nnbt = NULL;
@@ -2648,13 +2660,19 @@ NTSTATUS dsdb_trust_get_incoming_passwords(struct ldb_message *msg,
 					   struct samr_Password **_previous)
 {
 	TALLOC_CTX *frame = talloc_stackframe();
-	struct samr_Password __current = {};
-	struct samr_Password __previous = {};
+	struct samr_Password __current = {
+		.hash = {0},
+	};
+	struct samr_Password __previous = {
+		.hash = {0},
+	};
 	struct samr_Password *current = NULL;
 	struct samr_Password *previous = NULL;
 	const struct ldb_val *blob = NULL;
 	enum ndr_err_code ndr_err;
-	struct trustAuthInOutBlob incoming = {};
+	struct trustAuthInOutBlob incoming = {
+		.count = 0,
+	};
 	uint32_t i;
 
 	if (_current != NULL) {


-- 
Samba Shared Repository



More information about the samba-cvs mailing list