[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Dec 18 07:27:04 UTC 2015
The branch, master has been updated
via dbd87b9 tdb: Refuse to load a database with hash size 0
via bffcc17 libads: Remove "foreign" from ads_struct
from bf1fa9e negoex.idl: use DATA_BLOB for negoex_BYTE_VECTOR
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit dbd87b94aafcae214053116321497941bacc7cad
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Nov 9 14:10:11 2015 +1300
tdb: Refuse to load a database with hash size 0
This just ensures we reject (rather than div-by-0) a corrupt
DB with a zero hash size.
Found with american fuzzy lop
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 Dec 18 08:26:25 CET 2015 on sn-devel-144
commit bffcc175676657064c44f37f90fe95d3675276fc
Author: Volker Lendecke <vl at samba.org>
Date: Wed Dec 16 21:44:50 2015 +0100
libads: Remove "foreign" from ads_struct
AFAICS this was never actually used
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/tdb/common/open.c | 7 +++++++
source3/include/ads.h | 2 --
source3/libads/ads_struct.c | 8 --------
source3/libads/ndr.c | 1 -
4 files changed, 7 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index 3b53fa7..f3ef856 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -593,6 +593,13 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
errno = ENOSYS;
goto fail;
}
+
+ if (header.hash_size == 0) {
+ TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: invalid database: 0 hash_size\n"));
+ errno = ENOSYS;
+ goto fail;
+ }
+
tdb->hash_size = header.hash_size;
if (header.rwlocks == TDB_FEATURE_FLAG_MAGIC) {
diff --git a/source3/include/ads.h b/source3/include/ads.h
index daea56d..cacb25c 100644
--- a/source3/include/ads.h
+++ b/source3/include/ads.h
@@ -32,8 +32,6 @@ typedef struct ads_struct {
char *realm;
char *workgroup;
char *ldap_server;
- int foreign; /* set to 1 if connecting to a foreign
- * realm */
bool gc; /* Is this a global catalog server? */
} server;
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 30d433e..27af4d6 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -144,14 +144,6 @@ ADS_STRUCT *ads_init(const char *realm,
ads->server.workgroup = workgroup ? SMB_STRDUP(workgroup) : NULL;
ads->server.ldap_server = ldap_server? SMB_STRDUP(ldap_server) : NULL;
- /* we need to know if this is a foreign realm */
- if (realm && *realm && !strequal(lp_realm(), realm)) {
- ads->server.foreign = 1;
- }
- if (workgroup && *workgroup && !strequal(lp_workgroup(), workgroup)) {
- ads->server.foreign = 1;
- }
-
/* the caller will own the memory by default */
ads->is_mine = 1;
diff --git a/source3/libads/ndr.c b/source3/libads/ndr.c
index fd0b63e..eb48437 100644
--- a/source3/libads/ndr.c
+++ b/source3/libads/ndr.c
@@ -50,7 +50,6 @@ void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct
ndr_print_string(ndr, "realm", r->server.realm);
ndr_print_string(ndr, "workgroup", r->server.workgroup);
ndr_print_string(ndr, "ldap_server", r->server.ldap_server);
- ndr_print_bool(ndr, "foreign", r->server.foreign);
ndr->depth--;
ndr_print_struct(ndr, name, "auth");
ndr->depth++;
--
Samba Shared Repository
More information about the samba-cvs
mailing list