1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

97 Commits

Author SHA1 Message Date
Stefan Metzmacher
6d4c4855c9 s4:dsdb/samdb: add const to dsdb_make_object_category()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
0b4d3db42d s4:dsdb/ldb_modules: make it possible to find a reason for LDB_ERR_NO_SUCH_OBJECT in util.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-02-01 09:53:10 +01:00
Volker Lendecke
77c6cdcbd5 dsdb: Fix CID 1034803 Dereference null return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-23 22:12:09 +02:00
Volker Lendecke
6ed5b4ec8b dsdb: Fix CID 1034804 Dereference null return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-23 22:12:09 +02:00
Kamen Mazdrashki
1154075220 s4-dsdb: Make most specific objectCategory for an object
This is lightweight implementation and should be used on objects
with already verified objectClass attribute value - eg. valid classes,
sorted properly, etc.
Checkout objectclass.c module for heavy weight implementation.

Change-Id: Ifa7880d26246f67e2f982496fcc6c77e6648d56f
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2015-02-03 05:02:11 +01:00
Volker Lendecke
7c2b5e77b0 Use GUID_equal in a few places
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-10 19:19:13 +02:00
Howard Chu
5426e57898 Fix DN RDN case in partition names
Move fix_dn from extended_dn_out.c to util.c

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Tue Sep 24 07:43:39 CEST 2013 on sn-devel-104
2013-09-24 07:43:39 +02:00
Andrew Bartlett
cccc0dee04 dsdb: Add DSDB_SEARCH_ONE_ONLY support to dsdb_module_search*()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-16 19:36:36 +02:00
Andrew Bartlett
74bfec0269 dsdb-acl: Add helper function dsdb_get_structural_oc_from_msg()
This will eventually replace get_oc_guid_from_message(), returning the full dsdb_class.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-21 16:12:45 +01:00
Andrew Bartlett
9566786853 s4-dsdb: Add mem_ctx argument to samdb_ntds_settings_dn
As this value is calculated new each time, we need to give it a context to live on.

If the value is the forced value during provision, a reference is taken.

This was responsible for the memory leak in the replication process.  In the
example I was given, this DN appeared in memory 13596 times!

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 14 10:05:14 CEST 2012 on sn-devel-104
2012-08-14 10:05:14 +02:00
Matthias Dieter Wallnöfer
0c44d46f24 s4:dsdb/samdb/ldb_modules/schema.c - move "get_last_structural_class()" into "util.c"
And remove this helper module - it does not have much sense keeping it.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 11 06:31:51 CEST 2012 on sn-devel-104
2012-04-11 06:31:51 +02:00
Amitay Isaacs
422fcbbe72 s4-dsdb: Return ldb_result context in dsdb_module_extended
The result of the extended operation is now available in the calling
routine.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:35 +11:00
Andrew Tridgell
365f705345 s4-dsdb: fixed the check_optional_feature() call
the dsdb_check_optional_feature() call should look on our own NTDS DN
for the enabled feature. This should work for all features, not just
for forest wide fetaures.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-07 13:20:44 +11:00
Andrew Bartlett
d40fe50a67 build: avoid util.h as a public header name due to conflict with MacOS 2011-09-23 09:24:03 +02:00
Andrew Tridgell
bcbb35b088 s4-dsdb: assert that base DNs are used correctly
this will catch future programmer errors with incorrect base DNs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
2ba18d89eb s4-dsdb: ensure rIDSetReferences is stored as an extended DN
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-09 11:56:23 +02:00
Matthieu Patou
930fa1ee46 update/add my copyright 2011-07-21 11:44:33 +10:00
Matthieu Patou
245f4b22f4 s4-dsdb: add dsdb_module_extended function similar to other dsdb_module_* functions 2011-07-21 11:44:33 +10:00
Matthieu Patou
7b4e1e78be s4-dsdb: introduce dsdb_module_search_tree
With this function your own search tree can be specified

This function is similar to ldb_build_search_req_ex as it allows to
pass a parse tree structure.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 14:39:12 +04:00
Andrew Bartlett
e3821f2c40 s4-auth Move libcli/security/session.c to the top level
This code is now useful in common, as the elements of the
auth_session_info structure have now been defined in common IDL.

Andrew Bartlett
2011-02-22 16:20:11 +11:00
Kamen Mazdrashki
73972072d7 s4-ldb_modules/util: Implement dsdb_module_find_ntdsguid_for_computer()
as a counterpart for samdb_find_ntdsguid_for_computer()
to be used in LDB modules
2011-02-14 12:32:22 +01:00
Andrew Tridgell
87f3151047 s4-dsdb: pass parent request to dsdb_module_*() functions
this preserves the request hierarchy for dsdb_module_*() calls inside
dsdb ldb modules

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-17 05:23:04 +01:00
Stefan Metzmacher
d7c536b8e4 s4:dsdb:util: dsdb_get_single_valued_attr() only needs a const ldb_messages
metze
2010-12-13 15:32:04 +01:00
Andrew Bartlett
885ecd7b6b s4-dsdb Remove mem_ctx argument from dsdb_module_find_dsheuristics().
A function that does not return memory should not take a memory context.

