[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Tue Feb 1 22:10:03 MST 2011
The branch, master has been updated
via f19c1e3 s4-dsdb Add tests to ensure we don't break the rootDSE function levels again
via 2e865be s4-dsdb Fix generation of rootDSE domainControllerFunctionality
via e830cb4 wintest Return debug info when dcpromo fails from the log
via a3e9935 s4-waf Don't install any Samba packages into PYTHONDIR
via dbe0b07 s4-python Remove manipuation of python path from samba module
via 7faa3be s4-python Ensure we add the Samba python path first.
via 38aacd7 waf: Replace python installation rule to allow PYTHONARCHDIR and PYTHONDIR
via 5d4dc6c s4-python Remove unused missing.py (used by old build system)
via eab493b Remove unused installmisc.sh script, from old build system
via 2d9bcc8 s4:heimdal: import lorikeet-heimdal-201101310455 (commit aa88eb1a05c4985cc23fb65fc1bad75bdce01c1f)
from 3d4a9dd Based on a conversation with Volker, refactor some of the oplock code to make it comprehensible.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f19c1e37c7d56ad9037e98067ca041a18a479e78
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Feb 2 14:51:27 2011 +1100
s4-dsdb Add tests to ensure we don't break the rootDSE function levels again
This both checks that the levels make sense, and they match what they
should be based on in the DB.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Wed Feb 2 06:09:53 CET 2011 on sn-devel-104
commit 2e865bed0aa6d28d2543ca6ad0a9c3d73c7db53f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Feb 2 14:01:35 2011 +1100
s4-dsdb Fix generation of rootDSE domainControllerFunctionality
The issue here is that when the samdb calls were removed, this call
relied on going back to the top of the module stack, so as to re-enter
the rootDSE search handler. It makes more sense to check the @ROOTDSE
record directly, and therefore not to invoke the search() handler
during the init.
Andrew Bartlett
commit e830cb48396b6b480794c5d982f0f75f025e8c14
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Feb 2 11:48:44 2011 +1100
wintest Return debug info when dcpromo fails from the log
commit a3e99356abab3fd77a87d2ac594243b3f77e3cdd
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Feb 1 16:36:10 2011 +1100
s4-waf Don't install any Samba packages into PYTHONDIR
This causes the parts of Samba installed into PYTHONARCHDIR to then be
missed in mixed python/C module namespaces.
Andrew Bartlett
commit dbe0b078492ea20da2b0aa3bb1d1c6138d16454e
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Feb 1 14:58:11 2011 +1100
s4-python Remove manipuation of python path from samba module
This manipulation should be done by top level scripts, otherwise we
won't find samba in the first place (and these can be munged correctly
for the install).
Andrew Bartlett
commit 7faa3be45359a94593d22e2bbe7eda0ddffa146c
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Feb 1 14:43:34 2011 +1100
s4-python Ensure we add the Samba python path first.
This exact form of the construction is important, and we match on it
in the installation scripts.
Andrew Bartlett
commit 38aacd7a7bc551797d8c60cc695fc4922941add9
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Feb 1 14:29:35 2011 +1100
waf: Replace python installation rule to allow PYTHONARCHDIR and PYTHONDIR
The old rule could only substitute one part of one line, but we need
to add a second line to handle when PYTHONDIR and PYTHONARCHDIR do not
match.
This also avoids shelling out to sed with a regex, which was difficult
to read.
Andrew Bartlett
commit 5d4dc6cbd5e0a77687dc279ff6d3955b2b02f9ca
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Feb 1 14:28:29 2011 +1100
s4-python Remove unused missing.py (used by old build system)
commit eab493b7ea032ed420a08a71f0ad385aca150b2b
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Feb 1 13:45:33 2011 +1100
Remove unused installmisc.sh script, from old build system
commit 2d9bcc861d6b2cd67d7c6439e90d9ac4a600f0f2
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Jan 31 15:59:06 2011 +1100
s4:heimdal: import lorikeet-heimdal-201101310455 (commit aa88eb1a05c4985cc23fb65fc1bad75bdce01c1f)
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/wafsamba.py | 30 +++++--
lib/wscript_build | 4 +-
source4/auth/credentials/tests/bind.py | 2 +-
source4/dsdb/samdb/ldb_modules/rootdse.c | 4 +-
source4/dsdb/tests/python/acl.py | 2 +-
source4/dsdb/tests/python/deletetest.py | 2 +-
source4/dsdb/tests/python/dsdb_schema_info.py | 2 +-
source4/dsdb/tests/python/ldap.py | 35 +++++++-
source4/dsdb/tests/python/ldap_schema.py | 2 +-
source4/dsdb/tests/python/ldap_syntaxes.py | 2 +-
source4/dsdb/tests/python/passwords.py | 2 +-
source4/dsdb/tests/python/sam.py | 2 +-
source4/dsdb/tests/python/sec_descriptor.py | 2 +-
source4/dsdb/tests/python/token_group.py | 2 +-
source4/dsdb/tests/python/urgent_replication.py | 2 +-
source4/heimdal/base/baselocl.h | 5 -
source4/heimdal/base/heimbase.c | 2 -
source4/heimdal/base/heimbase.h | 1 -
source4/heimdal/base/string.c | 33 +-------
source4/heimdal/base/version-script.map | 2 +-
source4/heimdal/kdc/version-script.map | 4 +
source4/heimdal/lib/com_err/lex.c | 4 +-
source4/heimdal/lib/com_err/lex.h | 2 +-
source4/heimdal/lib/com_err/lex.l | 4 +-
source4/heimdal/lib/com_err/parse.c | 2 +-
source4/heimdal/lib/com_err/parse.y | 2 +-
source4/heimdal/lib/gssapi/gssapi/gssapi.h | 9 +-
source4/heimdal/lib/gssapi/krb5/cfx.c | 8 +-
source4/heimdal/lib/gssapi/mech/context.c | 6 +-
source4/heimdal/lib/gssapi/mech/cred.h | 4 +-
.../lib/gssapi/mech/gss_accept_sec_context.c | 6 +-
source4/heimdal/lib/gssapi/mech/gss_acquire_cred.c | 6 +-
source4/heimdal/lib/gssapi/mech/gss_add_cred.c | 8 +-
source4/heimdal/lib/gssapi/mech/gss_aeap.c | 6 +-
.../lib/gssapi/mech/gss_canonicalize_name.c | 4 +-
source4/heimdal/lib/gssapi/mech/gss_compare_name.c | 2 +-
source4/heimdal/lib/gssapi/mech/gss_cred.c | 10 +-
source4/heimdal/lib/gssapi/mech/gss_display_name.c | 2 +-
.../heimdal/lib/gssapi/mech/gss_duplicate_name.c | 8 +-
source4/heimdal/lib/gssapi/mech/gss_export_name.c | 2 +-
source4/heimdal/lib/gssapi/mech/gss_import_name.c | 8 +-
.../heimdal/lib/gssapi/mech/gss_indicate_mechs.c | 2 +-
.../heimdal/lib/gssapi/mech/gss_init_sec_context.c | 2 +-
source4/heimdal/lib/gssapi/mech/gss_inquire_cred.c | 10 +-
.../lib/gssapi/mech/gss_inquire_cred_by_mech.c | 2 +-
.../lib/gssapi/mech/gss_inquire_cred_by_oid.c | 2 +-
.../lib/gssapi/mech/gss_inquire_mechs_for_name.c | 2 +-
source4/heimdal/lib/gssapi/mech/gss_krb5.c | 16 ++--
source4/heimdal/lib/gssapi/mech/gss_mech_switch.c | 16 ++-
source4/heimdal/lib/gssapi/mech/gss_mo.c | 6 +-
source4/heimdal/lib/gssapi/mech/gss_names.c | 8 +-
source4/heimdal/lib/gssapi/mech/gss_release_cred.c | 6 +-
source4/heimdal/lib/gssapi/mech/gss_release_name.c | 6 +-
.../heimdal/lib/gssapi/mech/gss_set_cred_option.c | 8 +-
source4/heimdal/lib/gssapi/mech/mech_switch.h | 4 +-
source4/heimdal/lib/gssapi/mech/mechqueue.h | 30 +++----
source4/heimdal/lib/gssapi/mech/name.h | 4 +-
source4/heimdal/lib/hdb/hdb.h | 2 +
source4/heimdal/lib/hx509/crypto.c | 8 +-
source4/heimdal/lib/hx509/hx509.h | 1 +
source4/heimdal/lib/hx509/hx_locl.h | 1 -
source4/heimdal/lib/hx509/version-script.map | 6 +
source4/heimdal/lib/krb5/config_file.c | 7 +-
source4/heimdal/lib/krb5/crypto-algs.c | 4 +-
source4/heimdal/lib/krb5/keytab.c | 41 ++++++--
source4/heimdal/lib/krb5/keytab_any.c | 2 +-
source4/heimdal/lib/krb5/pkinit.c | 14 +++
source4/heimdal/lib/roken/roken-common.h | 9 +--
source4/heimdal/lib/roken/roken.h.in | 8 ++-
source4/librpc/wscript_build | 2 +-
source4/script/installmisc.sh | 98 --------------------
source4/scripting/devel/speedtest.py | 2 +-
source4/scripting/python/samba/__init__.py | 3 +-
source4/scripting/python/samba_external/missing.py | 17 ----
source4/scripting/python/wscript_build | 2 +-
source4/torture/drs/python/delete_object.py | 2 +-
source4/torture/drs/python/fsmo.py | 2 +-
source4/torture/drs/python/repl_schema.py | 2 +-
wintest/test-s4-howto.py | 12 ++-
79 files changed, 283 insertions(+), 331 deletions(-)
delete mode 100755 source4/script/installmisc.sh
delete mode 100755 source4/scripting/python/samba_external/missing.py
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 050777f..dcf7198 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -621,6 +621,28 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
+def copy_and_fix_python_path(task):
+ pattern='sys.path.insert(0, "bin/python")'
+ if task.env["PYTHONARCHDIR"] in sys.path and task.env["PYTHONDIR"] in sys.path:
+ replacement = ""
+ elif task.env["PYTHONARCHDIR"] == task.env["PYTHONDIR"]:
+ replacement="""sys.path.insert(0, "%s")""" % task.env["PYTHONDIR"]
+ else:
+ replacement="""sys.path.insert(0, "%s")
+sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"])
+
+ installed_location=task.outputs[0].bldpath(task.env)
+ source_file = open(task.inputs[0].srcpath(task.env))
+ installed_file = open(installed_location, 'w')
+ for line in source_file:
+ newline = line
+ if pattern in line:
+ newline = line.replace(pattern, replacement)
+ installed_file.write(newline)
+ installed_file.close()
+ os.chmod(installed_location, 0755)
+ return 0
+
def install_file(bld, destdir, file, chmod=MODE_644, flat=False,
python_fixup=False, destname=None, base_name=None):
@@ -634,14 +656,8 @@ def install_file(bld, destdir, file, chmod=MODE_644, flat=False,
if python_fixup:
# fixup the python path it will use to find Samba modules
inst_file = file + '.inst'
- if bld.env["PYTHONARCHDIR"] not in sys.path:
- regex = "s|\(sys.path.insert.*\)bin/python\(.*\)$|\\1${PYTHONARCHDIR}\\2|g"
- else:
- # Eliminate updating sys.path if the target python dir is already
- # in python path.
- regex = "s|sys.path.insert.*bin/python.*$||g"
bld.SAMBA_GENERATOR('python_%s' % destname,
- rule="sed '%s' < ${SRC} > ${TGT}" % regex,
+ rule=copy_and_fix_python_path,
source=file,
target=inst_file)
file = inst_file
diff --git a/lib/wscript_build b/lib/wscript_build
index bc9d5ed..9ce832a 100644
--- a/lib/wscript_build
+++ b/lib/wscript_build
@@ -17,14 +17,14 @@ for module, package in external_libs.items():
list.append(package)
for e in list:
- bld.INSTALL_WILDCARD('${PYTHONDIR}/samba/external', e + '/**/*', flat=False,
+ bld.INSTALL_WILDCARD('${PYTHONARCHDIR}/samba/external', e + '/**/*', flat=False,
exclude='*.pyc', trim_path=os.path.dirname(e))
bld.SAMBA_GENERATOR('external_init_py',
rule='touch ${TGT}',
target='empty_file')
-bld.INSTALL_FILES('${PYTHONDIR}/samba/external', 'empty_file', destname='__init__.py')
+bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/external', 'empty_file', destname='__init__.py')
# a grouping library for event and socket related subsystems
bld.SAMBA_LIBRARY('samba-sockets',
diff --git a/source4/auth/credentials/tests/bind.py b/source4/auth/credentials/tests/bind.py
index a10c919..1529a47 100755
--- a/source4/auth/credentials/tests/bind.py
+++ b/source4/auth/credentials/tests/bind.py
@@ -10,7 +10,7 @@ import os
import copy
import time
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 007af57..c5486b5 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -846,8 +846,10 @@ static int rootdse_init(struct ldb_module *module)
}
}
+ /* For now, our own server's location in the DB is recorded in
+ * the @ROOTDSE record */
ret = dsdb_module_search(module, mem_ctx, &res,
- ldb_dn_new(mem_ctx, ldb, ""),
+ ldb_dn_new(mem_ctx, ldb, "@ROOTDSE"),
LDB_SCOPE_BASE, ds_attrs, DSDB_FLAG_NEXT_MODULE, NULL, NULL);
if (ret == LDB_SUCCESS && res->count == 1) {
struct ldb_dn *ds_dn
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index d2c4116..2902f25 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -6,7 +6,7 @@ import optparse
import sys
import base64
import re
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/deletetest.py b/source4/dsdb/tests/python/deletetest.py
index 9125795..80c6937 100755
--- a/source4/dsdb/tests/python/deletetest.py
+++ b/source4/dsdb/tests/python/deletetest.py
@@ -5,7 +5,7 @@ import optparse
import sys
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/dsdb_schema_info.py b/source4/dsdb/tests/python/dsdb_schema_info.py
index dc82fe0..28fce1b 100755
--- a/source4/dsdb/tests/python/dsdb_schema_info.py
+++ b/source4/dsdb/tests/python/dsdb_schema_info.py
@@ -29,7 +29,7 @@ import sys
import time
import random
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 902dfb7..d67ccc4 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -8,7 +8,7 @@ import time
import base64
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
@@ -2641,6 +2641,39 @@ class BaseDnTests(unittest.TestCase):
self.assertTrue("CN=Sites" in res[0]["serverName"][0])
self.assertFalse("CN=NTDS Settings" in res[0]["serverName"][0])
+ def test_functionality(self):
+ """Testing the server paths in rootDSE"""
+ res = self.ldb.search("", scope=SCOPE_BASE,
+ attrs=["forestFunctionality", "domainFunctionality", "domainControllerFunctionality"])
+ self.assertEquals(len(res), 1)
+ self.assertEquals(len(res[0]["forestFunctionality"]), 1)
+ self.assertEquals(len(res[0]["domainFunctionality"]), 1)
+ self.assertEquals(len(res[0]["domainControllerFunctionality"]), 1)
+
+ self.assertTrue(int(res[0]["forestFunctionality"][0]) <= int(res[0]["domainFunctionality"][0]))
+ self.assertTrue(int(res[0]["domainControllerFunctionality"][0]) >= int(res[0]["domainFunctionality"][0]))
+
+ res2 = self.ldb.search("", scope=SCOPE_BASE,
+ attrs=["dsServiceName", "serverName"])
+ self.assertEquals(len(res2), 1)
+ self.assertEquals(len(res2[0]["dsServiceName"]), 1)
+
+ res3 = self.ldb.search(res2[0]["dsServiceName"][0], scope=SCOPE_BASE, attrs=["msDS-Behavior-Version"])
+ self.assertEquals(len(res3), 1)
+ print res3[0]
+ self.assertEquals(len(res3[0]["msDS-Behavior-Version"]), 1)
+ self.assertEquals(int(res[0]["domainControllerFunctionality"][0]), int(res3[0]["msDS-Behavior-Version"][0]))
+
+ res4 = self.ldb.search(ldb.domain_dn(), scope=SCOPE_BASE, attrs=["msDS-Behavior-Version"])
+ self.assertEquals(len(res4), 1)
+ self.assertEquals(len(res4[0]["msDS-Behavior-Version"]), 1)
+ self.assertEquals(int(res[0]["domainFunctionality"][0]), int(res4[0]["msDS-Behavior-Version"][0]))
+
+ res5 = self.ldb.search("cn=partitions," + str(ldb.get_config_basedn()), scope=SCOPE_BASE, attrs=["msDS-Behavior-Version"])
+ self.assertEquals(len(res5), 1)
+ self.assertEquals(len(res5[0]["msDS-Behavior-Version"]), 1)
+ self.assertEquals(int(res[0]["forestFunctionality"][0]), int(res5[0]["msDS-Behavior-Version"][0]))
+
def test_dnsHostname(self):
"""Testing the DNS hostname in rootDSE"""
res = self.ldb.search("", scope=SCOPE_BASE,
diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py
index 3dcbb72..a6503e2 100755
--- a/source4/dsdb/tests/python/ldap_schema.py
+++ b/source4/dsdb/tests/python/ldap_schema.py
@@ -8,7 +8,7 @@ import time
import random
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/ldap_syntaxes.py b/source4/dsdb/tests/python/ldap_syntaxes.py
index 04b95d7..64e0c42 100644
--- a/source4/dsdb/tests/python/ldap_syntaxes.py
+++ b/source4/dsdb/tests/python/ldap_syntaxes.py
@@ -8,7 +8,7 @@ import time
import random
import uuid
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index 70bca93..0db5e8c 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -14,7 +14,7 @@ import base64
import time
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index 69dd757..a623ebc 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -6,7 +6,7 @@ import optparse
import sys
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index de71dae..2db33ae 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -8,7 +8,7 @@ import base64
import re
import random
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/token_group.py b/source4/dsdb/tests/python/token_group.py
index e3ffbac..62bdbd5 100755
--- a/source4/dsdb/tests/python/token_group.py
+++ b/source4/dsdb/tests/python/token_group.py
@@ -6,7 +6,7 @@ import optparse
import sys
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py
index bf92d0a..3759c82 100755
--- a/source4/dsdb/tests/python/urgent_replication.py
+++ b/source4/dsdb/tests/python/urgent_replication.py
@@ -5,7 +5,7 @@ import optparse
import sys
import os
-sys.path.append("bin/python")
+sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
diff --git a/source4/heimdal/base/baselocl.h b/source4/heimdal/base/baselocl.h
index 5f15726..b3c81b9 100644
--- a/source4/heimdal/base/baselocl.h
+++ b/source4/heimdal/base/baselocl.h
@@ -106,11 +106,6 @@ heim_base_atomic_dec(heim_base_atomic_type *x)
/* tagged strings/object/XXX */
#define heim_base_is_tagged(x) (((uintptr_t)(x)) & 0x3)
-#define heim_base_is_tagged_string(x) ((((uintptr_t)(x)) & 0x3) == 2)
-#define heim_base_make_tagged_string_ptr(x) ((heim_object_t)(((uintptr_t)(x)) | 2))
-#define heim_base_tagged_string_ptr(x) ((char *)(((uintptr_t)(x)) & (~3)))
-
-
#define heim_base_is_tagged_object(x) ((((uintptr_t)(x)) & 0x3) == 1)
#define heim_base_make_tagged_object(x, tid) \
((heim_object_t)((((uintptr_t)(x)) << 5) | ((tid) << 2) | 0x1))
diff --git a/source4/heimdal/base/heimbase.c b/source4/heimdal/base/heimbase.c
index b8d5d74..7031af9 100644
--- a/source4/heimdal/base/heimbase.c
+++ b/source4/heimdal/base/heimbase.c
@@ -159,8 +159,6 @@ _heim_get_isa(heim_object_t ptr)
if (heim_base_is_tagged(ptr)) {
if (heim_base_is_tagged_object(ptr))
return tagged_isa[heim_base_tagged_object_tid(ptr)];
- if (heim_base_is_tagged_string(ptr))
- return &_heim_string_object;
heim_abort("not a supported tagged type");
}
p = PTR2BASE(ptr);
diff --git a/source4/heimdal/base/heimbase.h b/source4/heimdal/base/heimbase.h
index 17eb12e..d1ca5aa 100644
--- a/source4/heimdal/base/heimbase.h
+++ b/source4/heimdal/base/heimbase.h
@@ -146,7 +146,6 @@ void heim_dict_delete_key(heim_dict_t, heim_object_t);
typedef struct heim_string_data *heim_string_t;
heim_string_t heim_string_create(const char *);
-heim_string_t heim_string_create_with_static(const char *);
heim_tid_t heim_string_get_type_id(void);
const char * heim_string_get_utf8(heim_string_t);
diff --git a/source4/heimdal/base/string.c b/source4/heimdal/base/string.c
index 414a916..11e8841 100644
--- a/source4/heimdal/base/string.c
+++ b/source4/heimdal/base/string.c
@@ -44,31 +44,20 @@ string_dealloc(void *ptr)
static int
string_cmp(void *a, void *b)
{
- if (heim_base_is_tagged_string(a))
- a = heim_base_tagged_string_ptr(a);
- if (heim_base_is_tagged_string(b))
- b = heim_base_tagged_string_ptr(b);
-
return strcmp(a, b);
}
static unsigned long
string_hash(void *ptr)
{
- const char *s;
+ const char *s = ptr;
unsigned long n;
- if (heim_base_is_tagged_string(ptr))
- s = heim_base_tagged_string_ptr(ptr);
- else
- s = ptr;
-
for (n = 0; *s; ++s)
n += *s;
return n;
}
-
struct heim_type_data _heim_string_object = {
HEIM_TID_STRING,
"string-object",
@@ -100,26 +89,6 @@ heim_string_create(const char *string)
}
/**
- * Create a string object from a strings allocated in the text segment.
- *
- * Note that static string object wont be auto released with
- * heim_auto_release(), the allocation policy of the string must
- * be manged separately from the returned object. This make this
- * function not very useful for strings in allocated from heap or
- * stack. In that case you should use heim_string_create().
- *
- * @param string the string to create, must be an utf8 string
- *
- * @return string object
- */
-
-heim_string_t
-heim_string_create_with_static(const char *string)
-{
- return heim_base_make_tagged_string_ptr(string);
-}
-
-/**
* Return the type ID of string objects
*
* @return type id of string objects
diff --git a/source4/heimdal/base/version-script.map b/source4/heimdal/base/version-script.map
index 9886943..007052b 100644
--- a/source4/heimdal/base/version-script.map
+++ b/source4/heimdal/base/version-script.map
@@ -12,6 +12,7 @@ HEIMDAL_BASE_1.0 {
heim_auto_release_create;
heim_auto_release_drain;
heim_base_once_f;
+ heim_cmp;
heim_dict_add_value;
heim_dict_copy_value;
heim_dict_create;
@@ -22,7 +23,6 @@ HEIMDAL_BASE_1.0 {
heim_string_create;
heim_string_get_utf8;
heim_number_create;
- heim_string_create_with_static;
local:
*;
};
diff --git a/source4/heimdal/kdc/version-script.map b/source4/heimdal/kdc/version-script.map
index 8234ee2..ae16f39 100644
--- a/source4/heimdal/kdc/version-script.map
+++ b/source4/heimdal/kdc/version-script.map
@@ -16,6 +16,10 @@ HEIMDAL_KDC_1.0 {
krb5_kdc_save_request;
krb5_kdc_update_time;
krb5_kdc_pk_initialize;
+
+ # needed for digest-service
+ _kdc_db_fetch;
+ _kdc_free_ent;
local:
*;
};
diff --git a/source4/heimdal/lib/com_err/lex.c b/source4/heimdal/lib/com_err/lex.c
index f107bba..9a61f59 100644
--- a/source4/heimdal/lib/com_err/lex.c
+++ b/source4/heimdal/lib/com_err/lex.c
@@ -1860,7 +1860,7 @@ getstring(void)
continue;
}
if(c == '\n'){
- lex_error_message("unterminated string");
+ _lex_error_message("unterminated string");
lineno++;
break;
}
@@ -1880,7 +1880,7 @@ getstring(void)
}
void
-lex_error_message (const char *format, ...)
+_lex_error_message (const char *format, ...)
{
va_list args;
diff --git a/source4/heimdal/lib/com_err/lex.h b/source4/heimdal/lib/com_err/lex.h
index 6c9be77..e158816 100644
--- a/source4/heimdal/lib/com_err/lex.h
+++ b/source4/heimdal/lib/com_err/lex.h
@@ -33,7 +33,7 @@
/* $Id$ */
-void lex_error_message (const char *, ...)
+void _lex_error_message (const char *, ...)
__attribute__ ((format (printf, 1, 2)));
int yylex(void);
diff --git a/source4/heimdal/lib/com_err/lex.l b/source4/heimdal/lib/com_err/lex.l
index ac660a1..eb39e0c 100644
--- a/source4/heimdal/lib/com_err/lex.l
+++ b/source4/heimdal/lib/com_err/lex.l
@@ -95,7 +95,7 @@ getstring(void)
continue;
}
if(c == '\n'){
- lex_error_message("unterminated string");
+ _lex_error_message("unterminated string");
lineno++;
break;
}
@@ -115,7 +115,7 @@ getstring(void)
}
void
-lex_error_message (const char *format, ...)
+_lex_error_message (const char *format, ...)
{
va_list args;
diff --git a/source4/heimdal/lib/com_err/parse.c b/source4/heimdal/lib/com_err/parse.c
index b2b0fc1..a97c56f 100644
--- a/source4/heimdal/lib/com_err/parse.c
+++ b/source4/heimdal/lib/com_err/parse.c
@@ -291,7 +291,7 @@ name2number(const char *str)
void
yyerror (char *s)
{
- lex_error_message ("%s\n", s);
+ _lex_error_message ("%s\n", s);
}
#line 296 ""
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
diff --git a/source4/heimdal/lib/com_err/parse.y b/source4/heimdal/lib/com_err/parse.y
index f628e88..194965c 100644
--- a/source4/heimdal/lib/com_err/parse.y
+++ b/source4/heimdal/lib/com_err/parse.y
@@ -170,5 +170,5 @@ name2number(const char *str)
void
yyerror (char *s)
{
--
Samba Shared Repository
More information about the samba-cvs
mailing list