]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 years agoshadow_copy2: Fix stream open for streams_depot paths
Volker Lendecke [Fri, 14 Apr 2023 15:22:18 +0000 (17:22 +0200)] 
shadow_copy2: Fix stream open for streams_depot paths

streams_depot hands us absolute paths with : filename components
instead of having set smb_fname_in->stream_name.

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

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): Mon Apr 17 18:11:07 UTC 2023 on atb-devel-224

2 years agotests: Show that streams_depot and shadow_copy2 don't play together
Volker Lendecke [Fri, 14 Apr 2023 15:34:17 +0000 (15:34 +0000)] 
tests: Show that streams_depot and shadow_copy2 don't play together

See the next patch, we assert in shadow_copy2_openat() over paths
passed in from shadow_copy2

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agostreams_depot: Create files when requested
Volker Lendecke [Fri, 14 Apr 2023 14:32:42 +0000 (16:32 +0200)] 
streams_depot: Create files when requested

If you set "create mask = 0600" no streams will be created....

Tested manually. Not creating an automated test for this, there are so
many places where this can go wrong that testing this individual
glitch does not gain us much confidence.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agodebug: Only initialize gpfs wrapper when gpfs logging is enabled
Christof Schmitt [Thu, 13 Apr 2023 18:13:00 +0000 (11:13 -0700)] 
debug: Only initialize gpfs wrapper when gpfs logging is enabled

This avoids unnecessary attempts to load libgpfs.so when it is not
needed.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Apr 14 12:28:23 UTC 2023 on atb-devel-224

2 years agotestprogs: Set PREFIX_ABS before it is used in test_primary_group.sh
Pavel Filipenský [Thu, 13 Apr 2023 07:41:26 +0000 (09:41 +0200)] 
testprogs: Set PREFIX_ABS before it is used in test_primary_group.sh

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Apr 14 06:18:18 UTC 2023 on atb-devel-224

2 years agolib:util: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 11:29:32 +0000 (13:29 +0200)] 
lib:util: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:util: Remove trailing white spaces in byteorder.h
Andreas Schneider [Thu, 13 Apr 2023 11:27:37 +0000 (13:27 +0200)] 
lib:util: Remove trailing white spaces in byteorder.h

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:tsocket: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 11:19:05 +0000 (13:19 +0200)] 
lib:tsocket: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:tevent: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 11:18:05 +0000 (13:18 +0200)] 
lib:tevent: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:tdb: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 11:17:08 +0000 (13:17 +0200)] 
lib:tdb: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:talloc: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 11:14:10 +0000 (13:14 +0200)] 
lib:talloc: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:socket: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 10:54:55 +0000 (12:54 +0200)] 
lib:socket: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:smbconf: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 10:54:21 +0000 (12:54 +0200)] 
lib:smbconf: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:replace: Fix code spelling
Andreas Schneider [Thu, 13 Apr 2023 10:53:07 +0000 (12:53 +0200)] 
lib:replace: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:replace: Remove trailing white spaces in xattr.c
Andreas Schneider [Thu, 13 Apr 2023 10:52:52 +0000 (12:52 +0200)] 
lib:replace: Remove trailing white spaces in xattr.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agoselftest:Samba3: use the correct NSS_WRAPPER_HOSTNAME
Stefan Metzmacher [Wed, 12 Apr 2023 15:22:02 +0000 (17:22 +0200)] 
selftest:Samba3: use the correct NSS_WRAPPER_HOSTNAME

The value of NSS_WRAPPER_HOSTNAME needs to match value
we put into the NSS_WRAPPER_HOSTS file.

We had a mismatch of
idmapridmember.samba.example.com
vs.
idmapridmember.addom.samba.example.com

This causes getaddrinfo() in nss_wrapper to fallback to
the libc version, which talks to a dns server.
It's not clear if recent glibc code will reach resolve/socket wrapper.
So it's not unlikely that idmapridmember.samba.example.com will
be passed via the internet, which causes delays up to 20 seconds.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr 12 20:29:05 UTC 2023 on atb-devel-224

