]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 years agotests/krb5: Fix RBCD comments
Joseph Sutton [Tue, 20 Jun 2023 00:56:45 +0000 (12:56 +1200)] 
tests/krb5: Fix RBCD comments

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Don’t unnecessarily specify ‘id’
Joseph Sutton [Tue, 20 Jun 2023 00:39:26 +0000 (12:39 +1200)] 
tests/krb5: Don’t unnecessarily specify ‘id’

In tests where we have multiple accounts of the same type, we use the
‘id’ parameter to ensure that these accounts are all different, as some
restrictions are bypassed if an account authenticates to the selfsame
account. However, this is unnecessary if we already specify (with
‘use_cache=False’) that the cache is not to be used.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Remove unused ‘server’ parameter in pac_verify()
Joseph Sutton [Mon, 19 Jun 2023 23:21:27 +0000 (11:21 +1200)] 
s4:kdc: Remove unused ‘server’ parameter in pac_verify()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Handle new KDC_AUTH_EVENT_CLIENT_FOUND audit event
Joseph Sutton [Mon, 19 Jun 2023 23:20:44 +0000 (11:20 +1200)] 
s4:kdc: Handle new KDC_AUTH_EVENT_CLIENT_FOUND audit event

NOTE: This commit finally works again!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Ensure that we don’t log PREAUTH_REQUIRED errors
Joseph Sutton [Mon, 19 Jun 2023 23:15:50 +0000 (11:15 +1200)] 
s4:kdc: Ensure that we don’t log PREAUTH_REQUIRED errors

Such errors were not logged in the past, either, but that was accidental
— a result of failing too early for an authentication event to be set —
rather than the auditing being deliberately designed that way.

Now that we have added the KDC_AUTH_EVENT_CLIENT_FOUND event, we want to
ensure that PREAUTH_REQUIRED errors continue to go unlogged.

NOTE: THIS COMMIT WON’T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Update Samba KDC plugin to match new Heimdal version
Joseph Sutton [Mon, 19 Jun 2023 23:14:50 +0000 (11:14 +1200)] 
s4:kdc: Update Samba KDC plugin to match new Heimdal version

