summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samldb.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-17s4-dsdb: added support for UF_PARTIAL_SECRETS_ACCOUNTAndrew Tridgell1-2/+9
when this is in user_account_control the account is a RODC, and we need to set the primaryGroupID to be DOMAIN_RID_READONLY_DCS Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-dsdb: set LDB_FLAG_INTERNAL_DISABLE_VALIDATION for msDS-SecondaryKrbTgtNumberAndrew Tridgell1-1/+8
msDS-SecondaryKrbTgtNumber is setup with a value that is outside the range allowed by the schema (the schema has rangeLower==rangeUpper==65536). We need to mark this element as being internally generated to avoid the range checks Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-ldb: use LDB_FLAG_MOD_TYPE() to extract element type from messagesAndrew Tridgell1-6/+6
The flags field of message elements is part of a set of flags. We had LDB_FLAG_MOD_MASK for extracting the type, but it was only rarely being used (only 1 call used it correctly). This adds LDB_FLAG_MOD_MASK() to make it more obvious what is going on. This will allow us to use some of the other flags bits for internal markers on elements Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-dsdb: fixed test for LDB_CONTROL_RODC_DCPROMO_OIDAndrew Tridgell1-1/+1
the ldb_msg_add_fmt() call returns LDB_SUCCESS on success
2010-08-17s4-dsdb: added support for LDB_CONTROL_RODC_DCPROMO_OIDAndrew Tridgell1-0/+69
this control adds a unique msDS-SecondaryKrbTgtNumber attribute to a user object. There is some 'interesting' interaction with the rangeLower and rangeUpper attributes and this add. We don't implementat rangeLower/rangeUpper yet, but when we do we'll need an override for this control (or be careful about module ordering). Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-07-16s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell1-1/+1
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-07s4-dsdb: use ldb_operr() in the dsdb codeAndrew Tridgell1-30/+29
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)" in places in the dsdb code where we don't already explicitly set an error string. This should make is much easier to track down dsdb module bugs that result in an operations error.
2010-07-02s4-source4/dsdb/samdb/ldb_modules/samldb.c: Use DSDB_FLAG_NEXT_MODULE flagKamen Mazdrashki1-4/+5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-20s4:samldb LDB module - remove "samldb_set_defaultObjectCategory"Matthias Dieter Wallnöfer1-78/+0
As far as I can tell and the test show the DN gets now normalised automatically when stored into the database. Anyway, if we find a case where this doesn't happen then I propose to do it centrally for all DN attributes in common since we should get away from special attribute hacks as far as possible.
2010-06-10s4:samldb LDB module - fix up the case when the old and new "primaryGroupID" ↵Matthias Dieter Wallnöfer1-7/+7
are the same
2010-06-10s4:samldb LDB module - don't create multiple "ac" module contexts on modify ↵Matthias Dieter Wallnöfer1-12/+6
operations Since we do now run sequentially through all checks we don't need multiple "ac" contexts anymore.
2010-06-07s4:samldb LDB module - adjust the module to set always a ↵Matthias Dieter Wallnöfer1-35/+45
"defaultObjectCategory" on objectclass add operations This is needed to make the "objectclass_attrs" LDB module happy. The search check and case adjustment are done as it was using a second modify operation.
2010-06-07s4:samldb LDB module - finally we can remove the RDN checkMatthias Dieter Wallnöfer1-53/+0
This is now dynamically always done by the objectclass LDB module
2010-06-06s4:samldb LDB module - this codepart isn't needed due to the objectclass LDB ↵Matthias Dieter Wallnöfer1-13/+0
module When a "computer" entry will be added, also the inherited "user" objectclass is going to be specified.
2010-05-31s4:samldb LDB module - start on a sequential trigger implementationMatthias Dieter Wallnöfer1-10/+26
This is a start to allow the triggers to be called sequentially.
2010-05-30s4:samldb LDB module - deny delete operations on some important attributesMatthias Dieter Wallnöfer1-3/+12
Add operations are denied since these are single-valued - only replace is allowed. This is only provisorily at the moment - we need to implement the triggers specified in MS-ADTS.
2010-05-30s4:samldb LDB module - rework the group change code to be again synchronousMatthias Dieter Wallnöfer1-309/+71
2010-05-18Finish removal of iconv_convenience in public API's.Jelmer Vernooij1-1/+1
2010-05-14s4:samldb LDB module - remove unused variablesMatthias Dieter Wallnöfer1-2/+0
2010-05-09s4:samldb LDB module - make "samldb_member_check" synchronous againMatthias Dieter Wallnöfer1-64/+33
2010-05-09s4:samldb LDB module - make "samldb_prim_group_users_check" synchronous againMatthias Dieter Wallnöfer1-235/+24
2010-05-09s4:samldb LDB module - update the copyright noticeMatthias Dieter Wallnöfer1-1/+1
2010-05-04s4/rodc: Fix the callbacks up the stack to handle referrals on modify requestsAnatoliy Atanasov1-0/+15
2010-04-22s4-dsdb: moved rodc schema validation to samldb.cAndrew Tridgell1-0/+37
This means we are only doing the checks for schema changes Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-13Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"Matthias Dieter Wallnöfer1-1/+2
We should use the "ldb_get_*_basedn" calls since they are available in the LDB library.
2010-04-09s4/samldb: schemaInfo attribute must be updated when adding new Schema objectKamen Mazdrashki1-0/+50
2010-02-25s4:SAMLDB module - ignore referralsMatthias Dieter Wallnöfer1-5/+6
They don't cause any harm to our functionality - so ignore them were not needed. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-02-24s4/schema: Move msDS-IntId implementation to samldb.c moduleKamen Mazdrashki1-0/+87
msDS-IntId attribute should be replicated, so it must be implemented in a module that is before repl_meta_data module (thanks abartlet for pointing this out). Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-02-16s4-dsdb: move dsdb_request_add_controls() into dsdb/common/util.cAndrew Tridgell1-1/+1
This will be used to allow the flag based ldb functions to work on both a ldb or a module, thus saving a lot of specialist functions.
2010-01-09s4-samldb: fixed primaryGroupID when promoting a machine to a DCAndrew Tridgell1-17/+30
The machine gets a primaryGroupID of DOMAIN_RID_DCS. This is done without changing the member attributes of its groups.
2010-01-08s4-dsdb: allow specification of a SID if we are systemAndrew Tridgell1-1/+2
needed for samba3sam test
2010-01-08s4-dsdb: added an extended operation for allocating a new RID poolAndrew Tridgell1-1/+31
This will be called by getncchanges when a client asks for a DRSUAPI_EXOP_FSMO_RID_ALLOC operation Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08s4-dsdb: move the RID allocation logic into ridalloc.cAndrew Tridgell1-88/+5
This will end up having the RID Manager logic as well, so all the RID pool allocation logic is in one spot Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08s4-samldb: use RID Set to allocate user/group RIDsAndrew Tridgell1-559/+104
This is the first step towards DRS-friendly RID allocation. We now get the next rid from the RID Set object Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-05s4:SAMLDB LDB module - Fix trailing whitespacesMatthias Dieter Wallnöfer1-17/+17
2010-01-05s4:SAMLDB LDB module - Rework to allow checks for wrong ↵Matthias Dieter Wallnöfer1-50/+96
"defaultObjectCategory" attributes This allows a stricter check for "defaultObjectCategory" attributes which is performed when the "relax" control isn't specified. Additional note: As the added comment points out this isn't complete. And I personally think that moving this at some point to the "objectclass" module is a better idea to make this fully work (since there we have direct access to the schema). If someone has a good idea how to do this please inform me. Anyway, the SAMLDB module does require some restructure since at the moment it's very overloaded and therefore a bit a mess. In the meantime I started to work on a new approach to realise it in a better way.
2009-12-16s4-dsdb: rename dsdb_module_search_handle_flags to dsdb_request_add_controlsAndrew Tridgell1-1/+1
This function will be used for non-search controls, like relax
2009-11-30s4-drs: Using dsdb_msg_add_guid() utility functionFernando J V da Silva1-24/+2
Uses the dsdb_msg_add_guid() to add any kind of GUID attribute to a ldb_message in several places of samba4 code. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-17s4:SAMLDB DSDB module - Add "\n"s on debug messagesMatthias Dieter Wallnöfer1-2/+2
2009-11-17s4:SAMLDB DSDB module - Remove "\n" in LDB error messagesMatthias Dieter Wallnöfer1-25/+31
abartlet suggested me to not use anymore "\n"s in those kind of outputs. Plus, enhance a search filter to consider also "builtinDomain" objects which are basically domain objects too.
2009-11-17s4:dsdb Rework samdb code to use 'storage format' DNs for defaultObjectCategoryAndrew Bartlett1-0/+5
It is important to always ensure that this attribute has an extended DN if the rest of the database stores things that way. The knowlege of what format the DN is stored on disk with is passed around in an LDB opaque. Andrew Bartlett
2009-11-16s4:SAMLDB moduleMatthias Dieter Wallnöfer1-14/+14
- Add more "\n" to make sure that error messages are displayed immediately - Add a "NULL" in a attribute list
2009-11-16s4:dsdb LDB attribute lists must always be a static const char **.Andrew Bartlett1-1/+1
(If they are not, then due to the async code, they will cause a segfault as they reference a reclaimed portion of the stack). Andrew Bartlett
2009-11-15s4:SAMLDB module - Add support for required and generated schema attributesAndrew Bartlett1-7/+285
This missing support found by Microsoft test suite at AD interop event. Patch by Andrew Bartlett Enhancements by Matthias Dieter Wallnöfer
2009-11-02s4 - SID allocation using FDS DNA pluginEndi S. Dewata1-10/+19
2009-10-12s4:provision Remove all references to samba4LocalDomainAndrew Bartlett1-6/+5
This was a bad idea all along, as Simo said at the time. With the full MS schema and enforcement of it, it is an even worse idea. This fixes the provision of the member server in 'make test' Andrew Bartlett
2009-10-02s4-samdb: added some debuggingAndrew Tridgell1-2/+8
This helped track down the samba3sam.py failures
2009-09-28s4-samdb: when UF_SERVER_TRUST_ACCOUNT is set mark object as criticalAndrew Tridgell1-0/+10
We may also need to remove the isCriticalSystemObject when the machine is demoted
2009-09-12s4-samdb: internal s4 ldb modules should be GPL not LGPLAndrew Tridgell1-6/+2
I think these modules ended up LGPL because someone based the module on an existing LGPL module in the core ldb, and it spread from there. Certainly there is no reason for the ldb modules that are not distributed as part of ldb to be LGPL.
2009-09-07s4:samldb - Fix typoMatthias Dieter Wallnöfer1-1/+1