[SCM] Samba Shared Repository - branch master updated
Douglas Bagnall
dbagnall at samba.org
Thu May 3 06:17:02 UTC 2018
The branch, master has been updated
via 2096d13 Fix some incorrect debug messages that look to be copy-paste issues.
via 1b3d330 python.gpo.ADS_STRUCT: check type of loadparm argument
via a82ca08 samba_dnsupdate: Put samba.kcc import after path insert of bin/python
from 795ec75 s3: libsmbclient: Fix hard-coded connection error return of ETIMEDOUT.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2096d13274b679c282bdb85c63900eba0d76d1be
Author: Richard Sharpe <richard.sharpe at primarydata.com>
Date: Wed May 2 15:12:44 2018 -0700
Fix some incorrect debug messages that look to be copy-paste issues.
Signed-off-by: Richard Sharpe <realrichardsharpe at gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall at samba.org>
Autobuild-Date(master): Thu May 3 08:16:26 CEST 2018 on sn-devel-144
commit 1b3d3304e5a55dbc4353ddade82da43e079e33ed
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Apr 13 12:29:05 2018 +1200
python.gpo.ADS_STRUCT: check type of loadparm argument
And add a test showning the segfault.
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit a82ca08f37658069aa547a98344b48aaf6b4a270
Author: Garming Sam <garming at catalyst.net.nz>
Date: Tue Mar 27 15:24:44 2018 +1300
samba_dnsupdate: Put samba.kcc import after path insert of bin/python
Signed-off-by: Garming Sam <garming at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
libgpo/pygpo.c | 9 ++++++++-
python/samba/tests/gpo.py | 7 +++++++
source3/libads/ldap.c | 6 +++---
source4/scripting/bin/samba_dnsupdate | 2 +-
4 files changed, 19 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index db33602..60220a6 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -183,7 +183,14 @@ static int py_ads_init(ADS *self, PyObject *args, PyObject *kwds)
}
if (lp_obj) {
- bool ok;
+ bool ok = py_check_dcerpc_type(lp_obj, "samba.param",
+ "LoadParm");
+ if (!ok) {
+ PyErr_Format(PyExc_TypeError,
+ "Expected samba.param.LoadParm "
+ "for lp argument");
+ return -1;
+ }
lp_ctx = pytalloc_get_type(lp_obj, struct loadparm_context);
if (lp_ctx == NULL) {
return -1;
diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py
index bdcbcc6..796a5cb 100644
--- a/python/samba/tests/gpo.py
+++ b/python/samba/tests/gpo.py
@@ -50,6 +50,13 @@ class GPOTests(tests.TestCase):
assert gpos[i].ds_path == ds_paths[i], \
'ds_path did not match expected %s' % gpos[i].ds_path
+
+ def test_gpo_ads_does_not_segfault(self):
+ try:
+ ads = gpo.ADS_STRUCT(self.server, 42, self.creds)
+ except:
+ pass
+
def test_gpt_version(self):
global gpt_data
local_path = self.lp.get("path", "sysvol")
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index e8dcd1b..1384669 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -3454,18 +3454,18 @@ bool ads_has_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machi
status = ads_find_machine_acct(ads, &res, machine_name);
if (!ADS_ERR_OK(status)) {
- DEBUG(0,("ads_get_dnshostname: Failed to find account for %s\n",
+ DEBUG(0,("ads_has_samaccountname: Failed to find account for %s\n",
lp_netbios_name()));
goto out;
}
if ( (count = ads_count_replies(ads, res)) != 1 ) {
- DEBUG(1,("ads_get_dnshostname: %d entries returned!\n", count));
+ DEBUG(1,("ads_has_samaccountname: %d entries returned!\n", count));
goto out;
}
if ( (name = ads_pull_string(ads, ctx, res, "sAMAccountName")) == NULL ) {
- DEBUG(0,("ads_get_dnshostname: No sAMAccountName attribute!\n"));
+ DEBUG(0,("ads_has_samaccountname: No sAMAccountName attribute!\n"));
}
out:
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index d6f77d4..508bd53 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -24,7 +24,6 @@ import fcntl
import sys
import tempfile
import subprocess
-from samba.kcc import kcc_utils
# ensure we get messages out immediately, so they get in the samba logs,
# and don't get swallowed by a timeout
@@ -49,6 +48,7 @@ from samba.samdb import SamDB
from samba.dcerpc import netlogon, winbind
from samba.netcmd.dns import cmd_dns
from samba import gensec
+from samba.kcc import kcc_utils
import ldb
samba.ensure_third_party_module("dns", "dnspython")
--
Samba Shared Repository
More information about the samba-cvs
mailing list