1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

480 Commits

Author SHA1 Message Date
Andrew Tridgell
c122939919 s4-drs: implement RODC attribute filtering override
When a RODC uses extended getncchanges operation
DRSUAPI_EXOP_REPL_SECRET it gets an override on the ability to
replicate the secret attributes.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-20 20:34:11 +10:00
Kamen Mazdrashki
c5ec1f3d92 s4-dsdb: Use dsdb_syntax_ctx in *_drsuapi_to_ldb functions 2010-08-19 03:34:02 +03:00
Kamen Mazdrashki
b5af7b9a1e s4-dsdb: Use dsdb_syntax_ctx in *_ldb_to_drsuapi functions 2010-08-19 03:34:01 +03:00
Matthias Dieter Wallnöfer
eb345ebedf s4:samdb_set_password/samdb_set_password_sid - make more arguments "const" 2010-08-17 18:45:33 +02:00
Matthias Dieter Wallnöfer
d72d7f9c5f s4:samdb_set_password/samdb_set_password_sid - make the adaptions to support the password change control
And introduce parameters to pass the old password hashes.
2010-08-17 18:45:33 +02:00
Matthias Dieter Wallnöfer
bbb9dc806e s4:DSDB - rename the "DSDB_CONTROL_PASSWORD_CHANGE_OLD_PW_CHECKED_OID"
Rename it to "DSDB_CONTROL_PASSWORD_CHANGE_OID". This control will afterwards
contain a record with the specified old password as NT and/or LM hash.
2010-08-17 18:45:32 +02:00
Andrew Tridgell
6baa834ebe s4-ldb: use LDB_FLAG_MOD_TYPE() to extract element type from messages
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-17 21:21:50 +10:00
Matthias Dieter Wallnöfer
dadcc84009 s4:samdb_set_password_sid - fix comment
Add more possible result NTSTATUS codes
2010-08-16 18:45:26 +02:00
Matthias Dieter Wallnöfer
1fc3676974 s4:samdb_set_password - fix formatting
(Sorry, I've overseen this)
2010-08-15 19:45:29 +02:00
Matthias Dieter Wallnöfer
3fcd76237d s4:samdb_set_password - implement the extended LDAP error code detection 2010-08-15 19:42:40 +02:00
Matthias Dieter Wallnöfer
07af3f289e s4:samdb_set_password - return "NT_STATUS_WRONG_PASSWORD" when a user account doesn't exist
This is for the (SAMR) account detection protection mechanism.
2010-08-14 18:48:20 +02:00
Matthias Dieter Wallnöfer
303089f5b8 s4:dsdb/common/util.c - provide a call which returns the forest function level
Sooner or later we'll need this too since not all operations depend only on the
current's domain function level (see the MS-ADTS docs).
2010-08-10 19:08:56 +02:00
Matthias Dieter Wallnöfer
e53fc1228f s4:dsdb/common/util.c - use LDB constants whenever possible 2010-08-10 19:08:56 +02:00
Matthias Dieter Wallnöfer
25e973d5db s4:dsdb/common/util.c - add a function "dsdb_add" 2010-08-07 14:22:41 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
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-16 18:24:27 +10: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
9c8135785a s4:dsdb - samdb_result_force_password_change - also when "pwdLastSet" is "-1" we shouldn't force a password change
This value is set by the ADUC console.
2010-07-06 21:54:20 +02:00
Nadezhda Ivanova
5a18fc2b2a Implementation of self membership validated right.
When this right is granted, the user can add or remove themselves from a group even
if they dont have write property right.
2010-06-28 10:43:50 +03:00
Matthias Dieter Wallnöfer
c38f94ed9b s4:dsdb_load_partition_usn - free the right memory context (tmp_ctx) 2010-06-21 11:10:02 +02: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
Andrew Bartlett
ecfce7365c s4:dsdb Add control for signaling between repl_meta_data and linked_attributes
This control will allow the linked_attributes module to know if
repl_meta_data has already handled the creation of forward and back
links.

Andrew Bartlett
2010-06-16 09:57:51 +10:00
Andrew Bartlett
8ea4118472 s4:dsdb Add const to dsdb_dn functions that operate on an ldb_val.
Andrew Bartlett
2010-06-15 10:53:50 +10:00
Matthias Dieter Wallnöfer
cadf774f8b s4:dsdb/common/util.c - provide a better implementation of the "samdb_msg_add_(add/del)val" calls
This supports now also coexisting add and delete message elements with the
same attribute name.
2010-06-06 20:47:10 +02:00
Matthias Dieter Wallnöfer
0fce829de4 s4:dsdb_load_udv_v1 - "uint32_t" counter type fits better than "unsigned int" 2010-05-31 22:43:28 +02:00
Matthias Dieter Wallnöfer
f927881028 s4:dsdb/common/util.c - fix a counter variable 2010-05-30 20:52:10 +02:00
Matthias Dieter Wallnöfer
189950ce06 s4:dsdb_enum_group_mem - use "unsigned" counters
"size_t" counters aren't really needed here (we don't check data lengths).
And we save the result in a certain "num_sids" variable which is of type
"unsigned".
2010-05-24 22:01:36 +02:00
Matthias Dieter Wallnöfer
4d76c0aa80 s4:dsdb_lookup_rids - "unsigned" counters fit better than "signed" in this case 2010-05-24 22:01:20 +02:00
Matthias Dieter Wallnöfer
9696bba1d7 s4:dsdb_add_user - check the "cn"/"account_name" length (should be >= 1)
This needed by the "cn_name_len"-1 accesses.

And use a "size_t"-typed variable for storing it (length specificators should
always be stored using "size_t" variables).
2010-05-24 21:55:11 +02:00
Andrew Bartlett
f6aa090202 s4:samr Push most of samr_LookupRids into a helper function
This is a rewrite of the lookup_rids code, using a query based on the
extended DN for a clearer interface.

By splitting this out, the logic is able to be shared, rather than
copied, into a passdb wrapper.

Andrew Bartlett
2010-05-24 23:08:56 +10:00
Andrew Bartlett
c6ffd884d9 s4:samr Push most of samr_QueryGroupMember into a helper function
This is a rewrite of the group membership lookup code, using the
stored extended DNs to avoid doing the lookup into each member to find
the SID

