1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

323 Commits

Author SHA1 Message Date
Andrew Tridgell
8905344bad s4-dsdb: fixed re-join of subdomain
if we repeat the join of a subdomain then we try to re-create the NC
for the subdomain during a DsAddEntry(). This allows that re-creation
to succeed if the NC already exists
2011-10-04 15:08:58 +11:00
Andrew Tridgell
278e44cf9f s4-dsdb: simplify samdb_is_gc()
we already have a function for returning the NTDS options
2011-10-04 15:08:57 +11:00
Andrew Tridgell
60cbc98051 s4-dsdb: added new control DSDB_MODIFY_PARTIAL_REPLICA
this control tells the partition module that the DN being created is a
partial replica, so it should modify the @PARTITION object to add the
partialReplica attribute

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Tridgell
00ef18f19c s4-dsdb: added NO_GLOBAL_CATALOG control
this control is used to ask samdb to not return searches with a basedn
in partial repica partitions, which is needed to support the
difference between a search on the 3268 GC ldap port and the non-GC
389 port
2011-09-22 10:00:48 +10:00
Andrew Tridgell
677600fb7f s4-dsdb: failing to find the object is not an error in dsdb_loadreps()
we may not have replicated the partition yet, so this should be
considered the same as having no repsFrom/repsTo
2011-09-22 10:00:48 +10:00
Andrew Tridgell
1e9573fe4d s4-dsdb: fixed compiler warning
sid can be const

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Andrew Bartlett
fe754cc7ac s4-dsdb Print clearer error messages when invalid account flags are specified on add 2011-09-05 11:25:38 +10:00
Andrew Bartlett
f81bb8df67 s4-dsdb Return ACL errors as ldb_errstring()
This string is reported to the caller, which makes debugging much easier.

Andrew Bartlett
2011-08-26 14:06:07 +02:00
Andrew Tridgell
9784fbc378 s4-dsdb: added samdb_ntds_msdcs_dns_name()
this gets the DNS name for a NTDS GUID, based on the forest DNS name

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:38 +10:00
Andrew Tridgell
9f404b3dea s4-dsdb: added samdb_dn_to_dns_domain()
this converts a DC into the equivalent DNS domain. It is used when
forming t_msdcs NTDS DNS names

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25 07:39:38 +10: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 Bartlett
2d6e98e5c8 s4-dsdb Give a less worrying error message on failure to get a transaction 2011-08-13 12:30:49 +10:00
Andrew Bartlett
2993113a56 s4-dsdb Add ability to force a particular SID in the upgrade case 2011-08-13 12:30:49 +10:00
Andrew Bartlett
c5e41a21dd s4-dsdb Add flag to set DSDB_BYPASS_PASSWORD_HASH control 2011-08-13 12:30:48 +10:00
Andrew Tridgell
fb490d88c1 s4-dsdb: don't cache the NTDS settings DN
this DN can change due to a server rename, so we cannot cache it. It
is set by provision, but not anywhere else.

This seems to not have a large performance impact

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-12 04:00:07 +02:00
Andrew Tridgell
d4a1f6a42b s4-dsdb: added dn_format attribute of a dsdb_attribute
this is faster than string comparisons during searches at runtime

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
fc40769b64 s4-dsdb: fixed a warning on dsdb_delete()
struct ldb_dn is never const

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
d10553a51c s4-dsdb: make requests for STORAGE_FORMAT control non-critical
this allows us to use dsdb_module_dn_by_guid() from levels below the
extended_dn_out module

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:24 +10:00
Andrew Tridgell
114377a91f s4-dsdb: added dsdb_delete() function
this gives us a delete function that takes the standard set of dsdb
flags

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:36 +10:00
Dave Craft
0d1c54ecaf Standalone samdb_ntds_site_settings_options() helper
A helper function for retrieving the ntds site settings
via standalone function call.  Used within KCC

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-14 07:05:09 +10:00
Andrew Tridgell
3e4c08096d s4-drs: cope with missing RMD_ADDTIME in linked attributes
upgraded links can be missing the RMD_ADDTIME field
2011-06-10 10:14:56 +10:00
Andrew Bartlett
5d2ce400d2 s4-dsdb Add transactions to dsdb modify helpers 2011-05-08 17:36:26 +02:00
Andrew Tridgell
b96389d3e1 s4-socket: rename allow_access() to socket_allow_access()
this prevents a symbol collision with s3

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-05-03 07:37:07 +02:00
Andrew Tridgell
81f2dda626 s4-dsdb: added a ldb err -> NTSTATUS mapping
this is not perfect, but its better than always giving
NT_STATUS_UNSUCCESSFUL in our RPC servers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-04-04 10:30:30 +10:00
Matthias Dieter Wallnöfer
ea12adf544 s4/ldb - remove now superflous "ldb_dn_validate" checks
If we immediately afterwards perform an LDB base operation then we don't
need an explicit "ldb_dn_validate" check anymore (only OOM makes sense).

Reviewed by: Tridge
2011-03-04 22:07:24 +01:00
Matthias Dieter Wallnöfer
0e68867b26 s4:dsdb - always handle the attribute "options" as 32bit unsigned integer
It is defined as LDAP syntax 2.5.5.9 so no need at all to treat it as
64-bit integer.