NOTE: THIS COMMIT WON’T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agothird_party/heimdal: Import lorikeet-heimdal-202306192129 (commit 0096f9c1dc105d8ac9f...
Joseph Sutton [Mon, 19 Jun 2023 22:52:01 +0000 (10:52 +1200)] 
third_party/heimdal: Import lorikeet-heimdal-202306192129 (commit 0096f9c1dc105d8ac9f7dd96d653b05228f7d280)

NOTE: THIS COMMIT WON’T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Add test for authenticating with disabled account and wrong password
Joseph Sutton [Wed, 21 Jun 2023 04:54:36 +0000 (16:54 +1200)] 
tests/krb5: Add test for authenticating with disabled account and wrong password

This shows us that the client’s access is checked prior to passwords
being checked.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/auth_log_pass_change: Fix flapping test
Joseph Sutton [Mon, 19 Jun 2023 22:11:50 +0000 (10:11 +1200)] 
tests/auth_log_pass_change: Fix flapping test

It appears that discardMessages() is still not entirely reliable. Ensure
that we filter out any messages from the Administrator’s authentication.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agonetcmd: domain: Fix typo
Joseph Sutton [Mon, 19 Jun 2023 00:55:40 +0000 (12:55 +1200)] 
netcmd: domain: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoAlign samba_kdc_update_pac() prototype in pac-glue.h with the implementation in pac...
Andrew Bartlett [Sun, 25 Jun 2023 23:03:14 +0000 (11:03 +1200)] 
Align samba_kdc_update_pac() prototype in pac-glue.h with the implementation in pac-glue.c

Commit 6bd3b4528d4b33c8f7ae6341d166bea3a06cd971 diverged the const
declarations in the header, this brings them back in alignnment as
is Samba's normal practice.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jun 26 00:26:37 UTC 2023 on atb-devel-224

2 years agos4:kdc: Use talloc_get_type_abort()
Joseph Sutton [Fri, 16 Jun 2023 03:02:35 +0000 (15:02 +1200)] 
s4:kdc: Use talloc_get_type_abort()

We subsequently dereference the result without performing a NULL check.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Create a temporary talloc context on which to allocate
Joseph Sutton [Fri, 16 Jun 2023 03:00:29 +0000 (15:00 +1200)] 
s4:kdc: Create a temporary talloc context on which to allocate

‘client->context’ is too long-lived to use for allocating short-term
data.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Return NTSTATUS and auditing information from samba_kdc_update_pac() to be...
Joseph Sutton [Fri, 16 Jun 2023 02:49:11 +0000 (14:49 +1200)] 
s4:kdc: Return NTSTATUS and auditing information from samba_kdc_update_pac() to be logged

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Flip sense of condition
Joseph Sutton [Fri, 16 Jun 2023 02:32:09 +0000 (14:32 +1200)] 
s4:kdc: Flip sense of condition

A negative condition incurs more cognitive load.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Unify common code paths
Joseph Sutton [Fri, 16 Jun 2023 02:30:00 +0000 (14:30 +1200)] 
s4:kdc: Unify common code paths

Perhaps view with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Use samba_kdc_obtain_user_info_dc() for !client_pac_is_trusted case
Joseph Sutton [Fri, 16 Jun 2023 02:04:43 +0000 (14:04 +1200)] 
s4:kdc: Use samba_kdc_obtain_user_info_dc() for !client_pac_is_trusted case

This will help to reduce code duplication and the number of branching
code paths.

View with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Move adding compounded authentication SID out of samba_kdc_obtain_user_info_dc()
Joseph Sutton [Fri, 16 Jun 2023 01:40:20 +0000 (13:40 +1200)] 
s4:kdc: Move adding compounded authentication SID out of samba_kdc_obtain_user_info_dc()

We may not always want this SID to be present. For example, to enforce
authentication policies as Windows does, we’ll want the client’s
security token without this SID.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Have samba_kdc_update_pac_blob() do less
Joseph Sutton [Fri, 16 Jun 2023 01:13:58 +0000 (13:13 +1200)] 
s4:kdc: Have samba_kdc_update_pac_blob() do less

Previously this function obtained the auth_user_info_dc structure, then
used it to update the PAC blob. Now it does only one thing: fetch the
auth_user_info_dc info and return it to the caller, who can then call
samba_get_logon_info_pac_blob().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Remove unused PAC_SIGNATURE_DATA parameters
Joseph Sutton [Fri, 16 Jun 2023 01:06:24 +0000 (13:06 +1200)] 
s4:kdc: Remove unused PAC_SIGNATURE_DATA parameters

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Log errors in samba_kdc_update_pac_blob()
Joseph Sutton [Fri, 16 Jun 2023 01:04:17 +0000 (13:04 +1200)] 
s4:kdc: Log errors in samba_kdc_update_pac_blob()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Have samba_kdc_update_pac_blob() return krb5_error_code
Joseph Sutton [Fri, 16 Jun 2023 00:57:38 +0000 (12:57 +1200)] 
s4:kdc: Have samba_kdc_update_pac_blob() return krb5_error_code

This gives it more control over the final Kerberos error code, so that
we won’t always get ERR_GENERIC.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Add singular out path to samba_kdc_update_pac_blob()
Joseph Sutton [Fri, 16 Jun 2023 00:53:07 +0000 (12:53 +1200)] 
s4:kdc: Add singular out path to samba_kdc_update_pac_blob()

This ensures that we always clean up resources.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Make krb5_principal parameters const
Joseph Sutton [Fri, 16 Jun 2023 00:17:50 +0000 (12:17 +1200)] 
s4:kdc: Make krb5_principal parameters const

The ‘const’ is entirely unnecessary in a function declaration, but we
add it just to be consistent.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Add helper function to determine whether a device is allowed to authenticate
Joseph Sutton [Thu, 15 Jun 2023 23:22:28 +0000 (11:22 +1200)] 
s4:kdc: Add helper function to determine whether a device is allowed to authenticate

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Add helper function to determine whether authentication to a server is allowed
Joseph Sutton [Thu, 15 Jun 2023 23:20:04 +0000 (11:20 +1200)] 
s4:kdc: Add helper function to determine whether authentication to a server is allowed

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: Add functionality to log client and server authentication policies
Joseph Sutton [Thu, 15 Jun 2023 23:01:04 +0000 (11:01 +1200)] 
s4:kdc: Add functionality to log client and server authentication policies

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:auth: Log authentication policies for NTLM authentication
Joseph Sutton [Thu, 15 Jun 2023 22:40:16 +0000 (10:40 +1200)] 
s4:auth: Log authentication policies for NTLM authentication

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:auth: Add audit info parameters to check_password_recv()
Joseph Sutton [Thu, 15 Jun 2023 22:21:59 +0000 (10:21 +1200)] 
s4:auth: Add audit info parameters to check_password_recv()

These pointers can be set by implementing functions in order for them to
be logged in auth_check_password_recv().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:auth: Set ‘authoritative’ even if there is an error
Joseph Sutton [Thu, 15 Jun 2023 22:26:25 +0000 (10:26 +1200)] 
s4:auth: Set ‘authoritative’ even if there is an error

This is consistent with all the other functions that set
‘authoritative’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agoauth: Add functionality to log client and server policy information
Joseph Sutton [Thu, 15 Jun 2023 05:07:05 +0000 (17:07 +1200)] 
auth: Add functionality to log client and server policy information

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolib:audit_logging: Add function to return the JSON null object
Joseph Sutton [Thu, 15 Jun 2023 01:30:45 +0000 (13:30 +1200)] 
lib:audit_logging: Add function to return the JSON null object

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:tests: Fix typos
Joseph Sutton [Mon, 12 Jun 2023 22:34:39 +0000 (10:34 +1200)] 
python:tests: Fix typos

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: domain: Fix typo
Joseph Sutton [Thu, 25 May 2023 02:50:16 +0000 (14:50 +1200)] 
netcmd: domain: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotests/krb5: Test authentication policy audit logging
Joseph Sutton [Wed, 14 Jun 2023 04:25:16 +0000 (16:25 +1200)] 
tests/krb5: Test authentication policy audit logging

For each test, we check the authentication logs and ensure the messages
are as we expect.

We only test AS-REQs and TGS-REQs with the Heimdal KDC at the moment,
assuming that MIT doesn’t support logging for those cases.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotests/krb5: Test more authentication logging of TGT lifetimes
Joseph Sutton [Thu, 15 Jun 2023 23:40:57 +0000 (11:40 +1200)] 
tests/krb5: Test more authentication logging of TGT lifetimes

It is useful to test a combination of device restrictions and TGT
lifetime restrictions so that we can check what TGT lifetime values end
up in the logs.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotests/krb5: Improve authentication policy creation
Joseph Sutton [Wed, 14 Jun 2023 04:14:42 +0000 (16:14 +1200)] 
tests/krb5: Improve authentication policy creation

Don’t require passing in an ID to create an authentication policy.
Instead, have create_authn_policy() generate one for us.

We now return an actual AuthenticationPolicy object rather than just a
DN. This will give the tests more details to work with about the
policies.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonetcmd: domain: add error handling to domain claims commands
Rob van der Linde [Fri, 23 Jun 2023 00:52:58 +0000 (12:52 +1200)] 
netcmd: domain: add error handling to domain claims commands

Similar to the auth commands commit prior to this.

Where we wre catching LdbError before we now catch ModelError, all
exceptions that are known and handled in the model layer will have a
user-friendly error message.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: add error handling to domain auth commands
Rob van der Linde [Fri, 23 Jun 2023 00:26:38 +0000 (12:26 +1200)] 
netcmd: domain: add error handling to domain auth commands

Where we wre catching LdbError before we now catch ModelError, all
exceptions that are known and handled in the model layer will have a
user-friendly error message.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: add model exceptions and error handling
Rob van der Linde [Fri, 23 Jun 2023 00:24:24 +0000 (12:24 +1200)] 
netcmd: domain: add model exceptions and error handling

* Only handle what we know, otherwise raise the existing LdbError
* Cutom messages added in the model layer so we don't have to do it in
  the commands themselves

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: model stores ldb message for save
Rob van der Linde [Mon, 19 Jun 2023 01:23:33 +0000 (13:23 +1200)] 
netcmd: domain: model stores ldb message for save

The message is stored in self._apply which also gets called by
self.refresh()

This is the better thing to do than fetching in save.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: man page updates for auth silo and policy cli
Rob van der Linde [Thu, 8 Jun 2023 03:03:16 +0000 (15:03 +1200)] 
netcmd: domain: man page updates for auth silo and policy cli

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: silo member command tests
Rob van der Linde [Tue, 6 Jun 2023 02:11:26 +0000 (14:11 +1200)] 
netcmd: domain: silo member command tests

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: model field tests
Rob van der Linde [Thu, 25 May 2023 00:32:13 +0000 (12:32 +1200)] 
netcmd: domain: model field tests

Add tests for model fields to ensure they behave as expected when
calling from_db_value and to_db_value methods.

Add a base class for the tests themselves via a mixin as unittest
doesn't support abstract test case classes.

For each field, from_db_value and to_db_value must either be a list or
a property that returns a list.

The list contains input values and expected values, the expected value
can also be a callback for more complex comparison, this is used for
the possible claim values xml.

It is important that singular values and list values are tested, and
also None to ensure that fields properly get unset when a model is
saved.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: silo member add and remove does not write whole list
Rob van der Linde [Wed, 17 May 2023 11:35:16 +0000 (23:35 +1200)] 
netcmd: domain: silo member add and remove does not write whole list

Writing the whole list at once can lead to data loss if multiple
administrators are doing this at the same time.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: remove parse_guid and parse_text as they are no longer used
Rob van der Linde [Wed, 17 May 2023 04:27:54 +0000 (16:27 +1200)] 
netcmd: domain: remove parse_guid and parse_text as they are no longer used

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: claims: base class is no longer required
Rob van der Linde [Tue, 16 May 2023 23:13:33 +0000 (11:13 +1200)] 
netcmd: domain: claims: base class is no longer required

base.py has been removed as this has all been moved to the model layer

as the auth commands ldb is now just a local variable

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: claims: move claim value type lookup by attribute to model
Rob van der Linde [Tue, 16 May 2023 22:56:02 +0000 (10:56 +1200)] 
netcmd: domain: claims: move claim value type lookup by attribute to model

Also, there was no need for the cached property previously in the
command, as the command only calls this once.

Fetching all value types seems excessive now with the new model layer,
we just fetch the one we need and get a model object back.

Use the method lookup, it's consistent with the rest, and raise either
LookupError or ValueError.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: claims: make use of AttributeSchema and ClassSchema models
Rob van der Linde [Tue, 16 May 2023 21:50:13 +0000 (09:50 +1200)] 
netcmd: domain: claims: make use of AttributeSchema and ClassSchema models

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: add models for ClassSchema and AttributeSchema
Rob van der Linde [Tue, 16 May 2023 21:46:45 +0000 (09:46 +1200)] 
netcmd: domain: add models for ClassSchema and AttributeSchema

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: auth silos: remove base class
Rob van der Linde [Tue, 16 May 2023 03:28:04 +0000 (15:28 +1200)] 
netcmd: auth silos: remove base class

There is no point to the base class anymore.

And since the model layer has dramatically simplified the code in the
commands, ldb can just be a local variable.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: add test for silo if policy is a dn
Rob van der Linde [Tue, 6 Jun 2023 04:26:37 +0000 (16:26 +1200)] 
netcmd: domain: add test for silo if policy is a dn

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: move get_policy method from base class to the model
Rob van der Linde [Tue, 16 May 2023 03:12:14 +0000 (15:12 +1200)] 
netcmd: move get_policy method from base class to the model

There isn't much left of the base class, the next thing is to remove
it.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: move method print_json to command base class
Rob van der Linde [Tue, 16 May 2023 02:35:41 +0000 (14:35 +1200)] 
netcmd: move method print_json to command base class

This is used in quite a few commands, move to base class.

This ensures the correct encoder class and settings are always used,
and they are only defined in one place.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: fix import sort/grouping as per python standard
Rob van der Linde [Tue, 16 May 2023 02:24:27 +0000 (14:24 +1200)] 
netcmd: fix import sort/grouping as per python standard

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: move ldb_connect method to base class
Rob van der Linde [Tue, 16 May 2023 01:54:59 +0000 (13:54 +1200)] 
netcmd: move ldb_connect method to base class

This method is needed by just about every command and moving it here
is another step towards elinimanting the base classes in domain/auth
and domain/claim.

The base classes are almost empty now, since introducing the model
layer. The next step is to get rid of these base classes completely.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: PEP257 fix incorrect docstring quotes
Rob van der Linde [Tue, 16 May 2023 01:39:12 +0000 (13:39 +1200)] 
netcmd: PEP257 fix incorrect docstring quotes

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: claims: use consistent naming for options
Rob van der Linde [Tue, 16 May 2023 00:56:09 +0000 (12:56 +1200)] 
netcmd: domain: claims: use consistent naming for options

The name of the option should be the same as the attribute name.

You can still tell where it's being used (display_name), especially
now with the model layer:

    ClaimType.get(ldb, display_name=name)

The silo commands tend to use the `cn` field, while the claims
commands use the `displayName` field, but the option is always called
`name` for consistency.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: claim commands use the model layer
Rob van der Linde [Tue, 16 May 2023 00:52:04 +0000 (12:52 +1200)] 
netcmd: domain: claim commands use the model layer

This makes it consistent with the auth silo code, both should now make
use of the models.

Claims commands are now using the model layer with one exception and
that is the get_attribute_from_schema and get_class_from_schema
methods in the base class.

These will be made into models in another commit.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: fix claims constant name was wrong should be claim type CN
Rob van der Linde [Thu, 25 May 2023 02:43:19 +0000 (14:43 +1200)] 
netcmd: domain: fix claims constant name was wrong should be claim type CN

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: fix attributes created by test setUp method
Rob van der Linde [Tue, 16 May 2023 00:33:50 +0000 (12:33 +1200)] 
netcmd: domain: fix attributes created by test setUp method

Discovered this while converting the claims cli commands to use the
models, some tests failed.

The reason for this was that they relied on the attributes in the list
ATTRIBUTES to exist.

However, then we have to also prefix the attributes we create in the
test_claim_type_create test.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: claim: show err if assertIsNone fails
Rob van der Linde [Tue, 16 May 2023 00:30:40 +0000 (12:30 +1200)] 
netcmd: domain: claim: show err if assertIsNone fails

Other tests do this too, this is very useful if things fail

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: rename claim tests for consistency
Rob van der Linde [Tue, 16 May 2023 00:27:41 +0000 (12:27 +1200)] 
netcmd: domain: rename claim tests for consistency

The domain_auth tests are also prefixed with domain, it matches the
cli command "samba-tool domain claim".

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: tests for auth silo command line tools
Rob van der Linde [Tue, 16 May 2023 00:22:25 +0000 (12:22 +1200)] 
netcmd: domain: tests for auth silo command line tools

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: domain: add authentication silo commands
Rob van der Linde [Tue, 16 May 2023 00:15:06 +0000 (12:15 +1200)] 
netcmd: domain: add authentication silo commands

Authentication policies:

 * samba-tool domain auth policy list
 * samba-tool domain auth policy view
 * samba-tool domain auth policy create
 * samba-tool domain auth policy modify
 * samba-tool domain auth policy delete

Authentication silos:

 * samba-tool domain auth silo list
 * samba-tool domain auth silo view
 * samba-tool domain auth silo create
 * samba-tool domain auth silo modify
 * samba-tool domain auth silo delete

Authentication silo members:

 * samba-tool domain auth silo member list
 * samba-tool domain auth silo member add
 * samba-tool domain auth silo member remove

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: add domain models and basic model layer
Rob van der Linde [Tue, 16 May 2023 00:09:39 +0000 (12:09 +1200)] 
netcmd: add domain models and basic model layer

The ORM is somewhat inspired by Django, but it has some key
differences that make it work better with the Ldb database.

A field can be a singular value or a list, so a BooleanField can
either be True, or [True, False, True], or None.

The only thing that many=True does is say that the field "prefers" to
be a list, but really any field can be a list. For example when
creating a new object, it initialises the field as an empty list
rather than None if many=True.

When saving an object, if it is an update operation, only write the
fields that have actually changed.

When updating an object, any fields that are unset (set to None, or an
empty list) will be treated as a REMOVE operation.

Note that silo members should not be saved this way, writing the whole
list can lead to data loss if multiple admins are saving the silo at
the same time. Silo members will need to be handled differently, just
removing one member but not writing the whole list.

Unlike Django, there is no .objects class, instead there are a bunch
of static methods for querying:

  * Model.get
  * Model.query
  * Model.create
  * Model.get_or_create

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: add custom json encoder for object type fields
Rob van der Linde [Tue, 16 May 2023 00:00:56 +0000 (12:00 +1200)] 
netcmd: add custom json encoder for object type fields

The custom JSONEncoder class is also capable of encoding Dn objects to
str, and any object that has a __json__ method.

The __json__ method is not an official dunder method, but this has
been used by other frameworks too (like Pyramid).

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetcmd: add optparse validators and Range validator
Rob van der Linde [Mon, 15 May 2023 23:47:45 +0000 (11:47 +1200)] 
netcmd: add optparse validators and Range validator

Add the ability to the add validators to optparse Option fields.

The Option class was already subclassed in `netcmd/__init__.py` so
adding some functionality to this was relatively easy.

Added the ability to add Validator classes to a field so that this can
be used for anything else in the future, but for now there is a Range
validator required by upcoming auto silo commands.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agovfs_gpfs: Move call to load GPFS library
Christof Schmitt [Wed, 31 May 2023 18:29:49 +0000 (11:29 -0700)] 
vfs_gpfs: Move call to load GPFS library

Load the GPFS library from the connect function and leave the module
init for only the module registration.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Jun 25 16:06:37 UTC 2023 on atb-devel-224

2 years agovfs_gpfs: Check error from gpfswrap_lib_init
Christof Schmitt [Wed, 31 May 2023 18:16:19 +0000 (11:16 -0700)] 
vfs_gpfs: Check error from gpfswrap_lib_init

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agovfs_gpfs: Register smbd process with GPFS
Christof Schmitt [Wed, 31 May 2023 18:13:51 +0000 (11:13 -0700)] 
vfs_gpfs: Register smbd process with GPFS

Issue API call to tell the file system that this is a Samba process.
This fixed the GPFS handling of Samba since the rename of smbd processes
in commit 5955dc1e4fd.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agogpfswrap: Add wrapper for gpfs_register_cifs_export
Christof Schmitt [Wed, 24 May 2023 21:06:36 +0000 (14:06 -0700)] 
gpfswrap: Add wrapper for gpfs_register_cifs_export

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: translate sdb_entry->old[er]_keys into hdb_add_history_key()
Stefan Metzmacher [Mon, 7 Feb 2022 18:32:08 +0000 (19:32 +0100)] 
s4:kdc: translate sdb_entry->old[er]_keys into hdb_add_history_key()

It means that using the old or older password no longer
changes badPwdCount for Kerberos authentication.

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

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): Sat Jun 24 07:18:03 UTC 2023 on atb-devel-224

