[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Thu Mar 16 23:21:03 UTC 2017
The branch, master has been updated
via da5e256 winbindd: remove trailing spaces in get_cache()
via eab5292 winbindd: README.Coding fixes for get_cache()
via 63f6560 winbindd: fix long lines in get_cache()
via 1dbb5c3 winbindd: untangle reconnect_methods vs reconnect_ads_methods
via b11c7f3 winbindd: use NULL for pointer check in get_cache()
via a113149 lib/util: Fix initializer
via 59514f2 replace: Fix compiler warning flag
via 358c84d docs: Deprecate "auth methods"
via e985a84 docs: Deprecate "map untrusted to domain"
via 2780a56 Changes to make the Solaris C compiler happy.
via 24622ba s3: libgpo: Allow skipping GPO objects that don't have the expected LDAP attributes.
via 5922927 Fix for Solaris C compiler.
via 1eaafea s3:smbd: exit early if srv_send_smb fails
from 1c4b15a s3: locking: Update oplock optimization for the leases era !
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit da5e256b9b209bde23f5025233c43f7022907f73
Author: Ralph Boehme <slow at samba.org>
Date: Thu Mar 16 17:52:50 2017 +0100
winbindd: remove trailing spaces in get_cache()
Trailing spaces are annoyingly highlighted red in my emacs setup so I'd
like to get rid of them. :)
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 Mar 17 00:20:17 CET 2017 on sn-devel-144
commit eab5292bccec3ff5ddf2df649183b6d37ed2d82e
Author: Ralph Boehme <slow at samba.org>
Date: Thu Mar 16 17:51:29 2017 +0100
winbindd: README.Coding fixes for get_cache()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 63f65607ea2cb6fc50926efbc96a8781d968357b
Author: Ralph Boehme <slow at samba.org>
Date: Thu Mar 16 17:45:36 2017 +0100
winbindd: fix long lines in get_cache()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1dbb5c3f6798cb6a3eff22faa89c39ab2705409d
Author: Ralph Boehme <slow at samba.org>
Date: Thu Mar 16 10:36:14 2017 +0100
winbindd: untangle reconnect_methods vs reconnect_ads_methods
No change in behaviour. The previous logic just seemed a bit clumsy
because of the ifdefs.
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit b11c7f394ea83da8dde48387312b77458376b08c
Author: Ralph Boehme <slow at samba.org>
Date: Thu Mar 16 09:32:55 2017 +0100
winbindd: use NULL for pointer check in get_cache()
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit a1131494df57f32f38d7f52087ae19efa1d9a498
Author: Amitay Isaacs <amitay at gmail.com>
Date: Thu Mar 16 13:29:18 2017 +1100
lib/util: Fix initializer
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 59514f2e4c6ce537c9fba9d9b5bffc37fb71fb8e
Author: Amitay Isaacs <amitay at gmail.com>
Date: Thu Mar 16 13:28:57 2017 +1100
replace: Fix compiler warning flag
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 358c84dde3c97330f88e4c0e86f19896f60ac418
Author: Volker Lendecke <vl at samba.org>
Date: Thu Mar 16 11:58:02 2017 +0100
docs: Deprecate "auth methods"
Keeping this parameter prevents fixing bug 2976
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit e985a8470b43bc02d83fd55136eeae35d9dc773e
Author: Volker Lendecke <vl at samba.org>
Date: Thu Mar 16 09:31:10 2017 +0100
docs: Deprecate "map untrusted to domain"
The implementation of this parameter depends on Samba to enumerate
trusted domains. In an active directory environment, we don't know of
a good way to enumerate all domains that we have to accept as trusted,
in particular with multiple forests, one-way and external trusts. We
hope to replace this parameter in the future with something that matches
Windows behaviour better, after the deprecation phase of this parameter
is over and we can remove it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2780a56d0bb7848e017314a033ef22ee944d8b05
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 16 09:17:51 2017 -0700
Changes to make the Solaris C compiler happy.
Fix Bug 12693 dbwrap_watch.c syntax error before or at: }
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12693
Signed-off-by: Tom schulz <schulz at adi.com>
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 24622bab3a6f1e959c79dc9fc1850e9e64b15adc
Author: Jeremy Allison <jra at samba.org>
Date: Wed Mar 15 13:52:05 2017 -0700
s3: libgpo: Allow skipping GPO objects that don't have the expected LDAP attributes.
We expect the following attributes to be present in an LDAP GPO object:
displayName
flags
gPCFileSysPath
name
ntSecurityDescriptor
versionNumber
and fail if a result is returned without them. Change this
to skip results that don't contain these attributes instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12695
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
commit 59229276bcf5e2b7fa0ddf3ceb6fd3adccc01f9a
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 16 09:10:52 2017 -0700
Fix for Solaris C compiler.
Inspired by comment 4 in bug 12559.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12559
Signed-off-by: Tom Schulz <schulz at adi.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 1eaafead1eccf832a25919582885ec15cc6617a7
Author: Aurelien Aptel <aaptel at suse.com>
Date: Wed Mar 15 11:34:20 2017 +0100
s3:smbd: exit early if srv_send_smb fails
coverity fix.
Signed-off-by: Aurelien Aptel <aaptel at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Böhme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
docs-xml/smbdotconf/security/authmethods.xml | 1 +
.../smbdotconf/security/mapuntrustedtodomain.xml | 1 +
lib/replace/wscript | 2 +-
lib/util/util.c | 2 +-
libgpo/gpo_ldap.c | 27 ++++++++++++----
source3/include/tldap.h | 6 ++++
source3/lib/dbwrap/dbwrap_watch.c | 2 +-
source3/smbd/reply.c | 4 ++-
source3/winbindd/winbindd_cache.c | 37 ++++++++++++----------
9 files changed, 56 insertions(+), 26 deletions(-)
Changeset truncated at 500 lines:
diff --git a/docs-xml/smbdotconf/security/authmethods.xml b/docs-xml/smbdotconf/security/authmethods.xml
index 386104d..17323aa 100644
--- a/docs-xml/smbdotconf/security/authmethods.xml
+++ b/docs-xml/smbdotconf/security/authmethods.xml
@@ -1,6 +1,7 @@
<samba:parameter name="auth methods"
context="G"
type="cmdlist"
+ deprecated="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
diff --git a/docs-xml/smbdotconf/security/mapuntrustedtodomain.xml b/docs-xml/smbdotconf/security/mapuntrustedtodomain.xml
index 126411a..496e7c2 100644
--- a/docs-xml/smbdotconf/security/mapuntrustedtodomain.xml
+++ b/docs-xml/smbdotconf/security/mapuntrustedtodomain.xml
@@ -1,6 +1,7 @@
<samba:parameter name="map untrusted to domain"
context="G"
type="boolean"
+ deprecated="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 9122ad1..f681d02 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -707,7 +707,7 @@ def build(bld):
source='''test/testsuite.c test/strptime.c
test/os2_delete.c test/getifaddrs.c''',
deps='replace',
- cflags="-Wno-format-length")
+ cflags="-Wno-format-zero-length")
if bld.env.standalone_replace:
bld.SAMBA_BINARY('replace_testsuite',
diff --git a/lib/util/util.c b/lib/util/util.c
index a8f2e00..49f1584 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -924,7 +924,7 @@ _PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *s
*/
_PUBLIC_ _PURE_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t hexdump_len)
{
- DATA_BLOB ret_blob = {'\0'};
+ DATA_BLOB ret_blob = { 0 };
size_t i = 0;
size_t char_count = 0;
/* hexdump line length is 77 chars long. We then use the ASCII representation of the bytes
diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index 9a95f8b..4533d61 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -424,24 +424,30 @@ ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads,
ADS_ERROR_HAVE_NO_MEMORY(gpo->ds_path);
if (!ads_pull_uint32(ads, res, "versionNumber", &gpo->version)) {
- return ADS_ERROR(LDAP_NO_MEMORY);
+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
}
if (!ads_pull_uint32(ads, res, "flags", &gpo->options)) {
- return ADS_ERROR(LDAP_NO_MEMORY);
+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
}
gpo->file_sys_path = ads_pull_string(ads, mem_ctx, res,
"gPCFileSysPath");
- ADS_ERROR_HAVE_NO_MEMORY(gpo->file_sys_path);
+ if (gpo->file_sys_path == NULL) {
+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
+ }
gpo->display_name = ads_pull_string(ads, mem_ctx, res,
"displayName");
- ADS_ERROR_HAVE_NO_MEMORY(gpo->display_name);
+ if (gpo->display_name == NULL) {
+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
+ }
gpo->name = ads_pull_string(ads, mem_ctx, res,
"name");
- ADS_ERROR_HAVE_NO_MEMORY(gpo->name);
+ if (gpo->name == NULL) {
+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
+ }
gpo->machine_extensions = ads_pull_string(ads, mem_ctx, res,
"gPCMachineExtensionNames");
@@ -450,7 +456,9 @@ ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads,
ads_pull_sd(ads, mem_ctx, res, "ntSecurityDescriptor",
&gpo->security_descriptor);
- ADS_ERROR_HAVE_NO_MEMORY(gpo->security_descriptor);
+ if (gpo->security_descriptor == NULL) {
+ return ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
+ }
return ADS_ERROR(LDAP_SUCCESS);
}
@@ -586,6 +594,13 @@ static ADS_STATUS add_gplink_to_gpo_list(ADS_STRUCT *ads,
if (!ADS_ERR_OK(status)) {
DEBUG(10,("failed to get gpo: %s\n",
gp_link->link_names[i]));
+ if ((status.error_type == ENUM_ADS_ERROR_LDAP) &&
+ (status.err.rc == LDAP_NO_SUCH_ATTRIBUTE)) {
+ DEBUG(10,("skipping empty gpo: %s\n",
+ gp_link->link_names[i]));
+ talloc_free(new_gpo);
+ continue;
+ }
return status;
}
diff --git a/source3/include/tldap.h b/source3/include/tldap.h
index 74279a4..23e3f1b 100644
--- a/source3/include/tldap.h
+++ b/source3/include/tldap.h
@@ -47,9 +47,15 @@ struct tldap_mod {
DATA_BLOB *values;
};
+#if defined(HAVE_IMMEDIATE_STRUCTURES)
typedef struct { uint8_t rc; } TLDAPRC;
#define TLDAP_RC(x) ((TLDAPRC){.rc = x})
#define TLDAP_RC_V(x) ((x).rc)
+#else
+typedef uint8_t TLDAPRC;
+#define TLDAP_RC(x) (x)
+#define TLDAP_RC_V(x) (x)
+#endif
#define TLDAP_RC_EQUAL(x,y) (TLDAP_RC_V(x)==TLDAP_RC_V(y))
#define TLDAP_RC_IS_SUCCESS(x) TLDAP_RC_EQUAL(x,TLDAP_SUCCESS)
diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c
index 842ab86..efff478 100644
--- a/source3/lib/dbwrap/dbwrap_watch.c
+++ b/source3/lib/dbwrap/dbwrap_watch.c
@@ -279,7 +279,7 @@ static struct db_record *dbwrap_watched_fetch_locked(
num_watchers = dbwrap_watched_parse(subrec_value, NULL, 0, NULL, NULL);
if (num_watchers == -1) {
/* Fresh or invalid record */
- rec->value = (TDB_DATA) {};
+ rec->value = (TDB_DATA) { 0 };
return rec;
}
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 22941ec..0979e6e 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -779,7 +779,9 @@ void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_s
DEBUG(5,("init msg_type=0x%x msg_flags=0x%x\n",
msg_type, msg_flags));
- srv_send_smb(xconn, outbuf, false, 0, false, NULL);
+ if (!srv_send_smb(xconn, outbuf, false, 0, false, NULL)) {
+ exit_server_cleanly("reply_special: srv_send_smb failed.");
+ }
if (CVAL(outbuf, 0) != 0x82) {
exit_server_cleanly("invalid netbios session");
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index bafeb9b..98c69f8 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -135,26 +135,27 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
}
if (strequal(domain->name, get_global_sam_name()) &&
- sid_check_is_our_sam(&domain->sid)) {
+ sid_check_is_our_sam(&domain->sid))
+ {
domain->backend = &sam_passdb_methods;
}
- if ( !domain->initialized ) {
+ if (!domain->initialized) {
/* We do not need a connection to an RW DC for cache operation */
init_dc_connection(domain, false);
}
- /*
+ /*
OK. Listen up because I'm only going to say this once.
We have the following scenarios to consider
(a) trusted AD domains on a Samba DC,
(b) trusted AD domains and we are joined to a non-kerberos domain
(c) trusted AD domains and we are joined to a kerberos (AD) domain
- For (a) we can always contact the trusted domain using krb5
+ For (a) we can always contact the trusted domain using krb5
since we have the domain trust account password
- For (b) we can only use RPC since we have no way of
+ For (b) we can only use RPC since we have no way of
getting a krb5 ticket in our own domain
For (c) we can always use krb5 since we have a kerberos trust
@@ -162,32 +163,36 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
--jerry
*/
- if (!domain->backend) {
#ifdef HAVE_ADS
+ if (domain->backend == NULL) {
struct winbindd_domain *our_domain = domain;
- /* find our domain first so we can figure out if we
+ /* find our domain first so we can figure out if we
are joined to a kerberized domain */
- if ( !domain->primary )
+ if (!domain->primary) {
our_domain = find_our_domain();
+ }
if ((our_domain->active_directory || IS_DC)
&& domain->active_directory
- && !lp_winbind_rpc_only()) {
- DEBUG(5,("get_cache: Setting ADS methods for domain %s\n", domain->name));
+ && !lp_winbind_rpc_only())
+ {
+ DBG_INFO("Setting ADS methods for domain %s\n",
+ domain->name);
domain->backend = &reconnect_ads_methods;
- } else {
-#endif /* HAVE_ADS */
- DEBUG(5,("get_cache: Setting MS-RPC methods for domain %s\n", domain->name));
- domain->backend = &reconnect_methods;
-#ifdef HAVE_ADS
}
+ }
#endif /* HAVE_ADS */
+
+ if (domain->backend == NULL) {
+ DBG_INFO("Setting MS-RPC methods for domain %s\n", domain->name);
+ domain->backend = &reconnect_methods;
}
- if (ret)
+ if (ret != NULL) {
return ret;
+ }
ret = SMB_XMALLOC_P(struct winbind_cache);
ZERO_STRUCTP(ret);
--
Samba Shared Repository
More information about the samba-cvs
mailing list