2 years agoselftest: Catch error codes from failing testsuites
Joseph Sutton [Thu, 6 Apr 2023 04:31:09 +0000 (16:31 +1200)] 
selftest: Catch error codes from failing testsuites

Testsuites declared with functions such as plantestsuite() are not run
directly, but are piped through filter-subunit. The overall exit code of
the executed test command is that returned by the last command in the
pipeline (that is, filter-subunit), and thus the actual testsuite return
code is lost.

A real consequence of this is that an error in setUpClass() in a Python
testsuite causes the whole testsuite to be skipped silently.

The --fail-on-empty option partially addressed this, but didn't help if
the testsuite contained multiple test classes, only one of which
contained an error.

We now use bash with the pipefail option, which makes the return code of
the last failing command into the return code of the entire pipeline.
That means that we properly fail if a testsuite returns a non-zero exit
code, but doesn't otherwise exhibit any failures in its output.

This doesn't help for cases where a testsuite has other failing tests
that become xfails due to knownfail entries. In that case, the overall
'testsuite-failure' will be turned into 'testsuite-xfail' by
filter-subunit and the silent failures will remain unheeded. Still, this
is better than the existing situation.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Apr 12 14:57:55 UTC 2023 on atb-devel-224

2 years agoselftest: Fix samba3.clustered.smb2.deny.deny2 test
Joseph Sutton [Wed, 12 Apr 2023 01:20:00 +0000 (13:20 +1200)] 
selftest: Fix samba3.clustered.smb2.deny.deny2 test

This test failed to start, emitting the following error:
Unknown torture operation 'clustered.smb2.deny.deny2'

To fix this, remove the 'clustered.' prefix from the test name.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoselftest: Only run clusteredmember tests if ctdb is built
Joseph Sutton [Tue, 11 Apr 2023 22:15:30 +0000 (10:15 +1200)] 
selftest: Only run clusteredmember tests if ctdb is built

Trying to run any of these tests without having built ctdb results in a
failure, as the environment cannot be started.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib/torture: Don't overwrite test outcomes
Joseph Sutton [Tue, 11 Apr 2023 21:41:29 +0000 (09:41 +1200)] 
lib/torture: Don't overwrite test outcomes

If a test fails an assertion, and later calls torture_skip() to skip
part of the test, the TORTURE_SKIP result will overwrite the
TORTURE_FAIL result, and the overall outcome will be successful.

To avoid this, we now arrange possible outcomes in order of priority,
and ensure we always keep the higher priority one.

This reveals some failing tests.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture: Don't try to close the connection after running disconnect tests
Joseph Sutton [Tue, 11 Apr 2023 08:57:31 +0000 (20:57 +1200)] 
s4:torture: Don't try to close the connection after running disconnect tests

dcerpc_mdssvc_close() would always fail with
STATUS_CONNECTION_DISCONNECTED, causing the testsuite as a whole to
fail.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture: Correctly zero structure
Joseph Sutton [Tue, 11 Apr 2023 22:34:22 +0000 (10:34 +1200)] 
s4:torture: Correctly zero structure

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:rpc_server: Ensure EnumDomainUsers() doesn't return a NULL array
Joseph Sutton [Tue, 11 Apr 2023 08:36:15 +0000 (20:36 +1200)] 
s4:rpc_server: Ensure EnumDomainUsers() doesn't return a NULL array

This is what source4/torture/rpc/samr.c:test_EnumDomainUsers_all() in
the test 'samba4.rpc.samr' expects, and allows that test to pass.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:rpc_server: Handle LDB_ERR_NO_SUCH_ATTRIBUTE when deleting group
Joseph Sutton [Tue, 11 Apr 2023 08:19:52 +0000 (20:19 +1200)] 
s4:rpc_server: Handle LDB_ERR_NO_SUCH_ATTRIBUTE when deleting group