Andrew Bartlett
2010-11-26 08:50:42 +11:00
Matthias Dieter Wallnöfer
7f171a9e0f s4:password_hash and acl LDB modules - handle the "userPassword" attribute according to the "dSHeuristics" 2010-11-11 10:03:39 +01:00
Matthias Dieter Wallnöfer
ed704c28b2 s4:ldb_modules/util.c - "dsHeuristics" -> "dSHeuristics" 2010-11-11 10:03:38 +01:00
Matthias Dieter Wallnöfer
786a76720c s4:ldb_modules/util.c - "dsdb_get_single_valued_attr" - support the attribute fetch also on LDB add operations
We've to completely ignore the flags in that case.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov  7 11:10:23 UTC 2010 on sn-devel-104
2010-11-07 11:10:23 +00:00
Matthias Dieter Wallnöfer
b78bf4d721 s4:samldb LDB module - improve the "get_single_valued_attr" call and move it into "ldb_modules/util.c"
It will be used by other LDB modules as well.
2010-11-03 17:48:18 +00:00
Andrew Tridgell
4a08b2d172 s4-dsdb: removed the use of ldb_private.h from s4
this will allow s4 to use a system version of ldb
2010-11-03 07:43:57 +11:00
Matthias Dieter Wallnöfer
49dee0e453 s4:dsdb - use the more safe "samdb_msg_add_(u)int*" calls always where possible
This should prevent all possible integer storage problems in future.
2010-10-24 17:57:06 +00:00
Andrew Bartlett
4b4dcaf4b3 s4-dsdb Reset the error string after 'expected' errors.
This helps ensure that we don't get confusing error strings in the
logs on other error cases.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 19 12:16:07 UTC 2010 on sn-devel-104
2010-10-19 12:16:07 +00:00
Matthias Dieter Wallnöfer
42d9978cdd s4:dsdb/samdb/ldb_modules/util.c - remove now unused functions which set integers
Please do always use the functions which specifiy the appropriate integer
length to not run into platform-specific issues. Therefore I'm removing these
generic calls.
2010-10-16 14:39:23 +02:00
Andrew Bartlett
8beaa29242 s4-libcli/security Use seperate subsystem for session related functions
The merged I plan in this area require spliting security.h into
two header files, a common header and a session.h for the
remaining source4-specific code.

Andrew Bartlett
2010-10-12 02:54:16 +00:00
Jelmer Vernooij
2bff55f5de dsdb/modules: Split up helpers a bit to prevent recursive dependencies.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 10 23:47:54 UTC 2010 on sn-devel-104
2010-10-10 23:47:54 +00:00
Jelmer Vernooij
33c4b85058 dsdb: Move attr_in_list to SAMDB_COMMON to avoid circular dependency between SAMDB_COMMON and DSDB_MODULE_HELPERS. 2010-10-10 23:39:47 +02:00
Matthias Dieter Wallnöfer
e3081b92c1 s4:dsdb - substitute the "show_deleted" with the "show_recycled" control
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-10-03 15:23:18 +00:00
Andrew Bartlett
88abf441d0 s4-dsdb Add ldb_reset_err_string() when we set error codes.
If we don't we could show an old, incrorrect error
2010-09-29 04:23:07 +10:00
Andrew Tridgell
1587b46fa0 s4-ldb: removed an unused variable 2010-09-27 22:55:04 -07:00
Andrew Tridgell
85ba79063f ldb: mark the location of a lot more ldb requests 2010-09-25 10:38:45 -07:00
Andrew Tridgell
5568fcd88b s4-dsdb: added tagging of requests in dsdb modules
this allows you to call dsdb_req_chain_debug() in gdb or when writing
debug code to see the request chain
2010-09-25 10:38:45 -07:00
Nadezhda Ivanova
99f0891944 s4-dsdb: Fixed a call to the wrong ops function in dsdb_module_search_dn. 2010-09-25 10:19:11 -07:00
Nadezhda Ivanova
c679290f6e s4-dsdb: Fixed a compiler warning. 2010-08-27 12:34:27 +03:00
Matthias Dieter Wallnöfer
b11b2425a9 s4:dsdb_module_find_dsheuristics - free the "DN" also on other exit cases 2010-08-26 21:06:06 +02:00
Nadezhda Ivanova
ff2037876f s4-dsdb: Removed an unnecessary space in dsdb_module_find_dsheuristics() 2010-08-26 17:37:49 +03:00
Nadezhda Ivanova
a571487e6c s4-dsdb: Added utility functions for retrieving dSHeuristics from the module stack
Also a function to check dsHeuristics value to determine of anonymous access should be blocked
2010-08-26 17:18:40 +03:00
Andrew Tridgell
896f10301c s4-dsdb: check the type of session_info from the opaque
we saw a crash with a bad pointer here, and this may help track it
down

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:51 +10:00
Nadezhda Ivanova
d50a9e8d9e s4-dsdb: Removed kludge_acl as it is no longer necessary
Moved the access check on extended operations to acl module and removed kludge_acl
2010-08-04 15:22:17 +03:00
Matthias Dieter Wallnöfer
f997fd299d s4:dsdb/samdb/ldb_modules/util.c - remove unused variables 2010-08-01 11:33:37 +02:00
Stefan Metzmacher
217177a4df s4:dsdb: add dsdb_module_constrainted_update_uint32/64() wrapper functions
metze
2010-07-09 09:27:12 +02:00
Stefan Metzmacher
65ca5a3542 s4:dsdb: add dsdb_msg_constrainted_update_uint32/64() wrapper functions
metze
2010-07-09 09:27:11 +02:00