By splitting this out, the logic is able to be shared, rather than
copied, into a passdb wrapper.

Andrew Bartlett
2010-05-24 23:08:49 +10:00
Andrew Bartlett
20d2847492 s4:samr Move most of samr_CreateDomAlias into a helper function
This allows this logic to be shared, rather than copied, into a passdb
wrapper.

Andrew Bartlett
2010-05-24 23:08:11 +10:00
Andrew Bartlett
fc04e565b0 s4:samr Split most of samr_CreateDomainGroup into a helper function
This allows this logic to be shared, rather than copied, into a passdb
wrapper.

Andrew Bartlett
2010-05-24 23:08:11 +10:00
Andrew Bartlett
43c931b2d4 s4:samr Split the guts of samr_CreateUser2 into a helper function
This allows this logic to be shared, rather than copied, into a passdb
wrapper.

Andrew Bartlett
2010-05-24 23:08:11 +10:00
Andrew Bartlett
e0d141bd46 s4:dsdb Allow a NULL search expression in dsdb_search()
The NULL search expression expands to (objectClass=*), but %s expands
NULL to (NULL) which doesn't parse...

Andrew Bartlett
2010-05-24 23:08:11 +10:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Anatoliy Atanasov
26d41c23f6 s4-rodc: Cache am_rodc flag 2010-05-17 13:30:27 +03:00
Stefan Metzmacher
11730520a7 s4:dsdb: fix samdb_result_logon_hours() and don't hardcode units_per_week
metze
2010-05-13 19:12:42 +02:00
Stefan Metzmacher
7e49fd92ca s4:dsdb: cached results of samdb_rodc()
metze
2010-05-11 18:11:06 +02:00
Matthias Dieter Wallnöfer
029351571a s4:samdb_set_password - adapt it for the user password change handling
Make use of the new "change old password checked" control.
2010-05-10 19:12:26 +02:00
Matthias Dieter Wallnöfer
6e8098b261 s4:samdb_set_password/samdb_set_password_sid - Rework
Adapt the two functions for the restructured "password_hash" module. This
means that basically all checks are now performed in the mentioned module.

An exception consists in the SAMR password change calls since they need very
precise NTSTATUS return codes on wrong constraints ("samr_password.c") file
2010-05-10 19:07:46 +02:00
Matthias Dieter Wallnöfer
946993238f s4:dsdb/util.c - Add a new function for retrieving password change attributes
This is needed since we have not only reset operations on password fields
(attributes marked with REPLACE flag) but also change operations which can be
performed by users itself. They have one attribute with the old value marked
with the REMOVE flag and one with the new one marked with the ADD flag.
This function helps to retrieve them (argument "new" is used for the new
password on both reset and change).
2010-05-10 12:20:27 +02:00
Andrew Bartlett
6dfa851ce9 s4:dsdb Provide an intelegent fallback if not CN=Subnets is found
We may as well fall back rather than return NULL (which callers don't
do useful things with).

Andrew Bartlett
2010-05-09 21:18:52 +10: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
d3081741c9 s4/rodc: Implement msDS-isRODC constructed attr 2010-05-03 18:28:00 +02:00
Anatoliy Atanasov
dbbbc7d1f8 s4/rodc: RODC FAS initial implementation 2010-04-29 10:18:06 +03:00
Kamen Mazdrashki
bf49ac99c9 s4/dsdb: dsdb_validate_invocation_id() should validate by objectGUID
This function is used in DRSUpdateRefs() implementation where we
get DSA's objectGUID rather than invocationId
2010-04-28 12:11:03 +03:00
Stefan Metzmacher
4d191b6fa7 s4:dsdb/common: if we don't have the ip of the client return the server site as client site
metze
2010-04-27 13:00:24 +02:00
Matthias Dieter Wallnöfer
093d35661d s4:util - add a function which finds the matching client site using the client address
The lookup of the client site is done using the subnets in the configuration
partition. If no one matches we use the Windows Server fallback mechansim.
This means: if only one site is available just use it. If they're more set the
output variable to "".

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-27 15:24:41 +10:00
Andrew Tridgell
1f92df90fd s4-drs: removed dsdb_validate_client_flags()
This test is in the wrong place. We end up validating our own flags.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:16 +10:00
Andrew Tridgell
a06b537cc3 s4-dsdb: added dsdb_validate_invocation_id()
this validates that a invocationID matches an account sid

This will be used to ensure that we don't allow DRS replication
from someone a non-DC or administrator

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:16 +10:00
Andrew Tridgell
1ecefd74a2 s4-dsdb: added dsdb_get_extended_dn_sid()
This will be used by the RODC code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
73513fb7e7 s4-drs: Use new samdb_rodc() function in s4 code
This patch fits the calling to the new samdb_rodc() function and
fix a little bug in this function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
fbdbd67c76 s4-drs: dsdb_validate_client_flags() function
This function is intended to check if some client is not lying about
his flags. At this moment, it only checks for RODC flags.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Fernando J V da Silva
57bcdf008f s4-drs: samdb_is_rodc() function and new samdb_rodc() function
This patch creates the samdb_is_rodc() function, which looks for
the NTDSDSA object for a DC that has a specific invocationId
and if msDS-isRODC is present on such object and it is TRUE, then
consider the DC as a RODC.
The new samdb_rodc() function uses the samdb_is_rodc() function
for the local server.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-22 19:36:15 +10:00
Andrew Bartlett
ea5cf7ce05 s4:provision Pass in the invoication ID and NTDS Settings DN to Schema()
By putting these values into the cache on the LDB, this reduces some
of the noise in provision, particularly with the LDAP backend.

