summaryrefslogtreecommitdiff
path: root/source4/dsdb
AgeCommit message (Collapse)AuthorFilesLines
2009-08-26s4:schema Rework dsdb_write_prefixes_from_schema_to_ldb() to use tallocAndrew Bartlett1-14/+20
This changes dsdb_write_prefixes_from_schema_to_ldb() to use an internal talloc hirarchy, so we can safely give it a NULL context from the python. It also fixes manual construction of the ldb_message - we now use the right helper functions. Andrew Bartlett
2009-08-26s4:scheam quiet a 'const' warningAndrew Bartlett1-1/+1
2009-08-26s4:dsdb Rework dsdb_write_prefixes_to_ldb() to take a schemaAndrew Bartlett1-14/+13
The aim is to create a function that is more easily wrapped for python, so that we can write the updated prefixMap in an upgrade script. Andrew Bartlett
2009-08-26s4:dsdb Use helper function to add 'show deleted' controlAndrew Bartlett1-20/+10
This revises tridge's commit 61ca4c491e1c13eb7d97847f743b0f540f1117c4 to use ldb_request_add_control() instead of a manual construction. Andrew Bartlett
2009-08-25fixed DRS rename of deleted objectsAndrew Tridgell1-1/+20
The objectclass module checks that the target parent exists, and refuses renames if it doesn't exist. For this to work for deleted objects we have to do the search in the objectclass module with the "show deleted" control enabled.
2009-08-25s4:dsdb Rework show_deleted module not to liniearise the LDAP filterAndrew Bartlett1-72/+37
Instead, use the fact that the ldb_parse_tree structure is public to construct the 'and not deleted' clause as a structure, and apply each filter tree to that template. Andrew Bartlett
2009-08-24s4:dsdb Use talloc_strndup() to ensure OIDs are null terminatedAndrew Bartlett1-8/+11
The OIDs are not NULL terminated by the python caller, in line with the LDB API, but we need them to be here, as we were casting them to a string. Andrew Bartlett
2009-08-24s4:dsdb Add constAndrew Bartlett1-2/+2
2009-08-24s4:dsdb remove unused variableAndrew Bartlett1-1/+0
2009-08-24s4:dsdb use talloc_strndup() in GET_STRING_LDB() rather than walk off the endAndrew Bartlett1-7/+17
The problem is that samdb_result_string() and ldb_msg_find_attr_as_string() both simply cast the string, rather than ensuring the return value is NULL terminated. This may be best regarded as a flaw in LDB, but fixing it there is going to be more difficult. Andrew Bartlett
2009-08-19added basic support for rename in DRS replicationAndrew Tridgell1-5/+9
Added simple DRS rename support in replication. This should be done async, and I'm not sure if we should also do any repl data updates to indicate the rename. I'm still learning how this stuff works, but at least this allows a rename on a DC to propogate correctly
2009-08-17s4: int32 handling: previous fix was not fully correctMatthias Dieter Wallnöfer1-1/+1
2009-08-17s4: Make the int32 problem more clear - and fix another errorMatthias Dieter Wallnöfer2-1/+5
2009-08-17s4: Fixed the int32 datatype supportMatthias Dieter Wallnöfer1-1/+1
Should finally fix bug #6136 ("groupType", "sAMAccountType" ... attributes).
2009-08-17make sure we update the current schema->prefixes when we add a new prefixAndrew Tridgell1-0/+9
This triggered a failure in the updateNow schema test, as the current global schema was not being updated when a new schema element was added
2009-08-17s4:schema Allow a schema load on an unconnected databaseAndrew Bartlett1-5/+6
This helps ensure we don't load the schema too often in the provision (allowing a reference in of the schema before the modules load). Andrew Bartlett
2009-08-17s4:schema Provide a way to reference a loaded schema between ldbsAndrew Bartlett1-11/+19
This allows us to load the schema against one ldb context, but apply it to another. This will be useful in the provision script, as we need the schema before we start the LDAP server backend. Adnrew Bartlett
2009-08-14s4: Remove obsolete "samdb_password_quality_ok" function (it's just a ↵Matthias Dieter Wallnöfer1-10/+1
one-line wrapper)
2009-08-14s4: cracknames.c: Change the handling of the NT_STATUS_NO_MEMORY status resultsMatthias Dieter Wallnöfer1-4/+6
With the previous check I got random failures when trying to connect to the LDAP server.
2009-08-11s4:operational - Remove some outdated commentsMatthias Dieter Wallnöfer1-12/+0
2009-08-11s4:samldb module - Remove duplicate lineMatthias Dieter Wallnöfer1-1/+0
2009-08-11s4:operational module - move and enhancementsMatthias Dieter Wallnöfer2-0/+358
This moves the "operational" LDB module to the right place under "dsdb/samdb/ldb_modules" (suggested by abartlet) and enhances it for supporting dynamic generated "primaryGroupToken" for AD groups. This should fix bug #6466.
2009-08-07use talloc with the global schema consistentlyAndrew Tridgell1-1/+2
Before this change, the first opener of the sam ldb context would become the owner of the global schema, then the autofree context got a reference to the schema. Any subsequent opens of the sam ldb also got a reference. This meant that the talloc hierarchy was inconsistent between the first sam ldb open and subsequent opens. With this change the autofree context becomes the owner of the global schema, and all ldb contexts get a reference.
2009-08-07fixed several places that unnecessarily take a reference to the event contextAndrew Tridgell1-4/+0
These references were triggering the ambiguous talloc_free errors from the recent talloc changes when the server is run using the 'standard' process model instead of the 'single' process model. I am aiming to move the build farm to use the 'standard' process model soon, as part of an effort to make our test environment better match the real deployment of Samba4. The references are not needed as the way that the event context is used is as the 'top parent', so when the event context is freed then all of the structures that were taking a reference to the event context were actually freed as well, thus making the references redundent.
2009-08-05s4:dsdb Don't cast an ldb_val into a const char * for schema lookupsAndrew Bartlett5-52/+129
This removes a number of cases where we did a cast into a const char * of an ldb_val. While convention is to alway have an extra \0 at data[length] in the ldb_val, this is not required, and does not occour at least on build farm host 'svart'. Andrew Bartlett
2009-08-03Return infinite time for last last logoff when last logoff = 0Matthieu Patou1-0/+16
2009-07-31s4: Correct renamed constantsMatthias Dieter Wallnöfer1-2/+2
2009-07-19[SAMBA 4] Some cosmetic changes for the LDB modulesMatthias Dieter Wallnöfer2-12/+12
Some corrections which make the code a bit more readable (no functional changes here)
2009-07-16s4:dsdb Handle dc/domain/forest functional levels properlyAndrew Bartlett2-8/+139
Rather than have the functional levels scattered in 4 different, unconnected locations, the provision script now sets it, and the rootdse module maintains it's copy only as a cached view onto the original values. We also use the functional level to determine if we should store AES Kerberos keys. Andrew Bartlett
2009-07-13libds: merge the UF<->ACB flag mapping functions.Günther Deschner5-155/+10
Guenther
2009-07-13libds: share UF_ flags between samba3 and 4.Günther Deschner9-145/+8
Guenther
2009-07-09s4:dsdb Allow unicodePwd to be set when adding a userAndrew Bartlett1-85/+84
Windows 7 sets it's join password using the unicodePwd attribute (as a quoted, utf16 string), and does so during the LDAPAdd of the object. Previously, this code only handled unicodePwd for modifies. Andrew Bartlett
2009-07-09Add constAndrew Bartlett1-2/+2
2009-07-08Fix for schemaUpdateNow commandAnatoliy Atanasov5-6/+14
2009-07-05Fix some nonempty blank linesVolker Lendecke1-78/+76
2009-07-02we can't use the unique index code for samAccountNameAndrew Tridgell2-8/+75
Using ldb unique indexes for samAccountName doesn't work with DRS as the other DC may send us a deleted record (tombstone record), which has the same samAccountName as an existing record. That would then create two records in the same partition with the same samAccountName. So we needed to put back the logic in samldb.c which explicitly checked whether a samAccountName already exists on add
2009-07-02decrypt all objects in a DRS record, not just the first oneAndrew Tridgell1-2/+5
We found this as an object came across from w2k3 with zero values, which caused a segv when we tried to decrypt the first value
2009-07-02fixed the pull of drs schema elementsAndrew Tridgell3-33/+108
The previous code incorrectly assumed that attributes such as subClassOf come over the wire as strings. In fact they come over as 32 bit integers which refer to goversIDs. We have to post-process these as it sometimes happens that a governsID comes over the wire before the record that defines what it means.
2009-07-01fixed the reference to the global_schemaAndrew Tridgell1-2/+3
2009-06-30s4:ldb Allow rootdse module to build without ldb_private.hAndrew Bartlett1-1/+2
It seems quite reasonable to allow modules to re-initialise the set of cached DNs on the ldb context. Andrew Bartlett
2009-06-30s4: dsdb Avoid using the internal ldb_private.h headerAndrew Bartlett4-117/+120
This job is not complete (the partition module remains a unfinished task), but now we do use the private ldb headers much less. Andrew Bartlett
2009-06-30s4:dsdb Explain the parsing steps for userPrincipalName cracknames callsAndrew Bartlett1-0/+4
2009-06-29Correct some typos in the LDB partition moduleMatthias Dieter Wallnöfer1-5/+5
2009-06-29SAMDB: Don't check for "sAMAccountName" twiceMatthias Dieter Wallnöfer1-1/+0
2009-06-29Enhancement of "simple ldap map" with "systemFlags" attributeMatthias Dieter Wallnöfer1-0/+22
Enhance the simple ldap map to support also the "systemFlags" attribute in the correct way.
2009-06-19Fixed some uninitialised variablesMatthias Dieter Wallnöfer1-8/+5
I tried hard to not change the program logic. Should fix bug #6439.
2009-06-19Correct handling of 32-bit integer attributes in SAMBA 4Matthias Dieter Wallnöfer2-13/+28
- LDB handles now all 32-bit integer attributes correctly (also with overflows) according to the schema - LDAP backends handle the attributes "groupType", "userAccountControl" and "sAMAccountType" correctly. This handling doesn't yet use the schema but the conversion file "simple_ldap.map.c" which contains them hardcoded. Did also a refactoring of the conversion function there. - Bug #6136 should be gone
2009-06-18dsdb: Fix build against system ldb.Jelmer Vernooij3-3/+3
2009-06-18Fix build with system LDB.Jelmer Vernooij1-1/+1
2009-06-12s4:heimdal: import lorikeet-heimdal-200906080040 (commit ↵Andrew Bartlett1-9/+9
904d0124b46eed7a8ad6e5b73e892ff34b6865ba) Also including the supporting changes required to pass make test A number of heimdal functions and constants have changed since we last imported a tree (for the better, but inconvenient for us). Andrew Bartlett