This is what source4/torture/rpc/samr.c:test_AddGroupMember() in the
test 'samba4.rpc.samr' expects.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoselftest: Fix typo
Joseph Sutton [Tue, 11 Apr 2023 08:04:23 +0000 (20:04 +1200)] 
selftest: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:torture: Fix typo
Joseph Sutton [Tue, 11 Apr 2023 07:37:21 +0000 (19:37 +1200)] 
s4:torture: Fix typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:selftest: Enable winbindd for maptoguest environment
Joseph Sutton [Tue, 11 Apr 2023 03:39:04 +0000 (15:39 +1200)] 
s3:selftest: Enable winbindd for maptoguest environment

This is required for the samba3.blackbox.guest test to work. Without it,
the test fails to find a group map.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:tests: Correct condition
Joseph Sutton [Tue, 11 Apr 2023 02:43:23 +0000 (14:43 +1200)] 
s3:tests: Correct condition

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Return correct status code
Joseph Sutton [Tue, 11 Apr 2023 02:38:30 +0000 (14:38 +1200)] 
testprogs: Return correct status code

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:script: Always return a non-zero status code on failure
Joseph Sutton [Tue, 11 Apr 2023 02:34:07 +0000 (14:34 +1200)] 
s3:script: Always return a non-zero status code on failure

If $expected didn't match $received, these functions would still return
zero.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Have testfail() return 0 on success
Joseph Sutton [Tue, 11 Apr 2023 02:31:59 +0000 (14:31 +1200)] 
testprogs: Have testfail() return 0 on success

This is more consistent with the other testing functions.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Make test_rpcclient_expect_failure_grep() return 0 on success
Joseph Sutton [Tue, 11 Apr 2023 02:26:56 +0000 (14:26 +1200)] 
testprogs: Make test_rpcclient_expect_failure_grep() return 0 on success

This is more consistent with the behaviour of the other expect_failure
functions.

Adjust all callers expecting the opposite behaviour to match.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Return correct status code
Joseph Sutton [Tue, 11 Apr 2023 02:24:55 +0000 (14:24 +1200)] 
testprogs: Return correct status code

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Make test_smbclient_expect_failure() return 0 on success
Joseph Sutton [Tue, 11 Apr 2023 02:23:00 +0000 (14:23 +1200)] 
testprogs: Make test_smbclient_expect_failure() return 0 on success

This is the behaviour that most existing callers expect, but the
function actually returns a non-zero status code in that case.

Adjust all callers expecting the opposite behaviour to match.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agonsswitch:tests: Remove unused functions
Joseph Sutton [Tue, 11 Apr 2023 02:20:01 +0000 (14:20 +1200)] 
nsswitch:tests: Remove unused functions

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Make testit_expect_failure() return 0 on success
Joseph Sutton [Tue, 11 Apr 2023 02:04:59 +0000 (14:04 +1200)] 
testprogs: Make testit_expect_failure() return 0 on success

This is the behaviour that most existing callers expect, but the
function actually returns a non-zero status code in that case.

Adjust all callers expecting the opposite behaviour to match.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotestprogs: Fix comparison
Joseph Sutton [Tue, 11 Apr 2023 02:00:51 +0000 (14:00 +1200)] 
testprogs: Fix comparison

SC2039: In POSIX sh, == in place of = is undefined.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:net_usershare: Correctly escape newline in error message
Joseph Sutton [Mon, 13 Feb 2023 01:16:47 +0000 (14:16 +1300)] 
s3:net_usershare: Correctly escape newline in error message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb: Handle allocation failure
Joseph Sutton [Mon, 13 Feb 2023 02:00:21 +0000 (15:00 +1300)] 
s4-dsdb: Handle allocation failure

If a talloc function returns NULL, indicating failure, the failure could
be masked by the next talloc call allocating on the NULL context.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:net_usershare: Handle allocation failure
Joseph Sutton [Mon, 13 Feb 2023 01:59:38 +0000 (14:59 +1300)] 
s3:net_usershare: Handle allocation failure

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agosmbd/notify: Handle allocation failure
Joseph Sutton [Mon, 13 Feb 2023 01:58:52 +0000 (14:58 +1300)] 
smbd/notify: Handle allocation failure