Andrew Bartlett
2010-04-20 12:11:18 +10:00
Nadezhda Ivanova
eef184301a s4:Replaced dsdb_get_dom_sid_from_ldb_message() with samdb_result_dom_sid() 2010-04-16 14:28:35 +03:00
Matthias Dieter Wallnöfer
34ff1c6944 s4:samdb_server_site_name - fix indentation 2010-04-13 15:40:43 +02:00
Matthias Dieter Wallnöfer
719a46913b s4:dsdb/common/util.c - add a call which determines centrally the forest DNS domainname 2010-04-13 09:32:33 +02:00
Matthias Dieter Wallnöfer
c116d80053 s4:remove "samdb_root_dn", "samdb_base_dn", "samdb_config_dn" and "samdb_schema_dn"
They aren't needed anymore.
2010-04-13 08:57:07 +02: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
Matthias Dieter Wallnöfer
568ca2433d s4:samdb_server_site_dn - free unused DNs in the right way 2010-04-11 13:20:44 +02:00
Andrew Bartlett
d0b54476fc s4:dsdb Move dsdb_save_partition_usn() to be a module helper function
This function should not traverse the module stack again, but instead
run from this point.  Also add a matching
dsdb_module_load_partition_usn() and change repl_meta_data to match.

Andrew Bartlett
2010-03-22 20:24:41 +11:00
Nadezhda Ivanova
be79f572ed Split the dsdb_access_check_on_dn.
Split the dsdb_access_check_on_dn so it can be reused for checks
from both within the module stack and outside it.
2010-03-12 03:13:51 +02:00
Nadezhda Ivanova
222b955237 Moved access_check_on_dn from acl module as an utility.
Made this an utility function so it can be used for access checking
outside of the acl ldb module, such as checking validated writes and
control access rights in other protocols (e. g drs)
2010-03-12 00:20:15 +02:00
Nadezhda Ivanova
deebbe7cfa A helper function to get the Infrastructure DN. 2010-03-09 14:56:46 +02:00
Matthias Dieter Wallnöfer
61ae4be256 s4:dsdb/util - Change also here counters to "unsigned"
No need to have "signed" counters at those places.
2010-03-05 18:30:08 +01:00
Anatoliy Atanasov
b73437fbaa s4/rodc: Implement samdb_rodc with ldb context 2010-03-01 14:17:32 +02:00
Andrew Tridgell
64911507a0 s4-dsdb: fixed the fetch of the server site name
when the ntds objects were moved by a recent change it broke the
calculation of the server site

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-26 13:22:12 +11:00
Matthias Dieter Wallnöfer
eca8697d61 s4:dsdb/util.c - Use LDB result constants in some more helper functions
Always better to rely on the standards rather than on custom results.
2010-02-21 21:43:47 +01:00
Andrew Tridgell
018fb2d1ae s4-dsdb: return LDB_ERR_CONSTRAINT_VIOLATION on num_recs != 1
In a single record search, LDB_ERR_CONSTRAINT_VIOLATION is more useful
than the generic LDB_ERR_OPERATIONS_ERROR

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16 21:10:52 +11:00
Andrew Tridgell
b630530730 s4-dsdb: added dsdb_search_one() and cleanup dsdb_find_dn_by_guid()
dsdb_find_dn_by_guid() now takes a struct GUID instead of a
guid_string. All the callers in fact wanted a struct GUID, so we now
avoid the extra conversion.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16 21:10:51 +11:00
Andrew Tridgell
8f4a34272e s4-dsdb: replace dsdb_find_dn_by_guid() with a dsdb_search() call
much simpler code by using dsdb_flags

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16 21:10:51 +11:00
Andrew Tridgell
e9be1fc41d s4-dsdb: change dsdb_search_dn_with_deleted() to dsdb_search_dn() with dsdb_flags
Allows for arbitrary controls
2010-02-16 21:10:51 +11:00
Andrew Tridgell
90203f87e7 s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flags
This allows for controls to be added easily where they are needed.
2010-02-16 21:10:50 +11:00
Andrew Tridgell
c6d85d67f9 s4-dsdb: replace dsdb_modify_permissive() with dsdb_modify() and dsdb_flags 2010-02-16 21:10:50 +11:00
Andrew Tridgell
67950c27e4 s4-dsdb: move dsdb_request_add_controls() into dsdb/common/util.c
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-02-16 21:10:50 +11:00
Andrew Tridgell
4694b4677a s4-dsdb: added dsdb_modify_permissive()
This will be used in the drsuapi server
2010-02-15 18:58:40 +11:00
Matthias Dieter Wallnöfer
415c615dbf s4:util.c - Corrected the location of the "Directory Service" object
I wonder why nobody noticed this since for sure this "tombstone" functionality
was broken till now.
2010-02-13 18:24:45 +01:00
Andrew Tridgell
5549190b37 s4-dsdb: use TYPESAFE_QSORT() in dsdb code 2010-02-13 22:36:12 +11:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Andrew Tridgell
db7eba7080 s4-dsdb: add our local cursor and sort in dsdb_load_udv_*()
This makes things much simpler for the callers
2010-01-16 14:10:43 +11:00
Andrew Tridgell
4cef7427ec s4-dsdb: added dsdb_load_udv_v2() and dsdb_load_udv_v1() 2010-01-16 14:10:43 +11:00
Fernando J V da Silva
e30d009965 s4-drs: Store uSNUrgent for Urgent Replication
When a object or attribute is created/updated/deleted, according
to [MS-ADTS] 3.1.1.5.1.6, it stores the uSNUrgent on @REPLCHANGED
for the partitions that it belongs.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-14 15:37:58 +11:00
Stefan Metzmacher
232197e9ab s4:dsdb/common: fix major bug in lsa_BinaryString to ldb_val conversation.
In lsa_BinaryString length and size are byte counts!

TODO: we may need to do byte order conversion in this functions too...

metze
2010-01-13 14:52:00 +01:00
Stefan Metzmacher
5d08309204 s4:dsdb/common: let samdb_msg_add_uint() call samdb_msg_add_int()
This is important as LDAP servers always play with int32 values
and we have to encode 0x80000000 as "-2147483648" instead of "2147483648".

metze
2010-01-13 14:51:59 +01:00
Stefan Metzmacher
2d7ad938d0 s4:dsdb/common: let samdb_msg_add_uint64() call samdb_msg_add_int64()
This is important as LDAP servers always play with int64 values
and we have to encode 0x8000000000000000LL as "-9223372036854775808"
instead of "9223372036854775808".

