[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Thu Feb 11 07:09:01 MST 2010
The branch, master has been updated
via 45defdb... s4-provision: import the R2 functional level
via 960fab4... s4-build: avoid finding python symlinks
via 4aaa7fe... s4-provision: fixed --function-level option to provision
via 802f6b7... s4-script: make enablerecyclebin use system_session
via 9ba0d10... s4-pyldb: null terminate string ldb message elements from python
via 76a2e93... libds: added recyclebin feature GUID
from 2a0b16c... s3: re-run make samba3-idl.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 45defdb90c93ed9876cacb8e3b77ce024bd02590
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Feb 12 00:33:13 2010 +1100
s4-provision: import the R2 functional level
this makes it easier to modify the script to set us at R2 level in
provision. We should make this a parameter.
commit 960fab4bba9b52aacba46de5895afaf908f002df
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Feb 12 00:11:11 2010 +1100
s4-build: avoid finding python symlinks
emacs creates symlinks to .py files while you are editing them. This
could cause build failures.
commit 4aaa7fe43b207abab886b6ba3e1895a42162480c
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Feb 11 23:39:56 2010 +1100
s4-provision: fixed --function-level option to provision
we need the DS_DOMAIN_* levels imported
commit 802f6b71dd0c43c44ecf91ec042e7f4a08a12dec
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Feb 11 23:38:23 2010 +1100
s4-script: make enablerecyclebin use system_session
This allows it to work against our local ldb
commit 9ba0d105ccd5599987c17e2474ecfe8ac3547f1b
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Feb 11 23:37:44 2010 +1100
s4-pyldb: null terminate string ldb message elements from python
We need to eventually get rid of ldb_msg_find_attr_as_string() (or add
a mem_ctx to it), but meanwhile we have too many places that break if
we don't add a nul to the end of ldb msg strings from python.
commit 76a2e936a02ba99a474dd20822ed170787b55a45
Author: Andrew Tridgell <tridge at samba.org>
Date: Thu Feb 11 23:35:31 2010 +1100
libds: added recyclebin feature GUID
-----------------------------------------------------------------------
Summary of changes:
libds/common/flags.h | 3 +++
source4/lib/ldb/pyldb.c | 8 ++++----
source4/scripting/bin/enablerecyclebin | 3 ++-
source4/scripting/python/config.mk | 2 +-
source4/scripting/python/samba/provision.py | 2 +-
source4/setup/provision | 1 +
6 files changed, 12 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libds/common/flags.h b/libds/common/flags.h
index 40e40c3..aa88487 100644
--- a/libds/common/flags.h
+++ b/libds/common/flags.h
@@ -203,3 +203,6 @@
#define DS_GUID_PROGRAM_DATA_CONTAINER "09460C08AE1E4A4EA0F64AEE7DAA1E5A"
#define DS_GUID_SYSTEMS_CONTAINER "AB1D30F3768811D1ADED00C04FD8D5CD"
#define DS_GUID_USERS_CONTAINER "A9D1CA15768811D1ADED00C04FD8D5CD"
+
+/* wellknown GUIDs for optional directory features */
+#define DS_GUID_FEATURE_RECYCLE_BIN "766ddcd8-acd0-445e-f3b9-a7f9b6744f2a"
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index a19768d..2853732 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -1617,7 +1617,7 @@ struct ldb_message_element *PyObject_AsMessageElement(TALLOC_CTX *mem_ctx,
me->values = talloc_array(me, struct ldb_val, me->num_values);
me->values[0].length = PyString_Size(set_obj);
me->values[0].data = talloc_memdup(me,
- (uint8_t *)PyString_AsString(set_obj), me->values[0].length);
+ (uint8_t *)PyString_AsString(set_obj), me->values[0].length+1);
} else if (PySequence_Check(set_obj)) {
int i;
me->num_values = PySequence_Size(set_obj);
@@ -1627,7 +1627,7 @@ struct ldb_message_element *PyObject_AsMessageElement(TALLOC_CTX *mem_ctx,
me->values[i].length = PyString_Size(obj);
me->values[i].data = talloc_memdup(me,
- (uint8_t *)PyString_AsString(obj), me->values[i].length);
+ (uint8_t *)PyString_AsString(obj), me->values[i].length+1);
}
} else {
talloc_free(me);
@@ -1772,7 +1772,7 @@ static PyObject *py_ldb_msg_element_new(PyTypeObject *type, PyObject *args, PyOb
el->values = talloc_array(el, struct ldb_val, 1);
el->values[0].length = PyString_Size(py_elements);
el->values[0].data = talloc_memdup(el,
- (uint8_t *)PyString_AsString(py_elements), el->values[0].length);
+ (uint8_t *)PyString_AsString(py_elements), el->values[0].length+1);
} else if (PySequence_Check(py_elements)) {
el->num_values = PySequence_Size(py_elements);
el->values = talloc_array(el, struct ldb_val, el->num_values);
@@ -1787,7 +1787,7 @@ static PyObject *py_ldb_msg_element_new(PyTypeObject *type, PyObject *args, PyOb
}
el->values[i].length = PyString_Size(item);
el->values[i].data = talloc_memdup(el,
- (uint8_t *)PyString_AsString(item), el->values[i].length);
+ (uint8_t *)PyString_AsString(item), el->values[i].length+1);
}
} else {
PyErr_SetString(PyExc_TypeError,
diff --git a/source4/scripting/bin/enablerecyclebin b/source4/scripting/bin/enablerecyclebin
index d02e90b..0d39fe7 100755
--- a/source4/scripting/bin/enablerecyclebin
+++ b/source4/scripting/bin/enablerecyclebin
@@ -15,6 +15,7 @@ from samba import getopt as options, Ldb
from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError
import sys
import ldb
+from samba.auth import system_session
parser = optparse.OptionParser("enablerecyclebin <URL>")
sambaopts = options.SambaOptions(parser)
@@ -35,7 +36,7 @@ url = args[0]
lp_ctx = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp_ctx)
-sam_ldb = Ldb(url, credentials=creds, lp=lp_ctx)
+sam_ldb = Ldb(url, session_info=system_session(), credentials=creds, lp=lp_ctx)
# get the rootDSE
res = sam_ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["configurationNamingContext"])
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index 3d255de..390f6c8 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -23,7 +23,7 @@ python_glue_OBJ_FILES = $(pyscriptsrcdir)/pyglue.o
$(python_glue_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir)
-_PY_FILES = $(shell find $(pyscriptsrcdir)/samba ../lib/subunit/python -name "*.py")
+_PY_FILES = $(shell find $(pyscriptsrcdir)/samba ../lib/subunit/python -type f -name "*.py")
$(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(subst ../lib/subunit/python,,$(pyfile))),$(pyfile))))
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index f52766b..59daa25 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -42,7 +42,7 @@ import ldb
from samba.auth import system_session, admin_session
from samba import glue, version, Ldb, substitute_var, valid_netbios_name
from samba import check_all_substituted, read_and_sub_file, setup_file
-from samba import DS_DOMAIN_FUNCTION_2003, DS_DC_FUNCTION_2008
+from samba import DS_DOMAIN_FUNCTION_2003, DS_DC_FUNCTION_2008, DS_DC_FUNCTION_2008_R2
from samba.dcerpc import security
from samba.dcerpc.misc import SEC_CHAN_BDC, SEC_CHAN_WKSTA
from samba.idmap import IDmapDB
diff --git a/source4/setup/provision b/source4/setup/provision
index 1ae52d2..2b31c4c 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -36,6 +36,7 @@ from samba.credentials import DONT_USE_KERBEROS
from samba.auth import system_session
import samba.getopt as options
from samba.provision import provision, FILL_FULL, FILL_NT4SYNC, FILL_DRS, find_setup_dir
+from samba import DS_DOMAIN_FUNCTION_2003, DS_DOMAIN_FUNCTION_2008, DS_DOMAIN_FUNCTION_2008_R2
# how do we make this case insensitive??
--
Samba Shared Repository
More information about the samba-cvs
mailing list