2 years agos4:dsdb/tests: also verify too old, older password interaction with badPwdCount
Stefan Metzmacher [Fri, 23 Jun 2023 11:42:31 +0000 (13:42 +0200)] 
s4:dsdb/tests: also verify too old, older password interaction with badPwdCount

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:dsdb/tests: Test Kerberos login with old password fails (but badPwdCount=0)
Stefan Metzmacher [Fri, 25 Feb 2022 04:16:36 +0000 (05:16 +0100)] 
s4:dsdb/tests: Test Kerberos login with old password fails (but badPwdCount=0)

This demonstrates the pre-authentication failures with passwords from
the password history don't incremend badPwdCount, similar to the
NTLMSSP and simple bind cases. But it's still an interactive logon,
which doesn't use 'old password allowed period'.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos4:kdc: handle passwords from the history in hdb_samba4_auth_status()
Stefan Metzmacher [Thu, 17 Feb 2022 06:12:10 +0000 (07:12 +0100)] 
s4:kdc: handle passwords from the history in hdb_samba4_auth_status()

This is important in order to prevent ACCOUNT_LOCKED_OUT
with cached credentials.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agovfs: Remove "sbuf" from readdir_fn()
Volker Lendecke [Tue, 20 Jun 2023 10:42:52 +0000 (12:42 +0200)] 
vfs: Remove "sbuf" from readdir_fn()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun 23 18:29:40 UTC 2023 on atb-devel-224