metze
2010-01-13 14:51:59 +01:00
Andrew Tridgell
d5091a1dd9 s4-dsdb: added samdb_domain_sid_cache_only() 2010-01-10 13:23:37 +11:00
Andrew Tridgell
8c2d7ae19e s4-dsdb: added samdb_ldb_val_case_cmp() 2010-01-09 18:56:29 +11:00
Andrew Tridgell
349f7ba09c s4-drs: added filtering by udv in getncchanges
When a client supplied an uptodateness_vector, we can use it to filter
what objects we return. This greatly reduces the amount of replication
traffic between DCs.
2010-01-09 13:11:27 +11:00
Andrew Tridgell
8cd2bedee7 s4-dsdb: added dsdb_find_guid_attr_by_dn()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:00 +11:00
Andrew Tridgell
2bad107aa1 s4-dsdb: added samdb_rid_set_dn()
This returns the DN of our RID Set object

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:02:58 +11:00
Andrew Tridgell
fbc3a0fe62 s4-dsdb: added samdb_reference_dn()
This returns a 'reference' DN, which is a link to a DN, from the
specified object. It is then used by samdb_server_reference_dn() which
returns the serverReference DN, and samdb_rid_manager_dn() which
returns the rIDManagerReference DN.
2010-01-08 13:02:58 +11:00
Andrew Tridgell
00b39c70f5 s4-dsdb: switched to using RMD_FLAGS instead of DELETED in extended DNs
This allows for more flags in the future
2010-01-02 08:16:57 +11:00
Andrew Tridgell
08bad38035 s4-dsdb: fixed several memory leaks
need to be careful with those temporary contexts
2010-01-02 08:16:56 +11:00
Andrew Tridgell
031460b8a2 s4-dsdb: fixed samdb_create_foreign_security_principal() to use the wellknown GUID
This also fixes a memory leak
2010-01-02 08:16:56 +11:00
Andrew Tridgell
9819d280d6 s4-dsdb: added dsdb_tombstone_lifetime() 2010-01-02 08:16:56 +11:00
Andrew Tridgell
6628588dfb s4-dsdb: added dsdb_set_extended_dn_guid() 2010-01-02 08:16:55 +11:00
Andrew Tridgell
5e52c7149f s4-dsdb: added parse functions for DRS linked attribute blobs 2010-01-02 08:16:54 +11:00
Andrew Tridgell
64802c5e27 s4-dsdb: added dsdb_dn_is_upgraded_link_val()
This is used to detect if a link has been stored in the w2k3 extended
format
2010-01-02 08:16:51 +11:00
Andrew Tridgell
b1db66a501 s4-dsdb: allow the component name to be specified in dsdb_get_extended_dn_guid()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Kamen Mazdrashki
7685bbbc4e s4-dsdb-util: Execute ldb_request using LDB_CONTROL_AS_SYSTEM
This function is intended to be used when data needs
to be modified skipping access checks.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:44:53 +11:00
Kamen Mazdrashki
11e2c5777d s4-dsdb-util: Utility function to process ldb_request in transaction
This function is to be used later for manually crafted
ldb_requests from within dsdb layer

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:44:47 +11:00
Andrew Tridgell
9d56f656d4 s4-dsdb: added dsdb_get_extended_dn_uint64() 2009-12-21 23:41:05 +11:00
Andrew Tridgell
2c88ffb8f1 s4-dsdb: added two new dsdb_get_extended_dn_*() helper functions
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-21 23:41:04 +11:00
Andrew Tridgell
db76e65318 s4-dsdb: fixed the sort in dsdb_find_nc_root() 2009-12-18 21:03:39 +11:00
Matthias Dieter Wallnöfer
bbec305135 s4:"samdb_set_password" - remove delete instructions
They won't work when the LDB change is done using "samdb_replace"
(consider "samr_password.c" functions).

I think this has been a relict which has been useful before the "password_hash"
module existed. Basically it itself does now the updates.
2009-12-17 20:00:19 +01:00
Matthias Dieter Wallnöfer
1d0f364fad s4:dsdb/common/util - make NTTIME attribute wrappers use a "const" message
There is no reason to have the message non-const here.
2009-12-17 12:43:10 +01:00
Andrew Tridgell
6c2125572c s4-dsdb: added dsdb_get_deleted_objects_dn()
This is based on the code from Eduardo Lima <eduardoll@gmail.com>, but
uses the new helper functions added in the last couple of commits

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16 20:56:22 +11:00
Andrew Tridgell
3c1f18c5e2 s4-dsdb: added dsdb_find_nc_root()
This is based on the function of the same name from Eduardo Lima
<eduardoll@gmail.com>, but using ldb_dn_compare, to give us
comparisons consistent with what the rest of the code uses.

We will use this function in combination with dsdb_wellknown_dn() to
find the Deleted Objects container for any object.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16 20:56:22 +11:00
Andrew Tridgell
7d0fdcae1e s4-dsdb: added dsdb_wellknown_dn()
This finds a wellknown object given its GUID

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16 20:56:22 +11:00
Andrew Tridgell
152f415ba8 s4-dsdb: added dsdb_dn_is_deleted_val()
This is used to determine if a extedned DN has the 'DELETED=1'
component

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16 20:56:20 +11:00
Andrew Tridgell
7f16da7473 s4-dsdb: return a zero guid on error in samdb_result_guid() 2009-12-14 22:29:58 +11:00
Matthias Dieter Wallnöfer
f8c34c4df1 s4:"samdb_set_password_sid" - clean up created objects correctly
- We should clean up such "helper" objects created in this function to don't
  have them around until "mem_ctx" is destroyed
- Remove a from my view pointless comment "This is a password set, not change"
  since an external argument "user_change" decides this ("modify" or "(re)set")
