samba.git
14 months agoexamples: Remove trailing whitespaces in smb.conf.default
Andreas Schneider [Mon, 27 Mar 2023 09:33:32 +0000 (11:33 +0200)]
examples: Remove trailing whitespaces in smb.conf.default

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agoexamples: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 09:05:24 +0000 (10:05 +0100)]
examples: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agoexamples: Remove trailing whitespaces in mklogon.conf
Andreas Schneider [Wed, 22 Mar 2023 09:07:06 +0000 (10:07 +0100)]
examples: Remove trailing whitespaces in mklogon.conf

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agoexamples: Remove trailing whitespaces in ol-schema-migrate.pl
Andreas Schneider [Wed, 22 Mar 2023 08:55:10 +0000 (09:55 +0100)]
examples: Remove trailing whitespaces in ol-schema-migrate.pl

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agobuildtools: Fix code spelling
Andreas Schneider [Tue, 14 Mar 2023 07:53:49 +0000 (08:53 +0100)]
buildtools: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agoauth: Fix code spelling
Andreas Schneider [Tue, 14 Mar 2023 07:50:34 +0000 (08:50 +0100)]
auth: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agos3:utils: Fix grammar in testparm
Andreas Schneider [Tue, 28 Feb 2023 19:41:59 +0000 (20:41 +0100)]
s3:utils: Fix grammar in testparm

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
14 months agos3:winbind: Fix wrong string zero termination for empty groups
Pavel Filipenský [Sat, 25 Mar 2023 20:37:38 +0000 (21:37 +0100)]
s3:winbind: Fix wrong string zero termination for empty groups

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Tue Mar 28 08:36:50 UTC 2023 on atb-devel-224

15 months agoctdb:utils: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:45:26 +0000 (09:45 +0100)]
ctdb:utils: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Mar 24 07:57:37 UTC 2023 on atb-devel-224

15 months agoctdb:utils: Remove trailing whitespaces in scsi_io.c
Andreas Schneider [Wed, 22 Mar 2023 08:45:04 +0000 (09:45 +0100)]
ctdb:utils: Remove trailing whitespaces in scsi_io.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:tool: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:42:43 +0000 (09:42 +0100)]
ctdb:tool: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:tests: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:42:10 +0000 (09:42 +0100)]
ctdb:tests: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:tcp: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:40:05 +0000 (09:40 +0100)]
ctdb:tcp: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:server: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:36:23 +0000 (09:36 +0100)]
ctdb:server: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:server: Remove trailing whitespaces in ctdb_server.c
Andreas Schneider [Wed, 22 Mar 2023 08:35:55 +0000 (09:35 +0100)]
ctdb:server: Remove trailing whitespaces in ctdb_server.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:server: Remove trailing whitespaces in ctdb_recover.c
Andreas Schneider [Wed, 22 Mar 2023 08:33:04 +0000 (09:33 +0100)]
ctdb:server: Remove trailing whitespaces in ctdb_recover.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:include: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:29:34 +0000 (09:29 +0100)]
ctdb:include: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:include: Remove trailing whitespaces in ctdb_protocol.h
Andreas Schneider [Wed, 22 Mar 2023 08:30:31 +0000 (09:30 +0100)]
ctdb:include: Remove trailing whitespaces in ctdb_protocol.h

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:common: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:24:04 +0000 (09:24 +0100)]
ctdb:common: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agoctdb:client: Fix code spelling
Andreas Schneider [Wed, 22 Mar 2023 08:22:37 +0000 (09:22 +0100)]
ctdb:client: Fix code spelling

Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
15 months agos4:dsdb/extended_dn_out: hide backlinks with DSDB_RMD_FLAG_HIDDEN_BL by default
Stefan Metzmacher [Thu, 9 Feb 2023 14:04:26 +0000 (15:04 +0100)]
s4:dsdb/extended_dn_out: hide backlinks with DSDB_RMD_FLAG_HIDDEN_BL by default

Backlinks which are not allowed by the schema are hidden by default,
so we already set DSDB_RMD_FLAG_HIDDEN_BL on store, so we have a cheap
way to hide the backlinks.

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>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar 23 08:19:20 UTC 2023 on atb-devel-224

15 months agos4:dsdb/extended_dn_out: use dsdb_dn_val_rmd_flags() instead of dsdb_dn_is_deleted_val()
Stefan Metzmacher [Thu, 9 Feb 2023 14:04:26 +0000 (15:04 +0100)]
s4:dsdb/extended_dn_out: use dsdb_dn_val_rmd_flags() instead of dsdb_dn_is_deleted_val()

We now check for DSDB_RMD_FLAG_DELETED, as we'll check for
DSDB_RMD_FLAG_HIDDEN_BL in the next step and it's better to
call dsdb_dn_val_rmd_flags() just once.

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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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

15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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

15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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

15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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>
15 months 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

15 months 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