[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Tue Nov 30 17:00:01 MST 2010
The branch, master has been updated
via 47e8cbe heimdal: fix for w2000 from lha
via 1286f53 s4-dns: catch all DNS exceptions in samba_dnsupdate
via 29c4f3f s4-smb_server Return why the ntvfs_connect() failed.
via 4ea840c s4-librpc Handle all types of GUID in the GUID() initialiser
from 2b0905a s3-waf: convert RPC_LSARPC into a subsystem.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 47e8cbe3d630bef40e2564963177e08b65102aff
Author: Andrew Tridgell <tridge at samba.org>
Date: Tue Nov 30 09:56:30 2010 +1100
heimdal: fix for w2000 from lha
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Wed Dec 1 00:59:59 CET 2010 on sn-devel-104
commit 1286f5345515bec5295497b1370db830262c3890
Author: Andrew Tridgell <tridge at samba.org>
Date: Tue Nov 30 15:23:39 2010 +1100
s4-dns: catch all DNS exceptions in samba_dnsupdate
commit 29c4f3fa61c7bea39abecbd52f7170b97a9d53d3
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Nov 30 18:04:42 2010 +1100
s4-smb_server Return why the ntvfs_connect() failed.
Andrew Bartlett
commit 4ea840c3a50557a5c084694d5d30fc3d0532f4ff
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Nov 30 15:59:04 2010 +1100
s4-librpc Handle all types of GUID in the GUID() initialiser
By taking a length-limited string, we can parse binary and string GUID
values, which is particularly useful when reading from ldb.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
source4/heimdal/lib/krb5/get_cred.c | 16 ++++++++++++++--
source4/librpc/ndr/py_misc.c | 14 +++++++++++---
source4/scripting/bin/samba_dnsupdate | 12 ++++++++----
source4/smb_server/smb2/tcon.c | 2 +-
4 files changed, 34 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/heimdal/lib/krb5/get_cred.c b/source4/heimdal/lib/krb5/get_cred.c
index 9e06770..9011821 100644
--- a/source4/heimdal/lib/krb5/get_cred.c
+++ b/source4/heimdal/lib/krb5/get_cred.c
@@ -323,10 +323,11 @@ static krb5_error_code KRB5_CALLCONV
decrypt_tkt_with_subkey (krb5_context context,
krb5_keyblock *key,
krb5_key_usage usage,
- krb5_const_pointer subkey,
+ krb5_const_pointer skey,
krb5_kdc_rep *dec_rep)
{
- krb5_error_code ret;
+ const krb5_keyblock *subkey = skey;
+ krb5_error_code ret = 0;
krb5_data data;
size_t size;
krb5_crypto crypto;
@@ -345,6 +346,17 @@ decrypt_tkt_with_subkey (krb5_context context,
KRB5_KU_TGS_REP_ENC_PART_SUB_KEY,
&dec_rep->kdc_rep.enc_part,
&data);
+ /*
+ * If the is Windows 2000 DC, we need to retry with key usage
+ * 8 when doing ARCFOUR.
+ */
+ if (ret && subkey->keytype == ETYPE_ARCFOUR_HMAC_MD5) {
+ ret = krb5_decrypt_EncryptedData(context,
+ crypto,
+ 8,
+ &dec_rep->kdc_rep.enc_part,
+ &data);
+ }
krb5_crypto_destroy(context, crypto);
}
if (subkey == NULL || ret) {
diff --git a/source4/librpc/ndr/py_misc.c b/source4/librpc/ndr/py_misc.c
index 5d5b881..184029b 100644
--- a/source4/librpc/ndr/py_misc.c
+++ b/source4/librpc/ndr/py_misc.c
@@ -61,16 +61,24 @@ static PyObject *py_GUID_repr(PyObject *py_self)
static int py_GUID_init(PyObject *self, PyObject *args, PyObject *kwargs)
{
- char *str = NULL;
+ PyObject *str = NULL;
NTSTATUS status;
struct GUID *guid = py_talloc_get_ptr(self);
const char *kwnames[] = { "str", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", discard_const_p(char *, kwnames), &str))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", discard_const_p(char *, kwnames), &str))
return -1;
if (str != NULL) {
- status = GUID_from_string(str, guid);
+ DATA_BLOB guid_val;
+
+ if (!PyString_Check(str)) {
+ PyErr_SetString(PyExc_TypeError, "Expected a string argument to GUID()");
+ return -1;
+ }
+ guid_val.data = (uint8_t *)PyString_AsString(str);
+ guid_val.length = PyString_Size(str);
+ status = GUID_from_data_blob(&guid_val, guid);
if (!NT_STATUS_IS_OK(status)) {
PyErr_SetNTSTATUS(status);
return -1;
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 8f04895..faba124 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -46,7 +46,8 @@ from samba.samdb import SamDB
from samba.dcerpc import netlogon, winbind
samba.ensure_external_module("dns", "dnspython")
-import dns.resolver as resolver
+import dns.resolver
+import dns.exception
default_ttl = 900
am_rodc = False
@@ -172,8 +173,10 @@ def check_dns_name(d):
return False
try:
- ans = resolver.query(normalised_name, d.type)
- except resolver.NXDOMAIN:
+ ans = dns.resolver.query(normalised_name, d.type)
+ except dns.exception.DNSException:
+ if opts.verbose:
+ print "Failed to find DNS entry %s" % d
return False
if d.type == 'A':
# we need to be sure that our IP is there
@@ -194,8 +197,9 @@ def check_dns_name(d):
else:
d.existing_port = str(rdata.port)
d.existing_weight = str(rdata.weight)
+
if opts.verbose:
- print "Failed to find DNS entry %s" % d
+ print "Failed to find matching DNS entry %s" % d
return False
diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c
index 4247ef8..0dac29c 100644
--- a/source4/smb_server/smb2/tcon.c
+++ b/source4/smb_server/smb2/tcon.c
@@ -345,7 +345,7 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, union smb_tcon
/* Invoke NTVFS connection hook */
status = ntvfs_connect(req->ntvfs, io);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("smb2srv_tcon_backend: NTVFS ntvfs_connect() failed!\n"));
+ DEBUG(0,("smb2srv_tcon_backend: NTVFS ntvfs_connect() failed: %s!\n", nt_errstr(status)));
goto failed;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list