2009-12-13 16:13:34 +01:00
Andrew Tridgell
261ba40e77 s4-dsdb: use GUID_to_ndr_blob() 2009-12-10 17:51:29 +11:00
Andrew Tridgell
d337cefa92 s4-dsdb: simplify samdb_result_guid() 2009-12-10 17:51:27 +11:00
Andrew Tridgell
08e8988bd8 s4-dsdb: use GUID_from_ndr_blob() to create dsdb_get_extended_dn_guid() 2009-12-10 17:51:26 +11:00
Andrew Tridgell
0fca76e577 s4-dsdb: added dsdb_functional_level() helper function 2009-12-09 18:18:26 +11:00
Andrew Bartlett
45cd4c93fb s4:dsdb Make parentGUID handler use dsdb_module_search_dn()
This avoids doing a new search from the top of the module stack.

This also removes the helper function dsdb_find_parentguid_by_dn()
which is now unused.

Andrew Bartlett
2009-12-07 13:07:03 +11:00
Andrew Tridgell
ced3eef776 s4-drsutil: fixed a memory leak in samdb_search_count
In general functions that don't return any memory should not take a memory context.
Otherwise it is too easy to have a bug like this where memory is leaked
2009-12-04 17:49:19 +11:00
Andrew Bartlett
7b2bd93635 s4:dsdb Add function to return the CN=Aggregate schema DN 2009-11-24 10:39:09 +11:00
Kamen Mazdrashki
1bf31f343c s4/schema: Object(OR-Name) syntax handling for DRS calls
OR-Name syntax through DRS calls looks like DN-Binary syntax
2009-11-23 14:15:05 +01:00
Fernando J V da Silva
8481581dc4 s4-drs: Utility functions to deal with GUID
dsdb_find_parentguid_by_dn() returns the parentGUID for a given DN
dsdb_msg_add_guid() adds a GUID value to a given message (either
objectGUID or parentGUID).

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20 13:53:47 +11:00
Matthias Dieter Wallnöfer
da3d471d10 s4:samdb util - add a call for generating a correct "lDAPDisplayName"
This is needed for the SAMLDB module enhancement regarding schema objects.
The algorithm in pseudo code is located in MS-ADTS 3.1.1.2.3.4.
2009-11-15 14:26:40 +01:00
Andrew Tridgell
c8884e1cf2 s4-ldb: changed the DN checks for \n to warnings
a \n is sometimes allowed in AD (eg in deleted DNs). Until we know
when is really is allowed, treat it as a warning only.
2009-11-13 19:32:47 +11:00
Andrew Bartlett
2a601719f2 s4:dsdb Add expected value tests for most DRS syntax conversions
I've left out those for which I could not find an expected value in my
default Windows 2003 server's database, and the values that rely on
the current prefix map at the time.

Andrew Bartlett
2009-11-12 16:34:12 +11:00
Andrew Bartlett
6fd6dc1089 s4:dsdb Cosmetic fixes found by metze in review of dsdb_dn changes
These changes include reworking the code to call ldb_module_get_ctx()
less often (avoid the function calls, particularly during the step
into a complex function).

Andrew Bartlett
2009-11-12 16:34:07 +11:00
Andrew Bartlett
4e2b4be9d3 s4:dsdb Ensure we allow 'odd' lengths for DN+String
(Found in a code review by metze)

Andrew Bartlett
2009-11-12 16:34:07 +11:00
Andrew Bartlett
da1ac55bc1 s4:dsdb Add extensive tests for the behaviour of dsdb_dn 2009-11-12 16:34:06 +11:00
Andrew Bartlett
390ac7d306 s4:dsdb Add new dsdb_dn to handle DN+Binary and DN+String
This aims to replace (and is based on) the code in ldb_dn.c.  It is
however much stricter in the DNs it will accept.