2 years agosmbd: Remove unused "sbuf" argument from vfs_readdirname()
Volker Lendecke [Tue, 20 Jun 2023 10:29:29 +0000 (12:29 +0200)] 
smbd: Remove unused "sbuf" argument from vfs_readdirname()

The only caller did not use the result.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Remove unused "sbuf" argument from ReadDirName()
Volker Lendecke [Tue, 20 Jun 2023 10:25:45 +0000 (12:25 +0200)] 
smbd: Remove unused "sbuf" argument from ReadDirName()

Nobody used that anymore, most callers had passed in NULL anyway.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Remove unused "pst" argument from dptr_ReadDirName()
Volker Lendecke [Tue, 20 Jun 2023 10:19:15 +0000 (12:19 +0200)] 
smbd: Remove unused "pst" argument from dptr_ReadDirName()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Don't use "sbuf" in smbd_dirptr_get_entry()
Volker Lendecke [Tue, 20 Jun 2023 10:03:35 +0000 (12:03 +0200)] 
smbd: Don't use "sbuf" in smbd_dirptr_get_entry()

openat_pathref_fsp() does not need this anymore.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Make sure smb_fname->st is valid in smbd_dirptr_get_entry
Volker Lendecke [Thu, 22 Jun 2023 07:52:09 +0000 (09:52 +0200)] 
smbd: Make sure smb_fname->st is valid in smbd_dirptr_get_entry