If a talloc function returns NULL, indicating failure, the failure could
be masked by the next talloc call allocating on the NULL context.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibndr: Handle allocation failure
Joseph Sutton [Mon, 13 Feb 2023 01:58:23 +0000 (14:58 +1300)] 
libndr: Handle allocation failure

If a talloc function returns NULL, indicating failure, the failure could
be masked by the next talloc call allocating on the NULL context.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agopyldb: Handle allocation failure
Joseph Sutton [Mon, 13 Feb 2023 01:57:24 +0000 (14:57 +1300)] 
pyldb: Handle allocation failure

If we don't check for NULL after each loop iteration, the failure could
be masked in the next iteration by talloc_asprintf_append() allocating
on the NULL context. That could result in values getting lost.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoctdb:tool: Remove unnecessary strlen()
Joseph Sutton [Mon, 3 Apr 2023 23:34:47 +0000 (11:34 +1200)] 
ctdb:tool: Remove unnecessary strlen()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibrpc/ndr: Add missing newlines to error messages
Joseph Sutton [Mon, 3 Apr 2023 23:08:54 +0000 (11:08 +1200)] 
librpc/ndr: Add missing newlines to error messages

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agopysmbd: Fix typo in error message
Joseph Sutton [Mon, 3 Apr 2023 23:06:47 +0000 (11:06 +1200)] 
pysmbd: Fix typo in error message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-drs: Don't skip over elements in uref_del_dest()
Joseph Sutton [Tue, 21 Mar 2023 00:47:16 +0000 (13:47 +1300)] 
s4-drs: Don't skip over elements in uref_del_dest()

If we remove an element, we should not skip over the element following.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoposix_acls: Don't skip ACEs in merge_default_aces()
Joseph Sutton [Tue, 21 Mar 2023 00:43:20 +0000 (13:43 +1300)] 
posix_acls: Don't skip ACEs in merge_default_aces()

If we remove the i'th element, we should decrement i so that we don't
skip over the succeeding element.

If we remove the j'th element, we should decrement j and continue around
the loop, so as not to skip subsequent elements.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-acl: Make parameter const
Joseph Sutton [Tue, 4 Apr 2023 22:02:35 +0000 (10:02 +1200)] 
s4-acl: Make parameter const

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4/dsdb/cracknames: Remove unneeded attribute
Joseph Sutton [Thu, 26 Jan 2023 18:59:00 +0000 (07:59 +1300)] 
s4/dsdb/cracknames: Remove unneeded attribute

The cracknames code never uses this.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb: Check correct ldb opaque variable
Joseph Sutton [Mon, 3 Apr 2023 04:45:07 +0000 (16:45 +1200)] 
s4-dsdb: Check correct ldb opaque variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb: Remove is_attr_in_list()
Joseph Sutton [Mon, 13 Feb 2023 23:03:10 +0000 (12:03 +1300)] 
s4-dsdb: Remove is_attr_in_list()

ldb_attr_in_list() already exists and does essentially the same thing.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4/dsdb/util: Make some arrays static
Joseph Sutton [Thu, 9 Mar 2023 23:39:54 +0000 (12:39 +1300)] 
s4/dsdb/util: Make some arrays static

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoldb: Avoid undefined pointer arithmetic
Joseph Sutton [Mon, 20 Feb 2023 20:42:28 +0000 (09:42 +1300)] 
ldb: Avoid undefined pointer arithmetic

Computing a pointer that points outside of an array, and not to one past
the last element, is undefined behaviour. To avoid this, do our
comparisons in terms of lengths, not pointers.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoldb: Fix function documentation to be consistent
Joseph Sutton [Mon, 13 Feb 2023 23:02:01 +0000 (12:02 +1300)] 
ldb: Fix function documentation to be consistent

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoldb: Don't wrongly claim to return message elements
Joseph Sutton [Thu, 26 Jan 2023 19:02:18 +0000 (08:02 +1300)] 
ldb: Don't wrongly claim to return message elements

