[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-406-gc2055de
Matthias Dieter Wallnöfer
mdw at samba.org
Thu Sep 17 11:27:40 MDT 2009
The branch, master has been updated
via c2055de162b154efb1aef0d2977f860a01ffdbbc (commit)
from 813f9dacbd5a740fdc77f54afd2e13177f9e444f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c2055de162b154efb1aef0d2977f860a01ffdbbc
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Thu Sep 17 18:37:46 2009 +0200
s4:descriptor module - Revert and const fixups
- Revert a change introduced by me since I didn't understood the meaning of the
version check
- Added some "const" to suppress compiler warnings
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/samdb/ldb_modules/descriptor.c | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index e6fb856..e74a93c 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -49,15 +49,15 @@ struct descriptor_context {
int (*step_fn)(struct descriptor_context *);
};
-static struct dsdb_class * get_last_structural_class(const struct dsdb_schema *schema, struct ldb_message_element *element)
+static const struct dsdb_class * get_last_structural_class(const struct dsdb_schema *schema, struct ldb_message_element *element)
{
- struct dsdb_class *last_class = NULL;
+ const struct dsdb_class *last_class = NULL;
int i;
for (i = 0; i < element->num_values; i++){
if (!last_class)
last_class = dsdb_class_by_lDAPDisplayName_ldb_val(schema, &element->values[i]);
else {
- struct dsdb_class *tmp_class = dsdb_class_by_lDAPDisplayName_ldb_val(schema, &element->values[i]);
+ const struct dsdb_class *tmp_class = dsdb_class_by_lDAPDisplayName_ldb_val(schema, &element->values[i]);
if (tmp_class->subClass_order > last_class->subClass_order)
last_class = tmp_class;
}
@@ -134,14 +134,24 @@ static struct dom_sid *get_default_group(TALLOC_CTX *mem_ctx,
struct ldb_context *ldb,
struct dom_sid *dag)
{
- return dag;
+ int *domainFunctionality;
+
+ domainFunctionality = talloc_get_type(
+ ldb_get_opaque(ldb, "domainFunctionality"), int);
+
+ if (*domainFunctionality
+ && (*domainFunctionality >= DS_DOMAIN_FUNCTION_2008)) {
+ return dag;
+ }
+
+ return NULL;
}
static DATA_BLOB *get_new_descriptor(struct ldb_module *module,
struct ldb_dn *dn,
TALLOC_CTX *mem_ctx,
const struct dsdb_class *objectclass,
- struct ldb_val *parent,
+ const struct ldb_val *parent,
struct ldb_val *object)
{
struct security_descriptor *user_descriptor = NULL, *parent_descriptor = NULL;
@@ -316,9 +326,10 @@ static int descriptor_do_add(struct descriptor_context *ac)
struct ldb_message *msg;
TALLOC_CTX *mem_ctx;
int ret;
- struct ldb_val *sd_val = NULL, *parentsd_val = NULL;
+ struct ldb_val *sd_val = NULL;
+ const struct ldb_val *parentsd_val = NULL;
DATA_BLOB *sd;
- struct dsdb_class *objectclass;
+ const struct dsdb_class *objectclass;
ldb = ldb_module_get_ctx(ac->module);
schema = dsdb_get_schema(ldb);
--
Samba Shared Repository
More information about the samba-cvs
mailing list