This simplifies the two mode_fn()s we have.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agopython:samba: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:31:52 +0000 (13:31 +0200)] 
python:samba: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224

2 years agopython:samba:tests: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:28:13 +0000 (13:28 +0200)] 
python:samba:tests: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:subunit: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:23:25 +0000 (13:23 +0200)] 
python:samba:subunit: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:samba3: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:22:56 +0000 (13:22 +0200)] 
python:samba:samba3: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:provision: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:22:19 +0000 (13:22 +0200)] 
python:samba:provision: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:netcmd: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:17:58 +0000 (13:17 +0200)] 
python:samba:netcmd: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:kcc: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:14:39 +0000 (13:14 +0200)] 
python:samba:kcc: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:gp_parse: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:13:28 +0000 (13:13 +0200)] 
python:samba:gp_parse: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:gp: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:13:15 +0000 (13:13 +0200)] 
python:samba:gp: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython:samba:emulate: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:12:45 +0000 (13:12 +0200)] 
python:samba:emulate: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopidl: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:04:46 +0000 (13:04 +0200)] 
pidl: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopackaging:systemd: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:02:02 +0000 (13:02 +0200)] 
packaging:systemd: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agonsswitch: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:01:27 +0000 (13:01 +0200)] 
nsswitch: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibrpc:rpc: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 11:00:06 +0000 (13:00 +0200)] 
librpc:rpc: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibrpc:ndr: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 10:59:25 +0000 (12:59 +0200)] 
librpc:ndr: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibrpc:idl: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 10:58:34 +0000 (12:58 +0200)] 
librpc:idl: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibgpo:admx: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 10:54:17 +0000 (12:54 +0200)] 
libgpo:admx: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibcli:smbreadline: Fix code spelling
Andreas Schneider [Tue, 6 Jun 2023 10:51:39 +0000 (12:51 +0200)] 
libcli:smbreadline: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>