If the LDB_UNPACK_DATA_FLAG_NO_ATTRS flag is set, we don't return any
elements, so we should set num_elements accordingly. This ensures
callers don't try to access elements that aren't there.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoldb: Remove misleading comment
Joseph Sutton [Tue, 4 Apr 2023 04:44:10 +0000 (16:44 +1200)] 
ldb: Remove misleading comment

That an attribute has been access checked doesn't mean that the user has
the right to view it.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoldb: Remove old misleading comments
Joseph Sutton [Wed, 29 Jun 2022 04:02:05 +0000 (16:02 +1200)] 
ldb: Remove old misleading comments

Commit bed9efa6cda17ecca91bdf71227ec656b94dcf94 introduced
ldb_msg_add_linearized_dn() to replace ldb_msg_add_dn(), but retained
the now-incorrect associated comment. The comment later made its way
into a function added later by commit 'CVE-2022-32746 ldb: Add functions
for appending to an ldb_message'.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotalloc: Remove unneeded va_copy()
Joseph Sutton [Wed, 1 Mar 2023 21:23:40 +0000 (10:23 +1300)] 
talloc: Remove unneeded va_copy()

We don't use 'ap' again after this.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotalloc: Put comment back in appropriate place
Joseph Sutton [Wed, 1 Mar 2023 21:22:45 +0000 (10:22 +1300)] 
talloc: Put comment back in appropriate place

This comment originally referred, not to a va_copy() call, but to the
use of &c with vsnprintf() rather than passing in NULL with a length of
zero.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:kdc: Fix typos
Joseph Sutton [Mon, 3 Apr 2023 04:56:56 +0000 (16:56 +1200)] 
s4:kdc: Fix typos

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:kdc: Fix typos in comments
Joseph Sutton [Fri, 29 Apr 2022 00:11:35 +0000 (12:11 +1200)] 
s4:kdc: Fix typos in comments

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:kdc: Allocate memory on a temporary context
Joseph Sutton [Tue, 4 Apr 2023 00:51:19 +0000 (12:51 +1200)] 
s4:kdc: Allocate memory on a temporary context

We should not allocate memory on a longer-lived context than necessary.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:kdc: Remove unused parameter
Joseph Sutton [Tue, 4 Apr 2023 00:54:08 +0000 (12:54 +1200)] 
s4:kdc: Remove unused parameter

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agosamba-tool domain: Initialise variables before attempting to use them
Joseph Sutton [Mon, 13 Feb 2023 01:52:18 +0000 (14:52 +1300)] 
samba-tool domain: Initialise variables before attempting to use them

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agopytest/acl: Remove unused remnants of source4/dsdb/tests/python/acl.py
Joseph Sutton [Tue, 4 Apr 2023 04:55:35 +0000 (16:55 +1200)] 
pytest/acl: Remove unused remnants of source4/dsdb/tests/python/acl.py

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb:large_ldap: Note that we don't check that an error was raised
Joseph Sutton [Tue, 7 Mar 2023 00:43:25 +0000 (13:43 +1300)] 
s4-dsdb:large_ldap: Note that we don't check that an error was raised

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb:large_ldap: Assert that we got all the entries
Joseph Sutton [Thu, 6 Apr 2023 00:19:43 +0000 (12:19 +1200)] 
s4-dsdb:large_ldap: Assert that we got all the entries

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb:large_ldap: Fix disabled test
Joseph Sutton [Wed, 5 Apr 2023 04:47:29 +0000 (16:47 +1200)] 
s4-dsdb:large_ldap: Fix disabled test

