]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
3 years agos4:dsdb/extended_dn_out: make use of the existing have_reveal_control variable
Stefan Metzmacher [Thu, 9 Feb 2023 14:03:58 +0000 (15:03 +0100)] 
s4:dsdb/extended_dn_out: make use of the existing have_reveal_control variable

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/objectclass_attrs: allow all backlinks even if not allowed by the schema
Stefan Metzmacher [Thu, 9 Feb 2023 14:02:15 +0000 (15:02 +0100)] 
s4:dsdb/objectclass_attrs: allow all backlinks even if not allowed by the schema

This only verifies internals store operations, adding invalid forward
links is already checked in other places.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/repl_meta_data: let replmd_process_backlink() set DSDB_RMD_FLAG_HIDDEN_BL...
Stefan Metzmacher [Wed, 1 Mar 2023 00:10:37 +0000 (01:10 +0100)] 
s4:dsdb/repl_meta_data: let replmd_process_backlink() set DSDB_RMD_FLAG_HIDDEN_BL is needed

If we find that the backlink should not be visible on the given objectClass
by default, we now set DSDB_RMD_FLAG_HIDDEN_BL.

We'll evaluate that in the next commits in order to hide the
backlink by default.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/common: rename DSDB_RMD_FLAG_INVISIBLE to DSDB_RMD_FLAG_HIDDEN_BL
Stefan Metzmacher [Wed, 15 Mar 2023 14:02:29 +0000 (15:02 +0100)] 
s4:dsdb/common: rename DSDB_RMD_FLAG_INVISIBLE to DSDB_RMD_FLAG_HIDDEN_BL

DSDB_RMD_FLAG_INVISIBLE was introduced in commit
00b39c70f57882a453a8d2e6b0f1f37fd39a2d2a, but never used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/repl_meta_data: let replmd_process_backlink() use the source_dn variable
Stefan Metzmacher [Tue, 28 Feb 2023 23:42:53 +0000 (00:42 +0100)] 
s4:dsdb/repl_meta_data: let replmd_process_backlink() use the source_dn variable

We first create source_dn as trimmed down copy of bl->forward_dn
and then only use it for debug messages.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/repl_meta_data: let replmd_process_backlink() use dsdb_module_obj_by_guid()
Stefan Metzmacher [Tue, 28 Feb 2023 23:42:28 +0000 (00:42 +0100)] 
s4:dsdb/repl_meta_data: let replmd_process_backlink() use dsdb_module_obj_by_guid()

This will simplify the following changes.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/util: split out dsdb_module_obj_by_guid() from dsdb_module_dn_by_guid()
Stefan Metzmacher [Tue, 28 Feb 2023 23:38:06 +0000 (00:38 +0100)] 
s4:dsdb/util: split out dsdb_module_obj_by_guid() from dsdb_module_dn_by_guid()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/repl_meta_data: check replmd_add_backlink() result in replmd_modify_la_add()
Stefan Metzmacher [Wed, 1 Mar 2023 13:06:30 +0000 (14:06 +0100)] 
s4:dsdb/repl_meta_data: check replmd_add_backlink() result in replmd_modify_la_add()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos3:dsdb/repl_meta_data: fix possible memleak on error in replmd_modify_la_add()
Stefan Metzmacher [Wed, 1 Mar 2023 20:04:56 +0000 (21:04 +0100)] 
s3:dsdb/repl_meta_data: fix possible memleak on error in replmd_modify_la_add()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/schema: remember if a backlink attribute is not allowed on class 'top'
Stefan Metzmacher [Wed, 1 Mar 2023 10:30:55 +0000 (11:30 +0100)] 
s4:dsdb/schema: remember if a backlink attribute is not allowed on class 'top'

Backlink attributes which are not "allowed" in objectClass 'top'
are always possible, but only visible by default based on the
real objectClass.

In order to avoid pay the cost for finding out if a backlink
should be visible or not, we remember a 'bool bl_maybe_invisible'
both on the forward link as well as the backlink dsdb_attribute.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: let a test to demonstrate the behavior of invisible backlinks
Stefan Metzmacher [Wed, 15 Mar 2023 11:16:30 +0000 (12:16 +0100)] 
s4:dsdb/tests: let a test to demonstrate the behavior of invisible backlinks

