[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-143-g8ee0cc2
Andrew Bartlett
abartlet at samba.org
Wed Mar 4 03:13:58 GMT 2009
The branch, master has been updated
via 8ee0cc24b8302097bccae7891cb6f9c0547a1815 (commit)
via 52542e1affbaad3a29d913ced06f6c5ae0d7b4ad (commit)
via 952bdffaadebe8fc147c69da160ddd83e1d03245 (commit)
via 44c94b6c66b00807d58233550cf8915566cb97d0 (commit)
from ef89c4bc0db2e9ba48f4dac1fd381e4cc6c8ca7d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8ee0cc24b8302097bccae7891cb6f9c0547a1815
Merge: 52542e1affbaad3a29d913ced06f6c5ae0d7b4ad ef89c4bc0db2e9ba48f4dac1fd381e4cc6c8ca7d
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 4 14:10:41 2009 +1100
Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel
commit 52542e1affbaad3a29d913ced06f6c5ae0d7b4ad
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 4 14:06:11 2009 +1100
Pull in all the schema information during DRS schema fetch
This includes things such as allowed attributes, which were not
populated into the schema structure before.
Andrew Bartlett
commit 952bdffaadebe8fc147c69da160ddd83e1d03245
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 4 14:02:35 2009 +1100
Don't print the admin password if we don't set one.
For example, if we don't create the admin user (perhaps expecting
users to be in LDAP already, or we are due an incoming replication) we
should not confuse the administrator by printing a unused password.
Andrew Bartlett
commit 44c94b6c66b00807d58233550cf8915566cb97d0
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Mar 4 13:58:07 2009 +1100
Allow 'net vampire' to work without an existing smb.conf
Now the provision can generate one based on the detected settings from
the target domain.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/schema/schema_init.c | 47 +++++++++++++++++++++-----
source4/param/provision.c | 8 +++-
source4/param/util.c | 2 +-
source4/scripting/python/samba/provision.py | 3 +-
4 files changed, 47 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index fbd8946..a67aecd 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -1202,6 +1202,34 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
} \
} while (0)
+#define GET_STRING_LIST_DS(s, r, attr, mem_ctx, p, elem, strict) do { \
+ int get_string_list_counter; \
+ struct drsuapi_DsReplicaAttribute *_a; \
+ _a = dsdb_find_object_attr_name(s, r, attr, NULL); \
+ if (strict && !_a) { \
+ d_printf("%s: %s == NULL\n", __location__, attr); \
+ return WERR_INVALID_PARAM; \
+ } \
+ (p)->elem = _a ? talloc_array(mem_ctx, const char *, _a->value_ctr.num_values + 1) : NULL; \
+ for (get_string_list_counter=0; \
+ _a && get_string_list_counter < _a->value_ctr.num_values; \
+ get_string_list_counter++) { \
+ size_t _ret; \
+ if (!convert_string_talloc_convenience(mem_ctx, s->iconv_convenience, CH_UTF16, CH_UNIX, \
+ _a->value_ctr.values[get_string_list_counter].blob->data, \
+ _a->value_ctr.values[get_string_list_counter].blob->length, \
+ (void **)discard_const(&(p)->elem[get_string_list_counter]), &_ret, false)) { \
+ DEBUG(0,("%s: invalid data!\n", attr)); \
+ dump_data(0, \
+ _a->value_ctr.values[get_string_list_counter].blob->data, \
+ _a->value_ctr.values[get_string_list_counter].blob->length); \
+ return WERR_FOOBAR; \
+ } \
+ (p)->elem[get_string_list_counter+1] = NULL; \
+ } \
+ talloc_steal(mem_ctx, (p)->elem); \
+} while (0)
+
#define GET_DN_DS(s, r, attr, mem_ctx, p, elem, strict) do { \
struct drsuapi_DsReplicaAttribute *_a; \
_a = dsdb_find_object_attr_name(s, r, attr, NULL); \
@@ -1412,17 +1440,18 @@ WERROR dsdb_class_from_drsuapi(struct dsdb_schema *schema,
GET_STRING_DS(schema, r, "subClassOf", mem_ctx, obj, subClassOf, true);
- obj->systemAuxiliaryClass = NULL;
- obj->systemPossSuperiors = NULL;
- obj->systemMustContain = NULL;
- obj->systemMayContain = NULL;
- obj->auxiliaryClass = NULL;
- obj->possSuperiors = NULL;
- obj->mustContain = NULL;
- obj->mayContain = NULL;
+ GET_STRING_LIST_DS(schema, r, "systemAuxiliaryClass", mem_ctx, obj, systemAuxiliaryClass, false);
+ GET_STRING_LIST_DS(schema, r, "auxiliaryClass", mem_ctx, obj, auxiliaryClass, false);
+
+ GET_STRING_LIST_DS(schema, r, "systemMustContain", mem_ctx, obj, systemMustContain, false);
+ GET_STRING_LIST_DS(schema, r, "systemMayContain", mem_ctx, obj, systemMayContain, false);
+ GET_STRING_LIST_DS(schema, r, "mustContain", mem_ctx, obj, mustContain, false);
+ GET_STRING_LIST_DS(schema, r, "mayContain", mem_ctx, obj, mayContain, false);
- obj->possibleInferiors = NULL;
+ GET_STRING_LIST_DS(schema, r, "systemPossSuperiors", mem_ctx, obj, systemPossSuperiors, false);
+ GET_STRING_LIST_DS(schema, r, "possSuperiors", mem_ctx, obj, possSuperiors, false);
+ GET_STRING_LIST_DS(schema, r, "possibleInferiors", mem_ctx, obj, possibleInferiors, false);
GET_STRING_DS(schema, r, "defaultSecurityDescriptor", mem_ctx, obj, defaultSecurityDescriptor, false);
diff --git a/source4/param/provision.c b/source4/param/provision.c
index 7a06f77..c8bff59 100644
--- a/source4/param/provision.c
+++ b/source4/param/provision.c
@@ -34,6 +34,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
struct provision_settings *settings,
struct provision_result *result)
{
+ char *configfile;
PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters;
DEBUG(0,("Provision for Become-DC test using python\n"));
@@ -76,8 +77,11 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
settings->targetdir));
parameters = PyDict_New();
- PyDict_SetItemString(parameters, "smbconf",
- PyString_FromString(lp_configfile(lp_ctx)));
+ configfile = lp_configfile(lp_ctx);
+ if (configfile != NULL) {
+ PyDict_SetItemString(parameters, "smbconf",
+ PyString_FromString(configfile));
+ }
PyDict_SetItemString(parameters, "rootdn",
PyString_FromString(settings->root_dn_str));
diff --git a/source4/param/util.c b/source4/param/util.c
index 92728d5..3881107 100644
--- a/source4/param/util.c
+++ b/source4/param/util.c
@@ -107,7 +107,7 @@ char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
char *fname, *config_dir, *p;
config_dir = talloc_strdup(mem_ctx, lp_configfile(lp_ctx));
if (config_dir == NULL) {
- return NULL;
+ config_dir = talloc_strdup(mem_ctx, lp_default_path());
}
p = strrchr(config_dir, '/');
if (p == NULL) {
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 0aa84ec..d968576 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1136,7 +1136,8 @@ def provision(setup_dir, message, session_info,
message("NetBIOS Domain: %s" % names.domain)
message("DNS Domain: %s" % names.dnsdomain)
message("DOMAIN SID: %s" % str(domainsid))
- message("Admin password: %s" % adminpass)
+ if samdb_fill == FILL_FULL:
+ message("Admin password: %s" % adminpass)
result = ProvisionResult()
result.domaindn = domaindn
--
Samba Shared Repository
More information about the samba-cvs
mailing list