This test was silently skipped due to setUpClass() throwing a NameError.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb:large_ldap: Correctly increment count variable
Joseph Sutton [Tue, 7 Mar 2023 00:44:17 +0000 (13:44 +1300)] 
s4-dsdb:large_ldap: Correctly increment count variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-dsdb:large_ldap: Fix typos in variable names
Joseph Sutton [Mon, 13 Feb 2023 02:05:08 +0000 (15:05 +1300)] 
s4-dsdb:large_ldap: Fix typos in variable names

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotests/krb5: Fix comment indentation
Joseph Sutton [Tue, 4 Apr 2023 23:55:06 +0000 (11:55 +1200)] 
tests/krb5: Fix comment indentation

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotests/krb5: Remove unused variable
Joseph Sutton [Tue, 4 Apr 2023 00:10:08 +0000 (12:10 +1200)] 
tests/krb5: Remove unused variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agovfs_fruit: avoid using 'conn->tcon->compat', we can just use 'conn'!
Stefan Metzmacher [Wed, 5 Apr 2023 14:59:28 +0000 (16:59 +0200)] 
vfs_fruit: avoid using 'conn->tcon->compat', we can just use 'conn'!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr 12 13:51:50 UTC 2023 on atb-devel-224

2 years agosmbXsrv_tcon: avoid storing temporary (invalid!) records.
Stefan Metzmacher [Wed, 5 Apr 2023 14:59:44 +0000 (16:59 +0200)] 
smbXsrv_tcon: avoid storing temporary (invalid!) records.

We used to store smbXsrv_tcon_global.tdb records in two steps,
first we created a record in order to allocate the tcon id.
The temporary record had a NULL share_name, which translated
into 0 bytes for the string during ndr_push_smbXsrv_tcon_global0.

The problem is that ndr_pull_smbXsrv_tcon_global0 fails on
this with something like:

Invalid record in smbXsrv_tcon_global.tdb:key '2CA0ED4A' ndr_pull_struct_blob(length=85) - Buffer Size Error

The blob looks like this:

[0000] 00 00 00 00 01 00 00 00   00 00 00 00 00 00 02 00   ........  ........
[0010] 00 00 00 00 4A ED A0 2C   4A ED A0 2C 00 00 00 00   ....J.., J..,....
[0020] F8 4B 00 00 00 00 00 00   00 00 00 00 FF FF FF FF   .K......  ........
[0030] 4D 59 9B 9F 83 F4 35 20   36 D2 B0 82 62 68 D9 01   MY....5 6...bh..
[0040] 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ........  ........
[0050] 00 00 00 00 00                                      .....

The reason for having a temporary entry was just based on
the fact, that it was easier to keep the logic in
make_connection_snum() untouched.

But we have all information available in order to store
the final record directly. We only need to do the
"max connections" check first.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agos3-client: Provide more information on protocol negotiation failures
Andrew Bartlett [Tue, 14 Mar 2023 00:01:07 +0000 (13:01 +1300)] 
s3-client: Provide more information on protocol negotiation failures

In particular, this may help track down REASON: Exception: Exception: protocol negotiation failed: NT_STATUS_IO_TIMEOUT

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr 11 13:47:01 UTC 2023 on atb-devel-224

2 years agolib:replace: Fix snprintf of rep_inet_ntop()
Andreas Schneider [Thu, 6 Apr 2023 14:17:16 +0000 (16:17 +0200)] 
lib:replace: Fix snprintf of rep_inet_ntop()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr 11 10:08:54 UTC 2023 on atb-devel-224