msDS-KeyCredentialLink/msDS-KeyCredentialLink-BL are defined as linked attribute pair,
but msDS-KeyCredentialLink-BL is not defined as allowed on any object class definition,
still it's possible to create msDS-KeyCredentialLink attributes.

msDS-KeyPrincipal/msDS-KeyPrincipalBL are also defined as linked attribute pair
and msDS-KeyPrincipalBL is only allowed on object class 'user', but it's possible
to create msDS-KeyPrincipal values pointing to non 'user' objects.

The result is that 'user' objects have a visible msDS-KeyPrincipalBL, but
the others don't have msDS-KeyPrincipalBL visible, by default.
The backlinks are always visible if the backlink attributes are
explicitly requested.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: let linked_attributes.py use a container as testbase
Stefan Metzmacher [Wed, 15 Mar 2023 11:15:45 +0000 (12:15 +0100)] 
s4:dsdb/tests: let linked_attributes.py use a container as testbase

The tests don't require an organizationalUnit as parent object
and it makes it possible to create msDS-KeyCredential objects
within the container in the next step.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12967

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoscript/autobuild: Use logger.debug() for debug messages (visible with --verbose)
Andrew Bartlett [Thu, 23 Mar 2023 01:41:15 +0000 (14:41 +1300)] 
script/autobuild: Use logger.debug() for debug messages (visible with --verbose)

Lots of the autobuild.py log outputs are really debugging, so should be
controlled as such.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agoscript/autobuild: Use --verbose to control python logger verbosity
Andrew Bartlett [Thu, 23 Mar 2023 01:39:55 +0000 (14:39 +1300)] 
script/autobuild: Use --verbose to control python logger verbosity

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agoscript/autobuild: Use python logger to print times on log lines to aid in debugging.
Andrew Bartlett [Thu, 23 Mar 2023 01:28:49 +0000 (14:28 +1300)] 
script/autobuild: Use python logger to print times on log lines to aid in debugging.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agopython:join: run domain adprep as part of join_provision_own_domain()
Stefan Metzmacher [Fri, 17 Mar 2023 15:48:26 +0000 (16:48 +0100)] 
python:join: run domain adprep as part of join_provision_own_domain()

This is currently unused as we don't support more than one
domain per forest, but it will help it future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 22 23:05:39 UTC 2023 on atb-devel-224

3 years agopython:provision: run adprep as part of provision
Stefan Metzmacher [Fri, 17 Mar 2023 15:48:26 +0000 (16:48 +0100)] 
python:provision: run adprep as part of provision

With the default of base_schema=2019 we'll adprep to 2016.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosamba-tool: let 'domain provision' to use the 2019 schema by default
Stefan Metzmacher [Thu, 23 Feb 2023 14:05:01 +0000 (15:05 +0100)] 
samba-tool: let 'domain provision' to use the 2019 schema by default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosamba-tool: let 'domain schemaupgrade' to use the 2019 schema by default
Stefan Metzmacher [Thu, 23 Feb 2023 14:05:01 +0000 (15:05 +0100)] 
samba-tool: let 'domain schemaupgrade' to use the 2019 schema by default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosamba-tool: let 'domain functionalprep' to use functional level 2016 by default
Stefan Metzmacher [Thu, 23 Feb 2023 14:05:01 +0000 (15:05 +0100)] 
samba-tool: let 'domain functionalprep' to use functional level 2016 by default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosamba-tool: allow 'domain level raise' to support level 2016
Stefan Metzmacher [Thu, 23 Feb 2023 14:05:01 +0000 (15:05 +0100)] 
samba-tool: allow 'domain level raise' to support level 2016

We don't support anything higher than 2008_R2 in Samba, but
it's possible to run this against a remove server too.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/samba: let get_domain_descriptor() include adprep 2016 ACEs
Stefan Metzmacher [Sat, 18 Mar 2023 15:00:14 +0000 (16:00 +0100)] 
python/samba: let get_domain_descriptor() include adprep 2016 ACEs

We need to make sure a new provision as well as dbcheck
--reset-well-known-acls include acls used by adprep 2016,
otherwise we would undo the adprep result.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodomain_update: implement updates 82-89 in order to reach the latest w2016 level
Stefan Metzmacher [Thu, 23 Feb 2023 14:15:55 +0000 (15:15 +0100)] 
domain_update: implement updates 82-89 in order to reach the latest w2016 level