Andrew Bartlett
2009-11-12 16:34:03 +11:00
Matthias Dieter Wallnöfer
22d9610a1f s4:dsdb/common/util - samdb_result_hashes - use "unsigned int" for counters 2009-11-07 12:21:14 +01:00
Matthias Dieter Wallnöfer
0bcedb6ba7 s4:samdb_check_password - allow the password string to be NULL
This deactivates the password complexity check, but not the minimum password
length one, since the length is specified.
This change is needed by my password module work.
2009-11-06 15:38:31 +01:00
Matthias Dieter Wallnöfer
bb531b0399 s4:samdb_validate_password - Adapt the function to use the UNIX charset for the password data blob 2009-11-06 15:19:39 +01:00
Matthias Dieter Wallnöfer
85f61e5342 s4:dsdb/common/util - Add a new utility function "samdb_check_password"
This function performs basic password checks and will be used by the
"samrValidatePassword" call and the "password_hash" module.
2009-11-05 12:43:02 +01:00
Matthias Dieter Wallnöfer
3a6bde799d s4:samdb_set_password/samdb_set_password_sid - Better comments and cosmetics 2009-11-05 12:43:02 +01:00
Matthias Dieter Wallnöfer
85e4995364 s4:sites - get the server site (name) from DSDB 2009-10-18 14:33:43 +02:00
Andrew Tridgell
94897d7a7c s4-dsdb: added samdb_rodc() and samdb_ntds_options()
Later we will need to make samdb_rodc() look in the database, but for
now we should at least have the function in a central place
2009-10-15 08:20:37 +11:00
Andrew Bartlett
1dfa2ed423 s4:provision Remove all references to samba4LocalDomain
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-12 16:50:49 +11:00
Matthias Dieter Wallnöfer
607ceff234 s3/s4 - Adapt the IDL changes on various locations 2009-10-08 09:50:19 +02:00
Matthias Dieter Wallnöfer
2cbff7496e s4:samdb_set_password - Return the maximum password age when requested (not the minimum one) 2009-10-02 17:28:04 +02:00
Matthias Dieter Wallnöfer
6edb92f337 s4:samdb_set_password - cosmetic fixes 2009-10-02 17:27:30 +02:00
Matthias Dieter Wallnöfer
0227697bf4 s4:dsdb/common/sidmap - Remove
As metze pointed out - this seems to be completely dead code. I too didn't find
any dependencies in other code parts. Therefore remove it.
2009-10-02 14:22:49 +10:00
Matthias Dieter Wallnöfer
6637887373 s4:dsdb/common/util - remove introduced "samdb_is_capable_dc" call
I came up with a better solution which is invoked when we try to join a domain
as a DC (in file "libnet_become_dc.c"). Consider a following commit for this
patch.
2009-09-30 15:58:42 +02:00
Andrew Tridgell
d515b6e326 s4-dsdb: ask for an extended DN in dsdb_find_dn_by_guid() 2009-09-28 10:23:20 +10:00
Andrew Tridgell
9e32648768 s4-dsdb: make dsdb_search_dn_with_deleted public for repl_meta_data module 2009-09-28 10:22:50 +10:00
Andrew Tridgell
1fa735cc86 s4-drs: add SHOW_DELETED control on dsdb utility calls
The dsdb_find_dn_by_guid() and dsdb_find_sid_by_dn() are using by
the DRS server call getncchanges on objects that may be deleted.
2009-09-24 10:35:32 -07:00
Andrew Tridgell
6fba3a22fe s4-dsdb: added dsdb_find_sid_by_dn() 2009-09-23 14:01:29 -07:00
Andrew Tridgell
dd7f94a9e2 s4-dsdb: fixed a printf format warning 2009-09-21 15:26:31 -07:00
Matthias Dieter Wallnöfer
6ec69f3e77 s4:dsdb/common/util - Check for the right forest/domain function level
This adds a function which performs the check for the supported forest and
domain function levels. On an unsuccessful result a textual error message can
be created (parameter "errmsg" != NULL) which gives hints for the user to help
him fixing the issue.
2009-09-20 22:53:45 +02:00
Anatoliy Atanasov
0b68967096 Move replmd_drsuapi_DsReplicaCursor2_compare to a common place. 2009-09-19 15:42:00 -07:00
Andrew Tridgell
79082f400e s4-dsdb: treat uSNHighest as 0 if @REPLCHANGED doesn't exist
When a partition is first created it still needs a uSNHighest value
2009-09-16 03:43:37 -07:00
Andrew Tridgell
424d1c580a s4-dsdb: added dsdb_load_partition_usn and dsdb_save_partition_usn
These are used to load/save the per-partition uSN values managed by
the repl_meta_data module
2009-09-13 16:40:00 -07:00
Andrew Tridgell
0ba9a1bd3f s4-kcc: we should only add to the repsFrom if it doesn't already exist
If we already have a repsFrom for a particular DC and naming context
then we should not overwrite it, as it contains info on what
replication we've already done
2009-09-12 11:15:27 +10:00
Matthias Dieter Wallnöfer
6677eea3b1 s4:dsdb/common/util.c - Copy parameters to prevent segfaults
The parameters "lmNewHash" and/or "ntNewHash" could be NULL and when we perform
write operations on them (look below in the code) we could get SIGSEGVs!
2009-09-06 12:20:21 +02:00
Matthias Dieter Wallnöfer
43cfa69945 s4:dsdb/common/util - Indentation fixes 2009-09-06 12:16:49 +02:00
Andrew Tridgell
5842aa1ffd s4: fixed a missing NULL termination in a attribute list passed to ldb_search 2009-09-04 14:40:51 +10:00
Andrew Tridgell
c37f290043 added dsdb_find_guid_by_dn()
This will be used by the linked_attribute module
2009-09-03 18:36:09 +10:00
Andrew Tridgell
5d23ad8c2d added dsdb_find_dn_by_guid()
This came from the linked_attributes module, but now the
repl_meta_data module needs the same functionality, so move it to a
common routine.
2009-09-03 18:36:08 +10:00
Matthias Dieter Wallnöfer
e2b12c6f6a s4: Remove obsolete "samdb_password_quality_ok" function (it's just a one-line wrapper) 2009-08-14 00:14:14 +02:00
Matthieu Patou
c50dff4cce Return infinite time for last last logoff when last logoff = 0 2009-08-03 14:08:15 +10:00
Günther Deschner
05fbe0c7f7 libds: merge the UF<->ACB flag mapping functions.
Guenther
2009-07-13 15:36:07 +02:00
Günther Deschner
8db45607f8 libds: share UF_ flags between samba3 and 4.
Guenther
2009-07-13 15:36:06 +02:00
Andrew Bartlett
2c873c4353 Add const 2009-07-09 14:56:14 +10:00
Volker Lendecke
b4d7607a52 Fix some nonempty blank lines 2009-06-06 10:42:55 +02:00
Andrew Tridgell
b335618d17 fixed interpretation of ACB_PWNOTREQ
This bit actually means that we should ignore the minimum password
length field for this user. It doesn't mean that the password should
be seen as empty
2009-05-25 15:23:54 +10:00
Jelmer Vernooij
94069bd274 s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
Jelmer Vernooij
9ffb6d2d9e Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
Jelmer Vernooij
b64b78e4cc Allow overriding the function that ships the request in the Samba 3
client code.
2009-01-21 13:40:18 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Günther Deschner
c8a8c2388b s4-dsdb: add samdb_msg_add_parameters.
Guenther
2008-11-10 21:46:25 +01:00
Günther Deschner
e78379be0b s4-dsdb: add samdb_result_parameters.
Guenther
2008-11-10 21:46:25 +01:00
Jelmer Vernooij
37d885c51a Remove iconv_convenience argument from convert_string{,talloc}() but
make them wrappers around convert_string{,talloc}_convenience().
2008-10-24 14:26:46 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Andrew Bartlett
99315a19be Fix errrors in new password handling code found by RPC-SAMR.
I'm very glad we have such a comprehensive testsuite for the SAMR
password change process, as it makes this a much easier task to get
right.

Andrew Bartlett
2008-10-17 12:41:02 +11:00
Andrew Bartlett
7c88ea8aad Create a 'straight paper path' for UTF16 passwords.
This uses a virtual attribute 'clearTextPassword' (name chosen to
match references in MS-SAMR) that contains the length-limited blob
containing an allegidly UTF16 password.  This ensures we do no
validation or filtering of the password before we get a chance to MD4
it.  We can then do the required munging into UTF8, and in future
implement the rules Microsoft has provided us with for invalid inputs.

All layers in the process now deal with the strings as length-limited
inputs, incluing the krb5 string2key calls.

This commit also includes a small change to samdb_result_passwords()
to ensure that LM passwords are not returned to the application logic
if LM authentication is disabled.

The objectClass module has been modified to allow the
clearTextPassword attribute to pass down the stack.

Andrew Bartlett
2008-10-16 12:48:16 +11:00
Jelmer Vernooij
218f482fbf Use common strlist implementation in Samba 3 and Samba 4. 2008-10-12 00:56:56 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Simo Sorce
508527890a Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.
The previous ldb_search() interface made it way too easy to leak results,
and being able to use a printf-like expression turns to be really useful.
2008-09-23 18:17:46 -04:00
Andrew Bartlett
a33eaf564f Add definition for SYSTEM_FLAG_ATTR_IS_RDN
(This used to be commit 36f727c4a7)
2008-09-08 14:33:05 +10:00
Andrew Bartlett
add717dd0e Add schema search flags from MS-ADTS
(This used to be commit 731d9e569a)
2008-08-20 15:45:16 +10:00
Michael Adam
db36f37b8f libnet_become_dc: send msDS_Behavior_Version == 3 (win2k8) in DsAddEntry
instead of version 2 (win2k3).
This makes the NET-API-BECOME-DC test work against windows 2003 and 2008.

Michael
(This used to be commit a7bfa1fb1b)
2008-07-23 18:02:44 +02:00
Andrew Bartlett
44ea6a26fd rename sambaPassword -> userPassword.
This attribute is used in a very similar way (virtual attribute
updating the password) in AD on Win2003, so eliminate the difference.

This should not cause a problem for on-disk passwords, as by default
we do not store the plaintext at all.

Andrew Bartlett
(This used to be commit 1cf0d75149)
2008-07-12 15:26:42 +10:00
Michael Adam
60b303d4c2 dsdb: eliminate disards qualifyer compile warning.
Michael
(This used to be commit 3b0917dbc5)
2008-07-09 16:00:19 +02:00
Simo Sorce
929adc9efa Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca3)
2008-06-14 11:59:19 -04:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Andrew Bartlett
5738491674 Remove pointless cast
(This used to be commit 9a1466abbd)
2008-03-25 16:36:13 +11:00
Andrew Bartlett
dc49ae599e Remove useless extra argument to samdb_result_account_expires().
Andrew Bartlett
(This used to be commit bc607c334f)
2008-03-25 15:25:13 +11:00
Andrew Bartlett
536d585c4c Don't search the whole tree for the domains's sid
This change removes a dependency on objectclass=domainDNS, and avoids
a subtree search when we really know exactly where this record is.