2 years agolib:replace: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 14:16:19 +0000 (16:16 +0200)] 
lib:replace: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:pthreadpool: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 14:05:03 +0000 (16:05 +0200)] 
lib:pthreadpool: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:param: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 14:04:08 +0000 (16:04 +0200)] 
lib:param: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:messaging: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 14:02:58 +0000 (16:02 +0200)] 
lib:messaging: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolib:ldb: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 14:01:33 +0000 (16:01 +0200)] 
lib:ldb: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agoexamples: Fix spelling
Andreas Schneider [Thu, 6 Apr 2023 13:54:30 +0000 (15:54 +0200)] 
examples: Fix spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agodynconfig: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 13:52:49 +0000 (15:52 +0200)] 
dynconfig: Fix code spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agodocs-xml: Fix spelling
Andreas Schneider [Thu, 6 Apr 2023 13:51:35 +0000 (15:51 +0200)] 
docs-xml: Fix spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agoctdb: Fix code spelling
Andreas Schneider [Thu, 6 Apr 2023 13:45:07 +0000 (15:45 +0200)] 
ctdb: Fix code spelling

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agoMakefile: Fix spelling
Andreas Schneider [Thu, 6 Apr 2023 13:43:10 +0000 (15:43 +0200)] 
Makefile: Fix spelling

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agolibsmb: Fix test for smbc_getxattr
Remi Collet [Tue, 4 Apr 2023 10:16:09 +0000 (12:16 +0200)] 
libsmb: Fix test for smbc_getxattr

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14808
Signed-off-by: Remi Collet <rcollet@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Apr  9 10:44:38 UTC 2023 on atb-devel-224

2 years agolibsmb: fix regression on smbc_getxattr and fix doc
Remi Collet [Tue, 4 Apr 2023 08:22:09 +0000 (10:22 +0200)] 
libsmb: fix regression on smbc_getxattr and fix doc

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14808
Signed-off-by: Remi Collet <rcollet@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agos3:libads: Remove executable bit from ldap.c
Andreas Schneider [Thu, 6 Apr 2023 19:40:31 +0000 (21:40 +0200)] 
s3:libads: Remove executable bit from ldap.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agorpcd_mdssvc: initialize POSIX locking
Ralph Boehme [Thu, 6 Apr 2023 08:16:46 +0000 (10:16 +0200)] 
rpcd_mdssvc: initialize POSIX locking

Otherwise the posix_pending_close_db is NULL and we crash when trying to close a
file descriptor:

   #4 /usr/lib64/samba/libdbwrap-samba4.so(dbwrap_parse_record+0xe) [0x7fbc5d05c8ae]
   #5 /usr/lib64/samba/libdbwrap-samba4.so(dbwrap_fetch_int32+0x38) [0x7fbc5d05d438]
   #6 /usr/lib64/samba/libsmbd-base-samba4.so(fd_close_posix+0x7b) [0x7fbc5e276f8b]
   #7 /usr/lib64/samba/libsmbd-base-samba4.so(+0x57900) [0x7fbc5e28a900]
   #8 /usr/lib64/samba/libsmbd-base-samba4.so(fd_close+0x68) [0x7fbc5e2b7ea8]
   #9 /usr/lib64/samba/libsmbd-base-samba4.so(+0x62608) [0x7fbc5e295608]
   #10 /usr/lib64/samba/libtalloc-samba4.so(_talloc_free+0x51b) [0x7fbc5d9f439b]
   #11 /usr/lib64/samba/vfs/fruit.so(+0xcac2) [0x7fbc45fcdac2]
   #12 /usr/lib64/samba/vfs/fruit.so(+0xcbdd) [0x7fbc45fcdbdd]
   #13 /usr/lib64/samba/vfs/fruit.so(+0xf603) [0x7fbc45fd0603]
   #14 /usr/lib64/samba/libsmbd-base-samba4.so(+0x56375) [0x7fbc5e289375]
   #15 /usr/lib64/samba/vfs/nothingtoseeherereally.so(+0x196c) [0x7fbc467f996c]
   #16 /usr/lib64/samba/vfs/streams_xattr.so(+0x51fc) [0x7fbc461e71fc]
   #17 /usr/lib64/samba/libsmbd-base-samba4.so(+0xade3a) [0x7fbc5e2e0e3a]
   #18 /usr/lib64/samba/libsmbd-base-samba4.so(create_conn_struct_cwd+0x44) [0x7fbc5e2e1cf4]
   #19 /usr/libexec/samba/rpcd_mdssvc(mds_init_ctx+0x2c3) [0x563fdac08f03]
   #20 /usr/libexec/samba/rpcd_mdssvc(_mdssvc_open+0x141) [0x563fdac0b4d1]