Reviewed by: Kamenim and Metze

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Mar  1 12:46:15 CET 2011 on sn-devel-104
2011-03-01 12:46:15 +01:00
Matthias Dieter Wallnöfer
47369370a1 s4:dsdb/common/util.c - remove "samdb_find_or_add_value"
This isn't used anymore.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-03-01 06:29:03 +01:00
Matthias Dieter Wallnöfer
c807911bf7 s4:dsdb/common/util.c - fully remove "samdb_msg_add_string"
This isn't needed anymore and will be substituted by
"ldb_msg_add_string".

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-03-01 06:29:03 +01:00
Matthias Dieter Wallnöfer
c66780332b s4:remove many invocations of "samdb_msg_add_string"
This call can be substituted by "ldb_msg_add_string". We only need to be
careful on local objects or talloc'ed ones which live shorter than the message.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-03-01 06:29:03 +01:00
Jelmer Vernooij
59a077d8f5 Fix some types
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Feb 28 23:30:06 CET 2011 on sn-devel-104
2011-02-28 23:30:06 +01:00
Kamen Mazdrashki
561205b016 s4/dsdb-util: Use DS_NTDSDSA_OPT_IS_GC flag definition
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Sun Feb 27 00:10:45 CET 2011 on sn-devel-104
2011-02-27 00:10:44 +01:00
Andrew Tridgell
94c04b10db build: moved libds/common/flag_mapping.c into a common subsystem
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-24 11:57:48 +11:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Bartlett
fbe6d155bf s4-auth Remove special case for account_sid from auth_serversupplied_info
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-20 23:44:05 +01:00
Matthias Dieter Wallnöfer
93d96414be s4:dsdb_find_nc_root - fix it up to let the provisioning work correctly
Use the temporary list unless we have at least the three main
"namingContexts" from the rootDSE available (Default, Configuration, Schema -
these are mandatory on all AD deployments!).

This bug has been discovered by Nadya in relation with her SD work.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Jan 15 19:01:11 CET 2011 on sn-devel-104
2011-01-15 19:01:11 +01:00
Andrew Tridgell
a38854f74b s4-dsdb: minimise the DN in group expansion
this DN we have came from an extended DN search, which means it may
have multiple extended components. We need to minimise the DN before
AD will accept it

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Bartlett
cbffc51313 s4-dsdb Implement tokenGroups expansion directly in ldb operational module
This removes a silly cross-dependency between the ldb moudle stack and auth/

Andrew Bartlett
2011-01-14 16:39:32 +11:00
Nadezhda Ivanova
9aaacee6cd s4-dsdb: Added a helper function to get the default dns domain as string. 2010-12-22 12:29:14 +02:00
Matthias Dieter Wallnöfer
32bae10512 s4:dsdb/common/util.c - remove unused variable "ndr_err" 2010-12-21 15:10:37 +11:00
Andrew Bartlett
eda1972b68 s4-dsdb Use sid_blob_parse() 2010-12-16 15:54:36 +11:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
Matthias Dieter Wallnöfer
93d85ca5fd s4:fix some shadowed declaration warnings on Solaris by renaming the symbols 2010-12-06 11:28:58 +01:00
Matthias Dieter Wallnöfer
f92055f298 s4:dsdb/common/util_samr.c and auth/sam.c - fix error message 2010-12-04 14:27:40 +01:00
Matthias Dieter Wallnöfer
b6750eee28 s4:dsdb/common/util_samr.c - "dsdb_enum_group_mem" - fix it up regarding non SAM members
For example contacts.
2010-12-04 11:24:44 +01:00
Matthias Dieter Wallnöfer
8742faf19f s4:dsdb/common/util.c - "samdb_msg_add_add/delval" - introduce also here the better memory context
"msg->elements" fits better than "msg".
2010-12-01 16:30:08 +01:00
Matthias Dieter Wallnöfer
7cc2f98038 s4:"dsdb_find_nc_root" - let it work also when the "namingContexts" attribute isn't available yet
This is needed on provisioning when the modules aren't set up yet.
2010-11-16 15:25:13 +01:00
Matthias Dieter Wallnöfer
feb00fe7cc s4:dsdb - proof against empty RDN values where expected
This should prevent crashes as pointed out on the mailing list.
2010-11-11 10:03:40 +01:00
Matthias Dieter Wallnöfer
d6c78fbd3a s4:password_hash LDB module - move "samdb_msg_find_old_and_new_ldb_val" into the password_hash LDB module
It's only used there and so I think it doesn't really belong in
"dsdb/common/util.c" (I first thought that it could be useful for ACL checking
but obviously it wasn't).
2010-11-11 10:03:39 +01:00
Stefan Metzmacher
dedc9e32e5 s4:dsdb/common: add DSDB_SECRET_ATTRIBUTES_EX()
metze
2010-11-09 23:01:25 +01:00
Stefan Metzmacher
0e3a13f8cc s4:dsdb/common: create a DSDB_SECRET_ATTRIBUTES define with all secret attributes
We should have them just in one place, so that we don't forget some of them.

metze
2010-11-09 22:25:51 +01:00