1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

78 Commits

Author SHA1 Message Date
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
Stefan Metzmacher
1d6f321a91 s4:dsdb: add dsdb_module_constrainted_update_int32/64() functions
metze
2010-07-09 09:27:11 +02:00
Stefan Metzmacher
388e955f28 s4:dsdb: add dsdb_msg_constrainted_update_int32/64() functions
metze
2010-07-09 09:27:11 +02:00
Kamen Mazdrashki
609b865691 s4-dsdb/util: Reorder DSDB_FLAG_* checks
On good thing about having more clear function interfaces
(and forcing callers to specify clearly what they want)
is that now I can execute following search:
git grep DSDB_FLAG_NEXT_MODULE | wc -l

This showed that DSDB_FLAG_NEXT_MODULE flag is about 6 times
more frequently used than DSDB_FLAG_OWN_MODULE.
So this should reduce branch prediction by six times
in this part of the code, right :)
2010-07-08 02:38:36 +03:00
Kamen Mazdrashki
0c4bbb7106 s4-dsdb: Implement module switching in dsdb_module_search_dn()
This allows caller to choose from where to start DN search
2010-07-08 02:38:36 +03:00
Kamen Mazdrashki
64c31b7e0a s4-source4/dsdb/samdb/ldb_modules/util.c Use DSDB_FLAG_NEXT_MODULE flag 2010-07-08 02:38:32 +03:00
Andrew Tridgell
87df785a68 s4-dsdb: use ldb_operr() in the dsdb code
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-07 20:14:55 +10:00
Matthias Dieter Wallnöfer
368aa25f7c s4:dsdb_module_load_partition_usn - check for "res->count" equal/unequal to 1 2010-07-03 12:47:46 +02:00
Kamen Mazdrashki
5a66edc99e s4/dsdb: Assert DSDB_FLAG_*_MODULE is always passed in function call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:08:12 +10:00
Kamen Mazdrashki
73474998e1 s4-source4/dsdb/samdb/ldb_modules/util.c Use DSDB_FLAG_NEXT_MODULE flag
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-02 10:08:07 +10:00
Matthias Dieter Wallnöfer
87d0f63632 s4:dsdb - add a new dsdb delete function which understands the tree delete control 2010-06-20 18:52:29 +02:00
Matthias Dieter Wallnöfer
df63b2ca0e s4:get_last_structural_class - only real structural classes can be candidates for fetching the last one
Classes with objectCategory = 1 are always structural, these with
objectCategory = 0 also (as we can see in our Windows 2008 R2 schema file where
class "Person" has 0 but is structural).

Abstract classes and auxiliary ones cannot be considered (objectCategory = 2, 3)

http://msdn.microsoft.com/en-us/library/ms677964(VS.85).aspx
2010-06-06 20:48:42 +02:00
Matthias Dieter Wallnöfer
c2a3792e72 s4:dsdb/samdb/ldb_modules/util.c - make sure to always free temporary data 2010-05-30 20:52:11 +02:00
Matthias Dieter Wallnöfer
b7270fbc99 s4:dsdb_module_search_dn - add code to handle NULL format string 2010-05-30 20:52:10 +02:00
Anatoliy Atanasov
f84aeea739 s4/rodc: Support read-only database
Check on modify if we are RODC and return referral.
On the ldap backend side now we pass context and ldb_modify_default_callback
to propagate the referral error to the client.
2010-05-04 18:32:18 +02:00
Anatoliy Atanasov
dbbbc7d1f8 s4/rodc: RODC FAS initial implementation 2010-04-29 10:18:06 +03:00
Andrew Tridgell
bb1ba4ff76 s4-drs: added new SECURITY_RO_DOMAIN_CONTROLLER level
This is used for allowing operations by RODCs, and denying them
operations that should only be allowed for a full DC

This required a new domain_sid argument to
security_session_user_level()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Rusty Russell <rusty@samba.org>
2010-04-22 19:36:16 +10:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Endi S. Dewata
5d5fc92c69 s4:dsdb - Handle INVALID_DN_SYNTAX from OpenLDAP in dsdb_module_load_partition_usn().
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-04-08 22:59:10 +02:00
Eduardo Lima
af807758e8 s4-drs: replmd_delete with the 3 stage deletion recycle bin 2010-03-26 16:50:48 +11:00