summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samldb.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-26s4:samldb LDB module - enhance the "member"-check triggerMatthias Dieter Wallnöfer1-3/+7
- Also multi-valued "member" attributes are allowed - When you try to delete a member from a group which has it primary group set exactly to this group you get "UNWILLING_TO_PERFORM"
2010-10-25s4:"samdb_search_count" - introduce a "mem_ctx" parameterMatthias Dieter Wallnöfer1-2/+2
All other "samdb_search_*" calls do have one - why "samdb_search_count" doesn't? Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Oct 25 17:42:33 UTC 2010 on sn-devel-104
2010-10-25s4:samldb LDB module - other indentation fixes on error messagesMatthias Dieter Wallnöfer1-9/+12
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Oct 25 12:31:57 UTC 2010 on sn-devel-104
2010-10-25s4:samldb LDB module - fix indentationsMatthias Dieter Wallnöfer1-15/+28
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Oct 25 09:48:15 UTC 2010 on sn-devel-104
2010-10-25s4:samldb LDB module - use "uint32_t" for available krbtgt numberMatthias Dieter Wallnöfer1-5/+8
2010-10-25s4:samldb LDB module - assign better memory contexts in some casesMatthias Dieter Wallnöfer1-8/+9
2010-10-24s4:dsdb - remove some calls of "samdb_msg_add_string" when we have talloc'ed ↵Matthias Dieter Wallnöfer1-3/+2
strings They can be substituted by "ldb_msg_add_string" if the string was already talloc'ed. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Oct 24 20:03:27 UTC 2010 on sn-devel-104
2010-10-21s4-dsdb: moved a bunch of fuctions from schema/schema_info_attr.c to ↵Andrew Tridgell1-9/+6
samdb/ldb_modules/schema_util.c these functions operate on ldb_modules, so they should be in the ldb_modules directory. They also should return ldb errors codes, not WERROR codes, as otherwise the error can be hidden from the ldap caller This re-arrangement fixes a dependency loop in the schema/samdb code. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Kamen Mazdrashki <kamenim@samba.org>
2010-10-18s4:"util_ldb" - remove some really unused dependanciesMatthias Dieter Wallnöfer1-1/+0
2010-10-17Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls ↵Matthias Dieter Wallnöfer1-0/+1
in "dsdb/common/util.c"" This reverts commit 8a2ce5c47cee499f90b125ebde83de5f9f1a9aa0. Jelmer pointed out that these are also in use by other LDB databases - not only SAMDB ones. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Oct 17 13:37:16 UTC 2010 on sn-devel-104
2010-10-17s4:remove "util_ldb" submodule and integrate the three gendb_* calls in ↵Matthias Dieter Wallnöfer1-1/+0
"dsdb/common/util.c" They're only in use by SAMDB code. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Oct 17 09:40:13 UTC 2010 on sn-devel-104
2010-10-16s4:samldb LDB module - use appropriate fixed-length integer types where neededMatthias Dieter Wallnöfer1-4/+5
- The "systemFlags" we interpret always as signed - Use "samdb_msg_add_int" where possible (much saver for integer storing than ldb_msg_add_fmt)
2010-10-16s4:dsdb - fix unsigned integer save problems using the "%u" specifierMatthias Dieter Wallnöfer1-5/+10
The issue here is that we have not yet first cast to int32_t explicitly, before we cast to an signed int to printf() into the %d or cast to a int64_t before we then cast to a long long to printf into a %lld. There are *no* unsigned integers in Active Directory LDAP, even the RID allocations and ms-DS-Secondary-KrbTgt-Number are *signed* quantities. (See the schema, and the syntax definitions in schema_syntax.c). The failure has been detected by Matthieu Patou on the buildfarm host "tridge" due to a malformed "groupType" attribute. The solution is to use the "%d" specifier. Either to use it directly - or better (when possible) use the call "samdb_msg_add_uint" (which encapsulates it). This patch changes such problematic situations.
2010-10-15s4 dsdb: fix sign problem on PPC and x86Matthieu Patou1-2/+2
In LDAP we used signed intege and groups have the highest bit set (ie. 0x80000002). So it will result with values that are > 2^31 when these value are used on some plateforms (x86 and PPC 64bits in this case) it causes problem with strtol.
2010-10-15s4:samldb LDB module - cosmetic - use "ldb" variable rather than ↵Matthias Dieter Wallnöfer1-1/+1
"ldb_module_get_ctx"
2010-10-15s4:dsdb - remove "samdb_result_uint", "samdb_result_int64", ↵Matthias Dieter Wallnöfer1-3/+3
"samdb_result_uint64" and "samdb_result_string" We have ldb_msg_find_attr_as_* calls which do exactly the same. Therefore this reduces only code redundancies. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-10-14s4:samldb LDB module - attempt to fix integer handling on big-endian platformsMatthias Dieter Wallnöfer1-7/+9
And beside this it's also nicer to use standard LDB functions for type conversions. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Oct 14 08:26:53 UTC 2010 on sn-devel-104
2010-10-13s4:samldb LDB module - cosmetic fixupsMatthias Dieter Wallnöfer1-9/+9
- Update the module description - Fix indentation Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Oct 13 20:55:18 UTC 2010 on sn-devel-104
2010-10-13s4:samldb LDB module - deny creation of temporary duplicate accountsMatthias Dieter Wallnöfer1-0/+12
2010-10-13s4:samldb LDB module - proof the account type also on LDB modify operationsMatthias Dieter Wallnöfer1-0/+8
2010-10-13s4:samldb LDB module - support the group type changing properlyMatthias Dieter Wallnöfer1-1/+53
This is exactly that what Windows allows. It was proven by a blackbox test. And we also need to deny add operations of builtin groups.
2010-10-13s4:samldb LDB module - deny also the direct modification of ↵Matthias Dieter Wallnöfer1-3/+14
"isCriticalSystemObject" on modify operations
2010-10-13s4:samldb LDB module - first implementation of the samldb primary group triggerMatthias Dieter Wallnöfer1-48/+61
This was done according to MS-SAMR 3.1.1.8.2 But do use it only for add operations at the moment.
2010-10-13s4:samldb LDB module - use the new "objectclass_trigger" for add operationsMatthias Dieter Wallnöfer1-142/+33
Additionally clean up "samldb_fill_object" which is now much easier to comprehend.
2010-10-13s4:samldb LDB module - first implementation of the samldb objectclass triggerMatthias Dieter Wallnöfer1-0/+176
This was done according to MS-SAMR 3.1.1.8.1 I need to perform some RELAX checks since otherwise the provision wouldn't work anymore.
2010-10-11dsdb modules: Split ridalloc out of common helpers, because of dependency loops.Jelmer Vernooij1-0/+1
2010-10-06s4:samldb LDB module - remove "type" parameter of "samldb_fill_object"Matthias Dieter Wallnöfer1-6/+9
It's a bit redundant given that we have the "type" variable on "ac". Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Oct 6 10:20:45 UTC 2010 on sn-devel-104
2010-10-05s4:samldb LDB module - simplify/unify the message handling on add and modify ↵Matthias Dieter Wallnöfer1-28/+54
operations - Perform only shallow copies (should be enough) - Perform only one copy per operation (also on modifications) - Build a new request on modify operations if needed ("modified" flag) - this makes it look cleaner - Fix an important bug: the "el" pointers could have changed after modifications. Therefore we have to refresh them on the FLAG_DELETE checks Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Oct 5 09:24:57 UTC 2010 on sn-devel-104
2010-10-05s4:samldb LDB module - assign better memory contexts on two placesMatthias Dieter Wallnöfer1-2/+2
2010-09-29s4-samldb: also set a password on the krbtgt_NNNN accountAndrew Tridgell1-0/+11
when we setup the krbtgt_NNNN account using the DCPROMO_OID control, we also need to set an initial password for this account Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-25ldb: mark the location of a lot more ldb requestsAndrew Tridgell1-0/+1
2010-09-24s4:samldb LDB module - it isn't allowed to create user/computer accounts ↵Matthias Dieter Wallnöfer1-0/+4
with a primary group specified It can only be changed afterwards. We allow a "relax"ed exception for the provision state since we need this for the guest account. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-24s4:samldb LDB module - support the "userAccountControl" -> "primaryGroupID" ↵Matthias Dieter Wallnöfer1-16/+11
detection also on modify operations Also requested by MS-SAMR 3.1.1.8.1. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-13s4:SID handling - always encode the SID using "ldap_encode_ndr_dom_sid" for ↵Matthias Dieter Wallnöfer1-8/+8
LDAP filters This makes also lookups through special backends as "samba3sam" work.
2010-09-13s4:cosmetic - the SID attribute is called objectSid - not objectSIDMatthias Dieter Wallnöfer1-2/+2
2010-09-13Revert "s4:samldb LDB module - simplify the message handling on add and ↵Matthias Dieter Wallnöfer1-26/+33
modify operations" This reverts commit 1d94bb3ad4d9c6de3b77ed4690a54ebf2399cc0d. This commit causes unconditional behaviour (sometimes it works, sometimes not) -sorry for introducing this. I will rework this further.
2010-09-12s4:samldb LDB module - remove a disastrous "talloc_free"Matthias Dieter Wallnöfer1-2/+0
This completely destroys the program logic (async callbacks). Sorry for introducing this.
2010-09-12s4:samldb LDB module - "samldb_check_primaryGroupID" - support RID ↵Matthias Dieter Wallnöfer1-1/+5
derivation from "userAccountControl" Specified in MS-SAMR 3.1.1.8.1 and probably fixes also bug #7441.
2010-09-12s4:samldb LDB module - free the "ac" context after the delete checksMatthias Dieter Wallnöfer1-1/+4
2010-09-12s4:samldb LDB module - simplify the message handling on add and modify ↵Matthias Dieter Wallnöfer1-33/+28
operations We perform always only one shallow copy operation of the message on the "req" context. This allows to free the "ac" context when we've prepared all our changes.
2010-09-12s4:samldb LDB module - move "samldb_prim_group_users_check" more down to see ↵Matthias Dieter Wallnöfer1-41/+41
that it is only in use by the delete operation add and modify helpers will stay on the top of the add and modify operation since they will likely be shared as much as possible.
2010-09-12s4:samldb LDB module - add a comment to mark the beginning of the extended ↵Matthias Dieter Wallnöfer1-0/+2
operation handler
2010-09-12s4:samldb LDB module - refactor "samldb_find_for_defaultObjectCategory" to ↵Matthias Dieter Wallnöfer1-94/+22
be again synchronous Also to make it easier to comprehend
2010-09-12s4:samldb LDB module - refactor the "primaryGroupID" check on user creationMatthias Dieter Wallnöfer1-137/+39
This looks more straight-forward now.
2010-09-12s4:samldb LDB module - get rid of the SID context variableMatthias Dieter Wallnöfer1-20/+17
Since we get more and more rid of async stuff we don't need this in the context anymore.
2010-09-12s4:samldb LDB module - use also here the real attribute denomination ↵Matthias Dieter Wallnöfer1-1/+1
"sAMAccountName" Purely cosmetic - but nicer to read
2010-09-12s4:samldb LDB module - rename "check_SamAccountType" into "check_sAMAccountType"Matthias Dieter Wallnöfer1-5/+4
And a small cosmetic change. I like to have the real attribute names in the function denominations
2010-09-12s4:samldb LDB module - make "samldb_check_sAMAccountName" synchronous againMatthias Dieter Wallnöfer1-71/+19
To make it more understandable
2010-08-20s4-dsdb: the RODC_JOIN control also changes samAccountNameAndrew Tridgell1-9/+13
when adding a user with the RODC_JOIN control, the samAccountName is automatically set to the krbtgt_NNNNN form Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
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>