The corresponding open is done as part of initializing a connection_struct
object, where we chdir() and stat() the root path of the share. The stat() in
vfs_fruit causes an expensive metadata request on the path which triggers an
internal open of a pathref handle. Note that this only affects servers that have
fruit:metadata = netatalk set, which is the default unfortunately.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr  7 21:12:21 UTC 2023 on atb-devel-224

2 years agosmbd: Prevent creation of vetoed files
Ralph Boehme [Wed, 5 Apr 2023 09:03:52 +0000 (11:03 +0200)] 
smbd: Prevent creation of vetoed files

The problem is when checking for vetoed names on the last path component in
openat_pathref_fsp_case_insensitive() we return
NT_STATUS_OBJECT_NAME_NOT_FOUND. The in the caller
filename_convert_dirfsp_nosymlink() this is treated as the "file creation case"
causing filename_convert_dirfsp_nosymlink() to return NT_STATUS_OK.

In order to correctly distinguish between the cases

1) file doesn't exist, we may be creating it, return
2) a vetoed a file

we need 2) to return a more specific error to
filename_convert_dirfsp_nosymlink(). I've chosen NT_STATUS_OBJECT_NAME_INVALID
which gets mapped to the appropriate errror NT_STATUS_OBJECT_PATH_NOT_FOUND or
NT_STATUS_OBJECT_NAME_NOT_FOUND depending on which path component was vetoed.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr  6 23:03:50 UTC 2023 on atb-devel-224

2 years agoCI: add a test creating a vetoed file
Ralph Boehme [Wed, 5 Apr 2023 09:32:09 +0000 (11:32 +0200)] 
CI: add a test creating a vetoed file

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolib:registry: drop unused argument of reg_open_remote()
Dmitry Antipov [Fri, 17 Mar 2023 10:06:52 +0000 (13:06 +0300)] 
lib:registry: drop unused argument of reg_open_remote()

Drop 'struct auth_session_info *' argument of reg_open_remote()
which is actually unused (NULL passed by all of the callers).

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Apr  6 16:46:03 UTC 2023 on atb-devel-224

2 years agopython:tests: Correctly skip some GPO tests in release tarball
Andreas Schneider [Thu, 16 Mar 2023 11:58:21 +0000 (12:58 +0100)] 
python:tests: Correctly skip some GPO tests in release tarball

These tests require provision data we do not ship in release tarballs.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Apr  6 15:42:12 UTC 2023 on atb-devel-224

2 years agotestprogs: Remove unused test_export_keytab_(heimdal|mit).sh
Andreas Schneider [Tue, 21 Mar 2023 08:15:20 +0000 (09:15 +0100)] 
testprogs: Remove unused test_export_keytab_(heimdal|mit).sh

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): Thu Apr  6 14:47:20 UTC 2023 on atb-devel-224

2 years agotestprogs: Merge export keytab tests into a single script for MIT and Heimdal
Andreas Schneider [Wed, 15 Mar 2023 12:14:16 +0000 (13:14 +0100)] 
testprogs: Merge export keytab tests into a single script for MIT and Heimdal

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotestprogs: Fix shell arithmetic in test_export_keytab_mit.sh
Andreas Schneider [Tue, 21 Mar 2023 08:34:52 +0000 (09:34 +0100)] 
testprogs: Fix shell arithmetic in test_export_keytab_mit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotestprogs: Reformat test_export_keytab_mit.sh
Andreas Schneider [Tue, 21 Mar 2023 08:34:29 +0000 (09:34 +0100)] 
testprogs: Reformat test_export_keytab_mit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agotestprogs: Fix shell arithmetic in test_export_keytab_heimdal.sh
Andreas Schneider [Tue, 21 Mar 2023 08:26:24 +0000 (09:26 +0100)] 
testprogs: Fix shell arithmetic in test_export_keytab_heimdal.sh

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