I implemented them by looking at
source4/setup/adprep/WindowsServerDocs/Domain-Wide-Updates.md.unused
and looking at a network capture where a Windows 2022 joins an
Windows 2008R2 domain.

The strange thing is that Windows (tested with server 2022) uses
c81fc9cc-0130-f4d1-b272-634d74818133 for update 83, while
Domain-Wide-Updates.md and a fresh installation use
c81fc9cc-0130-4fd1-b272-634d74818133. In order to match a fresh
installation we use c81fc9cc-0130-4fd1-b272-634d74818133.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoforest_update: behave more like a Windows 2022 server
Stefan Metzmacher [Thu, 23 Feb 2023 14:13:09 +0000 (15:13 +0100)] 
forest_update: behave more like a Windows 2022 server

It means we apply updates from 11-142 and list
all known updates. It turns out that update 53 is actually
update 54...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosetup/adprep: import the latest {Domain-Wide,Forest-Wide,Read-Only-Domain-Controller...
Stefan Metzmacher [Sat, 23 Feb 2019 07:44:05 +0000 (08:44 +0100)] 
setup/adprep: import the latest {Domain-Wide,Forest-Wide,Read-Only-Domain-Controller,Schema}-Updates.md

We have Domain-Wide-Updates.md and Read-Only-Domain-Controller-Updates.md only
for completeness, they are not parsed/used yet, so we added .unused in
order to avoid confusion in future.

Initially I tried to go with an ms_domain_updates_markdown.py,
but it is easier to add the current updates by hand to
domain_update.py, which will follow in the next commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosetup/ad-schema: add the latest v1803 and v1903 schema files from Microsoft
Stefan Metzmacher [Sat, 23 Feb 2019 07:44:05 +0000 (08:44 +0100)] 
setup/ad-schema: add the latest v1803 and v1903 schema files from Microsoft

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/samba: adapt ms_schema[_markdown].py to the latest schema definitions
Stefan Metzmacher [Thu, 23 Feb 2023 14:02:29 +0000 (15:02 +0100)] 
python/samba: adapt ms_schema[_markdown].py to the latest schema definitions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/samba: adapt ms_forest_updates_markdown.py to the latest Forest-Wide-Updates.md
Stefan Metzmacher [Thu, 23 Feb 2023 14:02:04 +0000 (15:02 +0100)] 
python/samba: adapt ms_forest_updates_markdown.py to the latest Forest-Wide-Updates.md

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/samba: add support for LDB_CHANGETYPE_MODRDN to modify_ldif()
Stefan Metzmacher [Mon, 13 Mar 2023 14:03:39 +0000 (15:03 +0100)] 
python/samba: add support for LDB_CHANGETYPE_MODRDN to modify_ldif()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib/ldb: add LDB_CHANGETYPE_MODRDN support to ldb_ldif_to_pyobject()
Stefan Metzmacher [Mon, 13 Mar 2023 13:58:29 +0000 (14:58 +0100)] 
lib/ldb: add LDB_CHANGETYPE_MODRDN support to ldb_ldif_to_pyobject()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/samba: add support for LDB_CHANGETYPE_DELETE to modify_ldif()
Stefan Metzmacher [Mon, 13 Mar 2023 13:56:55 +0000 (14:56 +0100)] 
python/samba: add support for LDB_CHANGETYPE_DELETE to modify_ldif()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib/ldb: add LDB_CHANGETYPE_DELETE support to ldb_ldif_to_pyobject()
Stefan Metzmacher [Mon, 13 Mar 2023 13:55:12 +0000 (14:55 +0100)] 
lib/ldb: add LDB_CHANGETYPE_DELETE support to ldb_ldif_to_pyobject()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/samba: let modify_ldif() verify the changetype value
Stefan Metzmacher [Mon, 13 Mar 2023 13:42:29 +0000 (14:42 +0100)] 
python/samba: let modify_ldif() verify the changetype value

DELETE and MODRDN are not really supported yet.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib/ldb: re-order code in ldb_ldif_to_pyobject()
Stefan Metzmacher [Mon, 13 Mar 2023 13:35:20 +0000 (14:35 +0100)] 
lib/ldb: re-order code in ldb_ldif_to_pyobject()

We don't allow MODRDN and DELETE for now as they
don't work as is anyway. We'll add these in the next steps.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolib/ldb: let ldb_ldif_parse_modrdn() handle names without 'rdn_name=' prefix
Stefan Metzmacher [Thu, 23 Feb 2023 13:56:39 +0000 (14:56 +0100)] 
lib/ldb: let ldb_ldif_parse_modrdn() handle names without 'rdn_name=' prefix

This is needed in order to process schema updates.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodomain_update: make use of self.sd_utils.update_aces_in_dacl()
Stefan Metzmacher [Mon, 13 Mar 2023 11:32:10 +0000 (12:32 +0100)] 
domain_update: make use of self.sd_utils.update_aces_in_dacl()

There's only a single domainDNS object in a domain and it's
the partition base object...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodomain_update: remove useless searches to '(objectClass=samDomain)'
Stefan Metzmacher [Mon, 13 Mar 2023 11:05:24 +0000 (12:05 +0100)] 
domain_update: remove useless searches to '(objectClass=samDomain)'

samDomain is an auxiliary class of domainDNS, so we'll handle them
in the search for domainDNS anyway. In addition searches for auxiliary
classes will never be found in searches.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodomain_update: make use of '"CN"' in sddl instead of using an explicit SID
Stefan Metzmacher [Mon, 13 Mar 2023 10:57:14 +0000 (11:57 +0100)] 
domain_update: make use of '"CN"' in sddl instead of using an explicit SID

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodomain_update: be more verbose about updates
Stefan Metzmacher [Thu, 23 Feb 2023 14:10:56 +0000 (15:10 +0100)] 
domain_update: be more verbose about updates

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoforest_update: be more verbose about updates
Stefan Metzmacher [Thu, 23 Feb 2023 14:10:33 +0000 (15:10 +0100)] 
forest_update: be more verbose about updates

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoforest_update: make use of self.sd_utils.update_aces_in_dacl()
Stefan Metzmacher [Mon, 13 Mar 2023 12:49:09 +0000 (13:49 +0100)] 
forest_update: make use of self.sd_utils.update_aces_in_dacl()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoforest_update: we don't need any controls to update sddl attributes
Stefan Metzmacher [Mon, 13 Mar 2023 12:53:53 +0000 (13:53 +0100)] 
forest_update: we don't need any controls to update sddl attributes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoforest_update: only update SDDL for schema objects
Stefan Metzmacher [Sat, 11 Mar 2023 02:35:57 +0000 (03:35 +0100)] 
forest_update: only update SDDL for schema objects

Updates to domainDNS objects are done by the domain updates.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoforest_update: ignore ldb.ERR_ATTRIBUTE_OR_VALUE_EXISTS in operation_ldif()
Stefan Metzmacher [Thu, 23 Feb 2023 14:11:55 +0000 (15:11 +0100)] 
forest_update: ignore ldb.ERR_ATTRIBUTE_OR_VALUE_EXISTS in operation_ldif()

This matches what Windows is doing...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agofunctional_prep: fix error handling in order to stop on the first error
Stefan Metzmacher [Thu, 23 Feb 2023 14:05:59 +0000 (15:05 +0100)] 
functional_prep: fix error handling in order to stop on the first error

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoschema_upgrade: add support for ntdsschemamodrdn and ntdsschemadelete
Stefan Metzmacher [Thu, 23 Feb 2023 14:03:14 +0000 (15:03 +0100)] 
schema_upgrade: add support for ntdsschemamodrdn and ntdsschemadelete

They are used in newer schema uprades from Microsoft.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agopython/tests: use changetype: modify in order to delete a single attribute
Stefan Metzmacher [Thu, 23 Feb 2023 16:07:20 +0000 (17:07 +0100)] 
python/tests: use changetype: modify in order to delete a single attribute

'changetype: delete' is used to delete a whole object!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: use changetype: modify in order to delete a single attribute
Stefan Metzmacher [Thu, 23 Feb 2023 16:01:55 +0000 (17:01 +0100)] 
s4:dsdb/tests: use changetype: modify in order to delete a single attribute

'changetype: delete' is used to delete a whole object!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoblackbox/dbcheck: also run currently unused dbcheck_reset_well_known_acls
Stefan Metzmacher [Sat, 18 Mar 2023 12:54:40 +0000 (13:54 +0100)] 
blackbox/dbcheck: also run currently unused dbcheck_reset_well_known_acls

This makes sure that we detect if dbcheck --reset-well-known-acls
tries to reset to unexpected values, which we expect to currect in
recent provisions.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolibcli/security: rewrite calculate_inherited_from_parent()
Stefan Metzmacher [Sat, 18 Mar 2023 00:17:04 +0000 (01:17 +0100)] 
libcli/security: rewrite calculate_inherited_from_parent()

This allows us to pass the new tests we just added.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: add more detailed tests to sec_descriptor.py
Stefan Metzmacher [Wed, 22 Mar 2023 13:48:00 +0000 (14:48 +0100)] 
s4:dsdb/tests: add more detailed tests to sec_descriptor.py

These demonstrate how inherited aces are constructed and applies
per objectclass, with and without the NO_PROPAGATE_INHERIT flag.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: allow sec_descriptor.py to run against Windows 2022
Stefan Metzmacher [Wed, 22 Mar 2023 13:48:00 +0000 (14:48 +0100)] 
s4:dsdb/tests: allow sec_descriptor.py to run against Windows 2022

We need SEC_STD_DELETE in order to run the test twice against the same server.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: convert sec_descriptor.py to use assert[Not]In()
Stefan Metzmacher [Wed, 22 Mar 2023 13:48:00 +0000 (14:48 +0100)] 
s4:dsdb/tests: convert sec_descriptor.py to use assert[Not]In()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: let AclUndeleteTests.test_undelete() remove the temporary ACE again
Stefan Metzmacher [Mon, 20 Mar 2023 12:02:47 +0000 (13:02 +0100)] 
s4:dsdb/tests: let AclUndeleteTests.test_undelete() remove the temporary ACE again

Otherwise we impact other unrelated tests, e.g. 'blackbox.dbcheck'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: let OwnerGroupDescriptorTests() remove temporary ACEs on cleanup
Stefan Metzmacher [Mon, 20 Mar 2023 11:04:37 +0000 (12:04 +0100)] 
s4:dsdb/tests: let OwnerGroupDescriptorTests() remove temporary ACEs on cleanup

Otherwise we impact other unrelated tests, e.g. 'blackbox.dbcheck'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:dsdb/tests: let OwnerGroupDescriptorTests.test_141() set the required ACE explicitly
Stefan Metzmacher [Mon, 20 Mar 2023 11:04:37 +0000 (12:04 +0100)] 
s4:dsdb/tests: let OwnerGroupDescriptorTests.test_141() set the required ACE explicitly

All other tests use the same logic and run before, which means the ACE
is already there and is implicitly required.

As we want to cleanup the ACE after each test in the next step,
as the tests should not have side effects for other tests, e.g.
'blackbox.dbcheck'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Fix typo
Joseph Sutton [Mon, 20 Mar 2023 20:43:01 +0000 (09:43 +1300)] 
s4:kdc: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 22 19:36:28 UTC 2023 on atb-devel-224

3 years agos4:kdc: Split samba_kdc_get_pac_blobs() into smaller functions
Joseph Sutton [Mon, 20 Mar 2023 02:16:21 +0000 (15:16 +1300)] 
s4:kdc: Split samba_kdc_get_pac_blobs() into smaller functions

Instead of having one large function that returns every PAC blob, we now
have a more manageable assortment of smaller functions that each return
one blob.

That gives us more fine-grained handling of PAC blobs, with callers now
able to procure only the specific blobs that they need.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Rename claims_blob to client_claims_blob
Joseph Sutton [Mon, 20 Mar 2023 02:13:39 +0000 (15:13 +1300)] 
s4:kdc: Rename claims_blob to client_claims_blob

This will not be the only claims blob. Later there will also be a
device_claims_blob.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Fix leak
Joseph Sutton [Mon, 20 Mar 2023 02:11:54 +0000 (15:11 +1300)] 
s4:kdc: Fix leak

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Don't modify cached user_info_dc SIDs
Joseph Sutton [Mon, 20 Mar 2023 02:02:53 +0000 (15:02 +1300)] 
s4:kdc: Don't modify cached user_info_dc SIDs

samba_kdc_get_pac_blobs() passes a pointer to a user_info_dc structure
obtained from samba_kdc_get_user_info_from_db() into
samba_add_asserted_identity(). The latter function modifies the SIDs of
the user_info_dc structure in order to add the Asserted Identity SID,
but samba_kdc_get_user_info_from_db() actually caches that structure
internally, meaning that subsequent calls will return the modified
structure.

We should not modify cached SIDs, so have
samba_kdc_get_user_info_from_db() return a pointer to constant data, and
copy the returned array of SIDs before adding the Asserted Identity SID.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Don't check PAC-OPTIONS claims-supported bit
Joseph Sutton [Thu, 16 Mar 2023 22:57:09 +0000 (11:57 +1300)] 
s4:kdc: Don't check PAC-OPTIONS claims-supported bit

Windows only consults the PAC-OPTIONS claims bit to find out whether or
not to add claims to the PAC if the ClaimsCompIdFASTSupport option is
set to 1. If this option is set to 2 or 3, the bit is ignored and claims
are always added.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Have samba_kdc_update_pac() take device parameters
Joseph Sutton [Thu, 16 Mar 2023 22:14:15 +0000 (11:14 +1300)] 
s4:kdc: Have samba_kdc_update_pac() take device parameters

These will be used later when we add support for compound
authentication.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Don't pass a NULL pointer to krb5_pac_add_buffer()
Joseph Sutton [Thu, 16 Mar 2023 22:07:11 +0000 (11:07 +1300)] 
s4:kdc: Don't pass a NULL pointer to krb5_pac_add_buffer()

Heimdal contains an assertion that the data pointer is not NULL. We need
to pass in a pointer to some dummy data instead.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agolibcli/security: Correctly handle ACL deletion
Joseph Sutton [Sun, 12 Mar 2023 21:09:15 +0000 (10:09 +1300)] 
libcli/security: Correctly handle ACL deletion

If there were two consecutive occurrences of an ACL to be deleted, we
would miss the second one.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4/dsdb/repl_meta_data: Pass NULL into ldb_msg_add_empty
Joseph Sutton [Tue, 7 Mar 2023 20:24:49 +0000 (09:24 +1300)] 
s4/dsdb/repl_meta_data: Pass NULL into ldb_msg_add_empty

We weren't doing anything with the passed-in 'el' afterwards, so this
was just confusing.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoldb: Don't create error string if there is no error
Joseph Sutton [Tue, 7 Mar 2023 20:23:00 +0000 (09:23 +1300)] 
ldb: Don't create error string if there is no error

We should only do this in the LDB_ERR_NO_SUCH_ATTRIBUTE case.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agosamba-tool: rewrite dsacl.py to use the new sd_utils helpers
Stefan Metzmacher [Thu, 16 Mar 2023 17:32:49 +0000 (18:32 +0100)] 
samba-tool: rewrite dsacl.py to use the new sd_utils helpers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Mar 22 15:57:15 UTC 2023 on atb-devel-224

3 years agopython:sd_utils: add dacl_{prepend,append,delete}_aces() helpers
Stefan Metzmacher [Thu, 16 Mar 2023 17:03:10 +0000 (18:03 +0100)] 
python:sd_utils: add dacl_{prepend,append,delete}_aces() helpers

They better represent what they are doing, we keep dacl_add_ace()
as wrapper of dacl_prepend_aces() in order to let existing callers
work as before.

In future it would be good to have a dacl_insert_aces() that
would canonicalize the ace order before storing, but that a task
for another day.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agopython:sd_utils: introduce update_aces_in_dacl() helper
Stefan Metzmacher [Fri, 10 Mar 2023 17:25:18 +0000 (18:25 +0100)] 
python:sd_utils: introduce update_aces_in_dacl() helper

This is a more generic api that can be re-used in other places
as well in future. It operates on a security descriptor object instead of
SDDL.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agopython/samba/ndr: add ndr_deepcopy() helper
Stefan Metzmacher [Fri, 17 Mar 2023 13:08:34 +0000 (14:08 +0100)] 
python/samba/ndr: add ndr_deepcopy() helper

This uses ndr_pack/unpack in order to create a deep copy
of the given object.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agopy_security: allow idx argument to descriptor.[s|d]acl_add()
Stefan Metzmacher [Thu, 16 Mar 2023 09:11:05 +0000 (10:11 +0100)] 
py_security: allow idx argument to descriptor.[s|d]acl_add()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agolibcli/security: add security_descriptor_[s|d]acl_insert() helpers
Stefan Metzmacher [Thu, 16 Mar 2023 09:03:44 +0000 (10:03 +0100)] 
libcli/security: add security_descriptor_[s|d]acl_insert() helpers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agolibcli/security: prepare security_descriptor_acl_add() to place the ace at a position
Stefan Metzmacher [Thu, 16 Mar 2023 09:00:11 +0000 (10:00 +0100)] 
libcli/security: prepare security_descriptor_acl_add() to place the ace at a position

Often it is important to insert an ace at a specific position in the
ACL. As a default we still append by default by using -1, which is the
generic version of passing the number of existing aces.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agoreplace: add ARRAY_INSERT_ELEMENT() helper
Stefan Metzmacher [Thu, 16 Mar 2023 08:57:43 +0000 (09:57 +0100)] 
replace: add ARRAY_INSERT_ELEMENT() helper

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agolib/ldb-samba: let ldif_read_ntSecurityDescriptor() only try sddl if isupper()
Stefan Metzmacher [Mon, 17 May 2021 15:14:34 +0000 (17:14 +0200)] 
lib/ldb-samba: let ldif_read_ntSecurityDescriptor() only try sddl if isupper()

Trying ndr_pull_security_descriptor on SDDL produces just strange
debug messages, which can cause confusion.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 years agolibcli/security: Reorder SDDL access flags table to match Windows
Joseph Sutton [Tue, 15 Mar 2022 01:01:13 +0000 (14:01 +1300)] 
libcli/security: Reorder SDDL access flags table to match Windows

This means that encoding an ACE in string form will now match Windows.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Mar 21 01:19:16 UTC 2023 on atb-devel-224

3 years agogpupdate: Use winbind separator in PAM Access Policies
David Mulder [Thu, 16 Mar 2023 21:31:33 +0000 (15:31 -0600)] 
gpupdate: Use winbind separator in PAM Access Policies

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Mar 20 20:20:41 UTC 2023 on atb-devel-224

3 years agogpupdate: Test that PAM Access uses winbind separator
David Mulder [Thu, 16 Mar 2023 21:39:47 +0000 (15:39 -0600)] 
gpupdate: Test that PAM Access uses winbind separator

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolibcli/security: prepare sddl machine/forest_sid handling
Stefan Metzmacher [Thu, 14 Jan 2016 10:02:10 +0000 (11:02 +0100)] 
libcli/security: prepare sddl machine/forest_sid handling

In future we need to pass in 3 sids to sddl_encode()

Once we pass in a machine_sid from the caller we need to
have a test on a Windows member if the .machine_rid values
really belong to the local machine sid.
At least [MS-DTYP] 2.4.2.4 Well-Known SID Structures
pretents "LA" and "LG" are relative to the local machine sid.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Mar 20 10:53:41 UTC 2023 on atb-devel-224

3 years agolibcli/security: simplify sddl_encode_sid()
Stefan Metzmacher [Fri, 25 Mar 2022 13:23:45 +0000 (14:23 +0100)] 
libcli/security: simplify sddl_encode_sid()

We should walk the sid_codes array just once.
This makes further changes easier...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
3 years agolibcli/security: simplify rid-based SDDL sid strings
Stefan Metzmacher [Fri, 25 Mar 2022 12:28:48 +0000 (13:28 +0100)] 
libcli/security: simplify rid-based SDDL sid strings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
3 years agolibcli/security: introduce struct sddl_transition_state
Stefan Metzmacher [Thu, 30 Apr 2020 17:49:12 +0000 (19:49 +0200)] 
libcli/security: introduce struct sddl_transition_state

In future we'll need more than 'domain_sid' in order
to do the correct transition of SDDL to/from security_descriptor.

In the end we most likely add an
sddl_transition_{create,encode,decode}() api in order
to allow the caller to create an sddl_transition_state
once and then pass it to multiple calls to encode/decode.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
3 years agos4:kdc: Add client claims blob if it is present
Joseph Sutton [Thu, 16 Mar 2023 20:04:51 +0000 (09:04 +1300)] 
s4:kdc: Add client claims blob if it is present

Until we support claims we just return an empty blob,
that matches what Windows is doing without defined claims.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Mar 20 01:25:07 UTC 2023 on atb-devel-224

3 years agos4:kdc: Refactor PAC handling
Joseph Sutton [Thu, 16 Mar 2023 19:02:24 +0000 (08:02 +1300)] 
s4:kdc: Refactor PAC handling

It's getting unwieldy adding new PAC buffer types when each one has to
have its own handling. It also makes the possibility of mistakes more
likely.

Add a new container, 'struct pac_blobs', containing the types of PAC
buffers in a given PAC, with an index for quick access to the types we
support specifically. We can add new blobs (overriding existing ones) by
calling pac_blobs_add_blob(), and override certain blobs that must be
present with pac_blobs_replace_existing().

This removes the need to have a complicated 'switch' statement with
different logic for each PAC buffer type, or a dozen index variables.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Avoid copying data if not needed
Joseph Sutton [Thu, 16 Mar 2023 20:16:17 +0000 (09:16 +1300)] 
s4:kdc: Avoid copying data if not needed

krb5_pac_add_buffer() makes its own copy of the data we pass in. We
don't need to make yet another copy.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Don't pass a NULL pointer into krb5_pac_add_buffer()
Joseph Sutton [Thu, 16 Mar 2023 20:25:52 +0000 (09:25 +1300)] 
s4:kdc: Don't pass a NULL pointer into krb5_pac_add_buffer()

Heimdal contains an assertion that the data pointer is not NULL. We need
to pass in a pointer to some dummy data instead.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Fix typo
Joseph Sutton [Thu, 16 Mar 2023 03:47:15 +0000 (16:47 +1300)] 
s4:kdc: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Make some parameters const
Joseph Sutton [Thu, 16 Mar 2023 19:07:52 +0000 (08:07 +1300)] 
s4:kdc: Make some parameters const

As these parameters are not assigned to, make them const.

Const specifiers for non-pointer types, such as in 'const
krb5_principal', don't do anything in function declarations. Remove
them.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Comment parameter names
Joseph Sutton [Thu, 16 Mar 2023 03:07:35 +0000 (16:07 +1300)] 
s4:kdc: Comment parameter names

Make it clear what these parameters actually are.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agos4:kdc: Replace 'is_untrusted' with 'is_trusted'
Joseph Sutton [Thu, 16 Mar 2023 01:29:15 +0000 (14:29 +1300)] 
s4:kdc: Replace 'is_untrusted' with 'is_trusted'

A double negative is just confusing and prone to error.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoauth: Clear EXTRA_SIDS flag if no Extra SIDs are present
Joseph Sutton [Mon, 27 Feb 2023 02:56:40 +0000 (15:56 +1300)] 
auth: Clear EXTRA_SIDS flag if no Extra SIDs are present

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agodsdb periodic: DNS: Add missing newlines to debug messages
Joseph Sutton [Mon, 6 Mar 2023 21:38:27 +0000 (10:38 +1300)] 
dsdb periodic: DNS: Add missing newlines to debug messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agowinbindd: Show warning message on tc connection errors too
Joseph Sutton [Mon, 6 Mar 2023 22:13:41 +0000 (11:13 +1300)] 
winbindd: Show warning message on tc connection errors too

Some of these conditions could never be hit.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agowafsamba: Remove unused configure check
Joseph Sutton [Wed, 2 Nov 2022 01:57:03 +0000 (14:57 +1300)] 
wafsamba: Remove unused configure check

This check would trigger compiler warnings due to the extra argument
passed to eprintf(). HAVE__VA_ARGS__MACRO isn't used anywhere, so we can
remove the check.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoselftest: Clean up socket when finished
Joseph Sutton [Tue, 7 Mar 2023 03:40:37 +0000 (16:40 +1300)] 
selftest: Clean up socket when finished

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agoselftest: Don't use invalid escape sequences
Joseph Sutton [Tue, 14 Mar 2023 22:31:43 +0000 (11:31 +1300)] 
selftest: Don't use invalid escape sequences

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agotests/krb5: Test that denied attributes are still issued in claims
Joseph Sutton [Wed, 15 Mar 2023 22:25:24 +0000 (11:25 +1300)] 
tests/krb5: Test that denied attributes are still issued in claims

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agotests/krb5: Add functions to fetch the schemaIDGUID of an attribute or class
Joseph Sutton [Wed, 15 Mar 2023 22:27:22 +0000 (11:27 +1300)] 
tests/krb5: Add functions to fetch the schemaIDGUID of an attribute or class

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
3 years agotests/krb5: Check that test parameters are not going unseen
Joseph Sutton [Wed, 15 Mar 2023 22:14:46 +0000 (11:14 +1300)] 
tests/krb5: Check that test parameters are not going unseen

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>