summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/operational.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-20operational: remove double loopsMatthieu Patou1-31/+47
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-08dsdb-operational: rework the loop for attribute removalMatthieu Patou1-41/+92
Instead of doing ldb_in_list size(operational_remove) * (attrs_user + attr_searched) * number of entries times to get the list of attributes to remove we construct this list before the search and then use it for every entries. Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-17dsdb-operational: Avoid doing the ldb_attr_cmp if bypass flag is not setMatthieu Patou1-1/+1
Most of the time this flag is not set and so we can avoid the strcasecmp in ldb_attr_cmp() Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jan 17 17:10:32 CET 2013 on sn-devel-104
2012-12-10s4:dsdb/operational: fix stripping of the nTSecurityDescriptor attributeStefan Metzmacher1-2/+12
If the sd_flags control is specified, we should return nTSecurityDescriptor only if the client asked for all attributes. If there's a list of only explicit attribute names, we should ignore the sd_flags control. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-07-06s4-dsdb: Give a much better error message when parentGUID generation failsAndrew Bartlett1-3/+3
2012-06-22s4-dsdb: operational handle modifyTimeStamp on the CN=aggregate DNMatthieu Patou1-1/+37
modifyTimeStamp is a generated attribute, for most object it's generated directly from the whenChanged attribute. But for the CN=aggregate object in the schema we have to handle it in a different way, that's because for this object whenChanged!=modifyTimeStamp (as checked against Windows 2003R2 DCs) instead the modifyTimeStamp reflect the timestamp of the most recently modified and loaded schema object (that is to the one with the highest USN before the schema was reload due to timeout or by the reloadSchemaNow command). Some third party are using this information to know if they have to update their schema cache and also to check that schema updates have been correctly reloaded by the DC, a good example of this behavior is exchange 2010.
2011-10-12s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by valueGregor Beck1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2011-09-08s4-dsdb: prevent crash on bad DN in construct_parent_guid()Andrew Tridgell1-0/+3
this was found by a flakey test in autobuild
2011-03-04s4:operational LDB module - fix attribute names to be right up/down-casedMatthias Dieter Wallnöfer1-7/+7
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Mar 4 23:56:07 CET 2011 on sn-devel-104
2011-03-04s4:operational LDB module - fix display of some constructed attributesMatthias Dieter Wallnöfer1-2/+2
"structuralObjectClass", "createTimestamp" and "modifyTimestamp" weren't displayed anymore. Reviewed by: Tridge
2011-03-04s4:operational LDB module - add "groupToken" as unsigned int (uint32_t)Matthias Dieter Wallnöfer1-1/+1
Reviewed by: Tridge
2011-03-04s4:operational LDB module - readd "structuralObjectClass" -> "objectClass" ↵Matthias Dieter Wallnöfer1-1/+1
mapping This has been removed accidentally by commit a093e10896a4768dba0cd793a04b7d5d1366fee2. Reviewed by: Tridge
2011-02-18s4-dsdb: operational module does not need auth any moreAndrew Tridgell1-2/+0
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-15s4-ldb_modules/operational: Make use of dsdb_module_reference_dn() functionKamen Mazdrashki1-17/+4
it does exactly what we need here Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Tue Feb 15 16:55:32 CET 2011 on sn-devel-104
2011-01-20s4-auth Remove special case for account_sid from auth_serversupplied_infoAndrew Bartlett1-2/+2
This makes everything reference a server_info->sids list, which is now a struct dom_sid *, not a struct dom_sid **. This is in keeping with the other sid lists in the security_token etc. In the process, I also tidy up the talloc tree (move more structures under their logical parents) and check for some possible overflows in situations with a pathological number of sids. Andrew Bartlett
2011-01-17s4-dsdb: pass parent request to dsdb_module_*() functions Andrew Tridgell1-20/+30
this preserves the request hierarchy for dsdb_module_*() calls inside dsdb ldb modules Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14s4-dsdb: fixed filtering of tokengroupsAndrew Tridgell1-5/+3
builtin groups are shown in user tokenGroups searches Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14s4-dsdb Implement tokenGroups expansion directly in ldb operational moduleAndrew Bartlett1-29/+101
This removes a silly cross-dependency between the ldb moudle stack and auth/ Andrew Bartlett
2010-12-21s4-auth rework session_info handling not to require an auth contextAndrew Bartlett1-1/+1
This reverts a previous move to have this based around the auth subsystem, which just spread auth deps all over unrelated code. Andrew Bartlett
2010-11-29s4-dsdb: give full error message for operational failuresAndrew Tridgell1-2/+2
2010-11-18s4/operational: Fix swapped parameters for ldb_msg_copy_attrAnatoliy Atanasov1-2/+2
Autobuild-User: Anatoliy Atanasov <anatoliy.atanasov@postpath.com> Autobuild-Date: Thu Nov 18 17:02:07 UTC 2010 on sn-devel-104
2010-11-09s4:dsdb/operational.c: use DSDB_SECRET_ATTRIBUTES_EX()Stefan Metzmacher1-5/+2
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Nov 9 22:43:44 UTC 2010 on sn-devel-104
2010-11-06s4:operational LDB module - "canonicalName" doesn't make use of the ↵Matthias Dieter Wallnöfer1-2/+2
"distinguishedName" attribute It uses the DN from the returned message
2010-11-01s4-ldb: enable version checking in dsdb ldb modulesAndrew Tridgell1-0/+1
2010-11-01s4-dsdb: convert the rest of the ldb modules to the new module typeAndrew Tridgell1-1/+6
2010-10-31idl: Use DRSUAPI_ATTID_ prefix instead of DRSUAPI_ATTRIBUTE_ for ATTID valuesKamen Mazdrashki1-1/+1
Those values are actually ATTID values and such, they are used for ATTIDs for Attributes, Classes and Syntaxes.
2010-10-23ldb:rename LDB_CONTROL_BYPASSOPERATIONAL_OID into ↵Matthias Dieter Wallnöfer1-3/+3
LDB_CONTROL_BYPASS_OPERATIONAL_OID It's nicer to have this consistent with "BYPASS_PASSWORD_HASH".
2010-10-16s4:dsdb - fix unsigned integer save problems using the "%u" specifierMatthias Dieter Wallnöfer1-1/+9
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-12libcli/security Use common security.hAndrew Bartlett1-1/+1
This includes dom_sid.h and security_token.h and will be moved to the top level shortly. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 03:35:36 UTC 2010 on sn-devel-104
2010-10-03s4:dsdb - substitute the "show_deleted" with the "show_recycled" controlMatthias Dieter Wallnöfer1-2/+2
We intend to see always all objects with the "show_deleted" control specified. To see also recycled objects (beginning with 2008_R2 function level) we need to use the new "show_recycled" control. As far as I see this is only internal code and therefore we don't run into problems if we do substitute it. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-25ldb: mark the location of a lot more ldb requestsAndrew Tridgell1-0/+1
2010-09-21s4-ldap: Fixed a problem with NC's having a parentGUID attributeNadezhda Ivanova1-13/+27
NC's other than default NC had a parentGUID, due to an incorrect check of whether the object has a parent. Fixed by checking object's instanceType instead.
2010-08-23s4:security Change struct security_token->sids from struct dom_sid * to ↵Andrew Bartlett1-1/+1
struct dom_sid This makes the structure much more like NT_USER_TOKEN in the source3/ code. (The remaining changes are that privilages still need to be merged) Andrew Bartlett
2010-07-08s4-source4/dsdb/samdb/ldb_modules/operational.c Use DSDB_FLAG_NEXT_MODULE flagKamen Mazdrashki1-3/+7
2010-07-07s4-dsdb: use ldb_operr() in the dsdb codeAndrew Tridgell1-20/+16
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-06-23s4:operational LDB module - fix a misleading commentMatthias Dieter Wallnöfer1-1/+2
2010-06-20s4: Using control bypassoperational allow the logic of this module to be ↵Matthieu Patou1-10/+39
bypassed for some given attributes Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-19dsdb: Make module ops struct for each module public.Jelmer Vernooij1-1/+1
2010-06-15dsdb: Fix includes when building against system ldb.Jelmer Vernooij1-2/+2
2010-05-20s4:operational LDB module - fix warnings (missing parameters, unused variable)Matthias Dieter Wallnöfer1-3/+5
2010-05-20s4:auth Change auth_generate_session_info to take flagsAndrew Bartlett1-10/+10
This allows us to control what groups should be added in what use cases, and in particular to more carefully control the introduction of the 'authenticated' group. In particular, in the 'service_named_pipe' protocol, we do not have control over the addition of the authenticated users group, so we key of 'is this user the anonymous SID'. This also takes more care to allocate the right length ptoken->sids Andrew Bartlett
2010-05-20s4:auth Add dependency from the operational module onto authAndrew Bartlett1-1/+4
We had to split up the auth module into a module loaded by main deamon and a subsystem we manually init in the operational module. Andrew Bartlett
2010-05-20s4:auth Allow the operational module to get a user's tokenGroups from authAndrew Bartlett1-80/+66
This creates a new interface to the auth subsystem, to allow an auth_context to be created from the ldb, and then tokenGroups to be calculated in the same way that the auth subsystem would. Andrew Bartlett
2010-05-20s4:dsdb disable tokenGroups until end of rewriteAndrew Bartlett1-1/+2
I need to change the functions this calls Andrew Bartlett
2010-05-18Remove more usages of iconv_convenience in files which were apparently not ↵Jelmer Vernooij1-3/+1
recompiled by waf.
2010-05-09s4:dsdb Use replPropertyMetaData as the basis for msDS-KeyVersionNumberAndrew Bartlett1-10/+76
This means that the existing kvno will no longer be valid, all unix-based domain members may need to be rejoined, and upgradeprovision run to update the local kvno in secrets.ldb/secrets.keytab. This is required to match the algorithm used by Windows DCs, which we may be replicating with. We also need to find a way to generate a reasonable kvno with the OpenLDAP backend. Andrew Bartlett
2010-05-03s4/rodc: Implement msDS-isRODC constructed attrAnatoliy Atanasov1-1/+152
2010-04-10s4:dsdb Don't return operational attributes on special DNsAndrew Bartlett1-0/+5
2010-03-16s4:dsdb Don't error out if we can't get the Aggregate schema DN yetAndrew Bartlett1-9/+16
It's easier to just set it up when we can, then to deal with the ordering issues in ldb startup. As long as we have it ready if a real client ever asks for it, then we should be happy. Andrew Bartlett
2010-03-04s4:operational LDB - don't accidentally "ate" search helper attributes if we ↵Matthias Dieter Wallnöfer1-6/+14
need them for more constructed attributes With this patch we delete the helper attributes at the end where all constructed attributes have already been computed.