Andrew Bartlett
(This used to be commit 52947fc0c0)
2008-03-13 14:11:06 +11:00
Andrew Bartlett
0c88240236 Rework to have member server 'domains' be CN=NETBIOSNAME
This reworks quite a few parts of our provision system to use
CN=NETBIOSNAME as the domain for member servers.

This makes it clear that these domains are not in the DNS structure,
while complying with our own schema (found by OpenLDAP's schema
validation).

Andrew Bartlett
(This used to be commit bda6a38b05)
2008-03-13 11:36:58 +11:00
Andrew Kroeger
a689d65e4f Treat maxPwdAge == 0 as passwords never expire.
(This used to be commit d28f2cb678)
2008-03-07 05:59:56 -06:00
Andrew Kroeger
01b3d89aec Add samdb_result_account_expires() function.
Windows uses 2 different values to indicate an account doesn't expire: 0 and
9223372036854775807 (0x7FFFFFFFFFFFFFFFULL).

This function looks up the value of the accountExpires attribute and if the
value is either value indicating the account doesn't expire,
0x7FFFFFFFFFFFFFFFULL is returned.

This simplifies the tests for account expiration.  There is no need to check
elsewhere in the code for both values, therefore a simple greater-than
expression can be used.
(This used to be commit 7ce5575a3a)
2008-03-07 05:59:55 -06:00
Jelmer Vernooij
734fea474c Fix typo.
(This used to be commit 2b408e9ed4)
2008-02-29 01:03:31 +01:00
Andrew Bartlett
3abf47fe87 Simplify the 'password must change' logic
This takes the previous patches further, so we catch all the cases
(the KDC looked at the time directly).

Andrew Bartlett
(This used to be commit cda4642a93)
2008-02-29 08:47:42 +11:00
Andrew Bartlett
5043215f21 Generate ACB_PW_EXPIRED correctly
More correctly handle expired passwords, and do not expire machine accounts.

Test that the behaviour is consistant with windows, using the RPC-SAMR test.

Change NETLOGON to directly query the userAccountControl, just because
we don't want to do the extra expiry processing here.

Andrew Bartlett
(This used to be commit acda1f69bc)
2008-02-28 08:50:00 +11:00
Kai Blin
c9ea65e4ce sidmap: Some source code cleanups.
(This used to be commit 16466b543b)
2008-02-05 11:42:39 +01:00
Andrew Bartlett
56cf85f73f r26679: It is very bad to free the ldb handle when you didn't create it...
(My bad when copying this code into samdb_is_gc()).

Andrew Bartlett
(This used to be commit b4a95a8985)
2008-01-06 18:51:02 -06:00
Andrew Bartlett
636c9a7c71 r26648: Move detection of global catalog captability to a central function, so
this can be shared with the CLDAP server (for the netlogon reply).

