[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Fri Mar 4 15:57:02 MST 2011
The branch, master has been updated
via eade61a s4:operational LDB module - fix attribute names to be right up/down-cased
via 5a722f1 s4:ldap.py - rootdse tests should search for the rootDSE not the default DN
via 71df279 s4:ldap.py - add a test in order to show the operational module fixed
via 05d1d0d s4:operational LDB module - fix display of some constructed attributes
via 5a98979 s4:operational LDB module - add "groupToken" as unsigned int (uint32_t)
via 1ff28a2 s4:operational LDB module - readd "structuralObjectClass" -> "objectClass" mapping
from 75706a6 ldb:ldb_msg.c - use LDB result constants for checking return values
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit eade61ae035caba607b2f31af7561b8b35059139
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Fri Mar 4 23:02:29 2011 +0100
s4:operational LDB module - fix attribute names to be right up/down-cased
Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
Autobuild-Date: Fri Mar 4 23:56:07 CET 2011 on sn-devel-104
commit 5a722f187f6bab3423a449ecdd8013406f574ead
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Fri Mar 4 22:49:46 2011 +0100
s4:ldap.py - rootdse tests should search for the rootDSE not the default DN
Reviewed by: Tridge
commit 71df279f92dd37a55810ee874e9fce61472c6d14
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Fri Mar 4 22:49:08 2011 +0100
s4:ldap.py - add a test in order to show the operational module fixed
Reviewed by: Tridge
commit 05d1d0d8a627295bbb5c8cb0783ddad50801cdbb
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Fri Mar 4 22:39:42 2011 +0100
s4:operational LDB module - fix display of some constructed attributes
"structuralObjectClass", "createTimestamp" and "modifyTimestamp" weren't
displayed anymore.
Reviewed by: Tridge
commit 5a98979e0c4928e1c359b7aff6f964f9ba896146
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Fri Mar 4 22:30:15 2011 +0100
s4:operational LDB module - add "groupToken" as unsigned int (uint32_t)
Reviewed by: Tridge
commit 1ff28a298635483710aab45172528d1bb48b6f9b
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Fri Mar 4 22:14:11 2011 +0100
s4:operational LDB module - readd "structuralObjectClass" -> "objectClass" mapping
This has been removed accidentally by commit
a093e10896a4768dba0cd793a04b7d5d1366fee2.
Reviewed by: Tridge
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/samdb/ldb_modules/operational.c | 22 +++++++++++-----------
source4/dsdb/tests/python/ldap.py | 16 +++++++++++++++-
2 files changed, 26 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index f864a4f..dcc047f 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -25,11 +25,11 @@
*/
/*
- createTimestamp: HIDDEN, searchable, ldaptime, alias for whenCreated
- modifyTimestamp: HIDDEN, searchable, ldaptime, alias for whenChanged
+ createTimeStamp: HIDDEN, searchable, ldaptime, alias for whenCreated
+ modifyTimeStamp: HIDDEN, searchable, ldaptime, alias for whenChanged
for the above two, we do the search as normal, and if
- createTimestamp or modifyTimestamp is asked for, then do
+ createTimeStamp or modifyTimeStamp is asked for, then do
additional searches for whenCreated and whenChanged and fill in
the resulting values
@@ -117,7 +117,7 @@ static int construct_primary_group_token(struct ldb_module *module,
return LDB_SUCCESS;
}
- return samdb_msg_add_int(ldb, msg, msg, "primaryGroupToken",
+ return samdb_msg_add_uint(ldb, msg, msg, "primaryGroupToken",
primary_group_token);
} else {
return LDB_SUCCESS;
@@ -587,8 +587,8 @@ static const struct {
const char *attr;
const char *replace;
} parse_tree_sub[] = {
- { "createTimestamp", "whenCreated" },
- { "modifyTimestamp", "whenChanged" }
+ { "createTimeStamp", "whenCreated" },
+ { "modifyTimeStamp", "whenChanged" }
};
@@ -602,9 +602,9 @@ static const struct {
const char *extra_attr;
int (*constructor)(struct ldb_module *, struct ldb_message *, enum ldb_scope, struct ldb_request *);
} search_sub[] = {
- { "createTimestamp", "whenCreated", NULL , NULL },
- { "modifyTimestamp", "whenChanged", NULL , NULL },
- { "structuralObjectClass", NULL, NULL , NULL },
+ { "createTimeStamp", "whenCreated", NULL , NULL },
+ { "modifyTimeStamp", "whenChanged", NULL , NULL },
+ { "structuralObjectClass", "objectClass", NULL , NULL },
{ "canonicalName", NULL, NULL , construct_canonical_name },
{ "primaryGroupToken", "objectClass", "objectSid", construct_primary_group_token },
{ "tokenGroups", "primaryGroupID", "objectSid", construct_token_groups },
@@ -708,8 +708,8 @@ static int operational_search_post_process(struct ldb_module *module,
goto failed;
}
} else if (ldb_msg_copy_attr(msg,
- search_sub[i].attr,
- search_sub[i].replace) != LDB_SUCCESS) {
+ search_sub[i].replace,
+ search_sub[i].attr) != LDB_SUCCESS) {
goto failed;
}
}
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index d546717..1a9be96 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -2659,6 +2659,20 @@ nTSecurityDescriptor:: """ + desc_base64
self.assertEquals(len(res.controls), 1)
self.assertEquals(res.controls[0].oid, "1.2.840.113556.1.4.319")
+ def test_operational(self):
+ """Tests operational attributes"""
+ print "Tests operational attributes"""
+
+ res = self.ldb.search(self.base_dn, scope=SCOPE_BASE,
+ attrs=["createTimeStamp", "modifyTimeStamp",
+ "structuralObjectClass", "whenCreated",
+ "whenChanged"])
+ self.assertEquals(len(res), 1)
+ self.assertTrue("createTimeStamp" in res[0])
+ self.assertTrue("modifyTimeStamp" in res[0])
+ self.assertTrue("structuralObjectClass" in res[0])
+ self.assertTrue("whenCreated" in res[0])
+ self.assertTrue("whenChanged" in res[0])
class BaseDnTests(unittest.TestCase):
@@ -2668,7 +2682,7 @@ class BaseDnTests(unittest.TestCase):
def test_rootdse_attrs(self):
"""Testing for all rootDSE attributes"""
- res = self.ldb.search(scope=SCOPE_BASE, attrs=[])
+ res = self.ldb.search("", scope=SCOPE_BASE, attrs=[])
self.assertEquals(len(res), 1)
def test_highestcommittedusn(self):
--
Samba Shared Repository
More information about the samba-cvs
mailing list