Andrew Bartlett
(This used to be commit 592c10ae11)
2008-01-03 12:33:35 -06:00
Jelmer Vernooij
7d5f0e0893 r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange.
(This used to be commit 2f29f80e07)
2008-01-01 16:12:15 -06:00
Jelmer Vernooij
86dc05e99f r26638: libndr: Require explicitly specifying iconv_convenience for ndr_struct_push_blob().
(This used to be commit 61ad78ac98)
2008-01-01 16:12:11 -06:00
Jelmer Vernooij
71e2cafe96 r26483: Merge ldb module dependency fixes, fix auth python module.
(This used to be commit 85eeecf997)
2007-12-21 05:50:41 +01:00
Andrew Bartlett
04304808ca r26324: Fix includes for Jelmer.
Andrew Bartlett
(This used to be commit 8089283784)
2007-12-21 05:48:35 +01:00
Jelmer Vernooij
41db2ab12c r26319: Split encoding functions out of libcli_ldap.
(This used to be commit 95a6ef7fc8)
2007-12-21 05:48:33 +01:00
Jelmer Vernooij
43696d2752 r26252: Specify loadparm_context explicitly when creating sessions.
(This used to be commit 7280c1e941)
2007-12-21 05:47:29 +01:00
Jelmer Vernooij
51db4c3f3d r26228: Store loadparm context in auth context, move more loadparm_contexts up the call stack.
(This used to be commit ba75f1613a)
2007-12-21 05:47:05 +01:00
Jelmer Vernooij
f4a1083cf9 r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aad)
2007-12-21 05:47:04 +01:00
Jelmer Vernooij
ca0b72a1fd r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies.
(This used to be commit 56dfcb4f2f)
2007-12-21 05:45:40 +01:00
Jelmer Vernooij
05e7c48146 r25553: Convert to standard bool type.
(This used to be commit b7371f1a19)
2007-10-10 15:07:54 -05:00
Günther Deschner
f5c546145e r25531: Merge GTYPE_SECURITY_UNIVERSAL_GROUP from samba3.
Guenther
(This used to be commit 5c9d755f52)
2007-10-10 15:07:48 -05:00
Andrew Bartlett
08c97435d3 r25194: A major rework of the Samba4 LSA LookupNames and LookupSids code, with
a new torture suite to match.

This should fix bug #4954 by Matthias Wallnöfer <mwallnoefer@yahoo.de>

Previously we had no knowlege of BUILTIN or well-known names.

This code needs expansion to check with winbind for trusted domains.

Andrew Bartlett
(This used to be commit e6fc0e1f54)
2007-10-10 15:06:51 -05:00
Andrew Bartlett
b7a1bb0174 r24648: Found out the meaning of a few more flags.
(This used to be commit 6bdebc3cfd)
2007-10-10 15:02:31 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
743fbb9261 r22196: give better error codes to make RPC-UNIXINFO pass
metze
(This used to be commit 0096e068d0)
2007-10-10 14:50:03 -05:00
Stefan Metzmacher
4e7520f643 r21772: add DS_BEHAVIOR_WIN2003_INTERIM constant
metze
(This used to be commit 59fffa7ba1)
2007-10-10 14:49:24 -05:00
Stefan Metzmacher
9079448fce r20028: fix typos
metze
(This used to be commit 72f5e0f7ee)
2007-10-10 14:28:49 -05:00
Stefan Metzmacher
524dca68cf r20027: restore instanceType and systemFlags values, which got lost in
http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_4_0/source/dsdb/common/flags.h?p1=branches%2FSAMBA_4_0%2Fsource%2Finclude%2Fads.h&rev=17930&r1=15511&r2=17930

metze
(This used to be commit 5da9dedece)
2007-10-10 14:28:49 -05:00
Andrew Tridgell
515c92a759 r19441: work in progress support for NFS4 ACLs in Samba4 on Linux. Still work
to do, particularly with getting the detailed bit mappings right, and
on sid mapping. Does not pass RAW-ACLS yet
(This used to be commit b92553481b)
2007-10-10 14:21:32 -05:00
Andrew Bartlett
fc7f8236bd r17967: Somewhere along the line we lost unixName here, and so lost the
ability for 'administrator' to log in as unix user 'root'.

Andrew Bartlett
(This used to be commit 221efba528)
2007-10-10 14:16:59 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Andrew Tridgell
0fd9807942 r17823: get rid of most of the samdb_base_dn() calls, as they are no longer
needed in searches
(This used to be commit a5ea749f0a)
2007-10-10 14:16:45 -05:00
Simo Sorce
71041a5007 r17504: Do not use the invented unixID but use the rfc2307 uidNumber and gidNumber attributes instead
Do not change unixName right now, we don't have an attribute to use in the posixGroup class,
and I think we should remove its usage altogether and look up users and groups by their uid/gid only.

Simo.
(This used to be commit d57b521aad)
2007-10-10 14:15:30 -05:00
Andrew Bartlett
51e0ae33ac r16833: Add a base DN to more search calls, we need to look for an ID over the
whole tree here.

Andrew Bartlett
(This used to be commit 7674306e67)
2007-10-10 14:09:49 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3)
2007-10-10 14:05:17 -05:00
Stefan Metzmacher
0bfa0d115c r15076: give the correct return code
metze
(This used to be commit 92a0663812)
2007-10-10 14:04:06 -05:00
Stefan Metzmacher
2e894625e7 r14964: - move sidmap code from ntvfs_common to SAMDB
- make ntvfs_common a library
- create sys_notify library

metze
(This used to be commit a3e1d56cf7)
2007-10-10 14:00:47 -05:00
Andrew Bartlett
0aeb2a50b1 r14637: Extend the ACB -> userParameters flag mapping based on the ovbious connections.
Andrew Bartlett
(This used to be commit 3e9e505e9e)
2007-10-10 13:59:03 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Stefan Metzmacher
475bbbfa84 r14442: the ACB_ flags are 32 bit...
metze
(This used to be commit a653ebd15d)
2007-10-10 13:57:25 -05:00
Andrew Tridgell
a0e6f6c05b r5309: removed ads.h from includes.h
(This used to be commit 196c45b834)
2007-10-10 13:09:40 -05:00
Stefan Metzmacher
1ec6416a35 r4568: make use of SidType and move it to lsa.idl
metze
(This used to be commit c2523adc0a)
2007-10-10 13:08:28 -05:00
Stefan Metzmacher
8d0c3eefbc r4096: move the samdb code to source/dsdb/
the idea is to have a directory service db layer
which will be used by the ldap server, samr server, drsuapi server
authentification...

I plan to make different implementations of this interface possible
- current default will be the current samdb code with sam.ldb
- a compat implementation for samba3 (if someone wants to write one)
- a new dsdb implementation which:
  - understands naming contexts (directory parrtitions)
  - do schema and acl checking checking
  - maintain objectGUID, timestamps and USN number,
    maybe linked attributes ('member' and 'memberOf' attributes)
  - store metadata on a attribute=value combination...

metze
(This used to be commit 893a8b8bca)
2007-10-10 13:06:26 -05:00