]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agoselftest: Use self.assertRaisesLdbError() in user_account_control.py test
Andrew Bartlett [Thu, 16 Sep 2021 04:09:24 +0000 (16:09 +1200)] 
selftest: Use self.assertRaisesLdbError() in user_account_control.py test

This changes most of the simple pattern with self.samdb.modify()
to use the wrapper.  Some other calls still need to be converted, while
the complex decision tree tests should remain as-is for now.

Signed-off-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 Oct  4 21:55:43 UTC 2021 on sn-devel-184

4 years agoselftest: Move self.assertRaisesLdbError() to samba.tests.TestCase
Andrew Bartlett [Mon, 13 Sep 2021 09:48:13 +0000 (21:48 +1200)] 
selftest: Move self.assertRaisesLdbError() to samba.tests.TestCase

This is easier to reason with regarding which cases should work
and which cases should fail, avoiding issues where more success
than expected would be OK because a self.fail() was missed in a
try: block.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib:fuzzing: Fix quoting of --fuzz-target-ldflags
Andreas Schneider [Fri, 1 Oct 2021 07:16:21 +0000 (09:16 +0200)] 
lib:fuzzing: Fix quoting of --fuzz-target-ldflags

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Mon Oct  4 11:36:06 UTC 2021 on sn-devel-184

4 years agos3:utils: Fix format error
Andreas Schneider [Fri, 1 Oct 2021 08:46:09 +0000 (10:46 +0200)] 
s3:utils: Fix format error

regedit_hexedit.c:166:39: error: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’}
  166 |                 wprintw(buf->win, "%08X  ", off);
      |                                    ~~~^     ~~~
      |                                       |     |
      |                                       |     size_t {aka long unsigned int}
      |                                       unsigned int
      |                                    %08lX

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
4 years agos4: process_prefork: Make prefork_restart() use an asynchronous timer event instead...
Jeremy Allison [Thu, 30 Sep 2021 03:49:48 +0000 (20:49 -0700)] 
s4: process_prefork: Make prefork_restart() use an asynchronous timer event instead of calling sleep(X).

This should prevent any long pauses in the calling process, as we get a callback
for the restart after X seconds. To make the code flow more understandable,
always go through a timer event even if the wait time is zero. This
has the same effect as an immediate event as it will call the callback
function as soon as we go back into the event loop.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Oct  2 01:38:43 UTC 2021 on sn-devel-184

4 years agosamldb: Address birthday paradox adding an RODC
Andrew Bartlett [Mon, 5 Jul 2021 03:57:09 +0000 (15:57 +1200)] 
samldb: Address birthday paradox adding an RODC

It is possible that the randomly chosen RODC number will be one
that is already in use.  The samldb_krbtgtnumber_available()
function was meant to prevent that, but due to a typo did not.

There is no other race here as the whole thing is inside a transaction,
and we have duplicate protection on samAccountName, so the failure
looked like this:

...
Adding CN=krbtgt_TESTRODCDRS5320202,CN=Users,DC=samba,DC=example,DC=com
UNEXPECTED(error): samba4.drs.repl_rodc.python(ad_dc_ntvfs).repl_rodc.DrsRodcTestCase.test_msDSRevealedUsers_admin(ad_dc_ntvfs)
REASON: Exception: Exception: Traceback (most recent call last):
  File "/m/abartlet/aMASTER/b1635147/samba-def-build/source4/torture/drs/python/repl_rodc.py", line 111, in setUp
    self._create_rodc(self.rodc_ctx)
  File "/m/abartlet/aMASTER/b1635147/samba-def-build/source4/torture/drs/python/repl_rodc.py", line 693, in _create_rodc
    ctx.join_add_objects()
  File "bin/python/samba/join.py", line 641, in join_add_objects
    ctx.add_krbtgt_account()
  File "bin/python/samba/join.py", line 429, in add_krbtgt_account
    ctx.samdb.add(rec, ["rodc_join:1:1"])
_ldb.LdbError: (68, "LDAP error 68 LDAP_ENTRY_ALREADY_EXISTS -  <00002071: samldb: samAccountName krbtgt_4405 already in use!> <>")

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct  1 20:50:37 UTC 2021 on sn-devel-184

4 years ago.gitlab-ci: Allow a 1 hour to build Samba
Andrew Bartlett [Wed, 22 Sep 2021 23:14:35 +0000 (11:14 +1200)] 
.gitlab-ci: Allow a 1 hour to build Samba

I have seen cases where the job is pushed to the private runners
(which do not have the ccache) where this takes over 45mins, and
a typical job can be 35 mins so this is too tight.

Triggering the timeout causes a rebuild from scratch, which is
done twice automatically, and is financially costly (we pay
per VM start) and a waste of CPU/energy/etc.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct  1 19:43:16 UTC 2021 on sn-devel-184

4 years ago.gitlab-ci: Ignore errors from missing source files in code coverage
Andrew Bartlett [Wed, 22 Sep 2021 23:06:13 +0000 (11:06 +1200)] 
.gitlab-ci: Ignore errors from missing source files in code coverage

This could happen when code coverage is collected from multiple distributions.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoselftest: test tsocket_address_inet_from_hostport_strings
Uri Simchoni [Thu, 16 Sep 2021 17:03:59 +0000 (20:03 +0300)] 
selftest: test tsocket_address_inet_from_hostport_strings

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep 28 10:34:12 UTC 2021 on sn-devel-184

4 years agoselftest: add more tests for test_address_inet_from_strings
Uri Simchoni [Thu, 16 Sep 2021 17:03:02 +0000 (20:03 +0300)] 
selftest: add more tests for test_address_inet_from_strings

Test the case of NULL address as input

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoWHATSNEW: document dns forwarder change
Uri Simchoni [Thu, 16 Sep 2021 07:11:46 +0000 (10:11 +0300)] 
WHATSNEW: document dns forwarder change

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolibcli/dns.c: dns forwarder port test changes
Matthew Grant [Fri, 17 Sep 2021 22:05:24 +0000 (10:05 +1200)] 
libcli/dns.c: dns forwarder port test changes

Test harness for the dns fowarder setting in smb.conf. Adds IPv6
forwarder as second target DNS forwarder, listening on port 54.

Signed-off-by: Matthew Grant <grantma@mattgrant.net.nz>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolibcli/dns: smb.conf dns forwarder port support
Matthew Grant [Fri, 17 Sep 2021 22:02:11 +0000 (10:02 +1200)] 
libcli/dns: smb.conf dns forwarder port support

Call new tsocket_address_inet_from_hostport_strings() instead of
tsocket_address_inet_from_strings() to implement setting a port to query
for a DNS forwarder.

Signed-off-by: Matthew Grant <grantma@mattgrant.net.nz>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/tsocket: new function to parse host port strs.
Matthew Grant [Sun, 19 Sep 2021 05:41:42 +0000 (17:41 +1200)] 
lib/tsocket: new function to parse host port strs.

tsocket_address_inet_from_hostport_strings() on top of
tsocket_address_inet_from_strings(), implementing the ability to parse a
port number appended to an IPv6 or IPv4 address. IPv6 addresses can also
optionally have square brackets around them, but these are needed to
specify the port number as colon is used to delimit port from the IP
address in the string.

Note that this code just recognises and parses the strings with port
given, or just IPv6 with square brackets.  The rest of the parsing is
passed on to tsocket_address_inet_from strings(), and errors from there
passed back up the stack.

Signed-off-by: Matthew Grant <grantma@mattgrant.net.nz>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolibcli/dns: dns forwarder port doc changes
Matthew Grant [Fri, 17 Sep 2021 21:57:26 +0000 (09:57 +1200)] 
libcli/dns: dns forwarder port doc changes

Documentation changes specifying how list entries for dns forwarder
are to be specified with ability to add trailing target port number.

Signed-off-by: Matthew Grant <grantma@mattgrant.net.nz>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopyldb: Make ldb.Message containment testing consistent with indexing
Joseph Sutton [Sat, 25 Sep 2021 02:39:59 +0000 (14:39 +1200)] 
pyldb: Make ldb.Message containment testing consistent with indexing

Previously, containment testing using the 'in' operator was handled by
performing an equality comparison between the chosen object and each of
the message's keys in turn. This behaviour was prone to errors due to
not considering differences in case between otherwise equal elements, as
the indexing operations do.

Containment testing should now be more consistent with the indexing
operations and with the get() method of ldb.Message.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopyldb: Add tests for ldb.Message containment testing
Joseph Sutton [Sat, 25 Sep 2021 01:48:57 +0000 (13:48 +1200)] 
pyldb: Add tests for ldb.Message containment testing

These tests verify that the 'in' operator on ldb.Message is consistent
with indexing and the get() method. This means that the 'dn' element
should always be present, lookups should be case-insensitive, and use of
an invalid type should result in a TypeError.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopyldb: Raise TypeError for an invalid ldb.Message index
Joseph Sutton [Sat, 25 Sep 2021 01:39:56 +0000 (13:39 +1200)] 
pyldb: Raise TypeError for an invalid ldb.Message index

Previously, a TypeError was raised and subsequently overridden by a
KeyError.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopyldb: Add test for an invalid ldb.Message index type
Joseph Sutton [Sat, 25 Sep 2021 01:22:05 +0000 (13:22 +1200)] 
pyldb: Add test for an invalid ldb.Message index type

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos4/torture/drs/python: Fix attribute existence check
Joseph Sutton [Sat, 25 Sep 2021 07:18:39 +0000 (19:18 +1200)] 
s4/torture/drs/python: Fix attribute existence check

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopyldb: Fix deleting an ldb.Control critical flag
Joseph Sutton [Fri, 24 Sep 2021 23:16:09 +0000 (11:16 +1200)] 
pyldb: Fix deleting an ldb.Control critical flag

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopytest:segfault: Add test for deleting an ldb.Control critical flag
Joseph Sutton [Fri, 24 Sep 2021 23:13:02 +0000 (11:13 +1200)] 
pytest:segfault: Add test for deleting an ldb.Control critical flag

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopyldb: Fix deleting an ldb.Message dn
Joseph Sutton [Fri, 24 Sep 2021 23:12:16 +0000 (11:12 +1200)] 
pyldb: Fix deleting an ldb.Message dn

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopytest:segfault: Add test for deleting an ldb.Message dn
Joseph Sutton [Fri, 24 Sep 2021 22:56:25 +0000 (10:56 +1200)] 
pytest:segfault: Add test for deleting an ldb.Message dn

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agomdssvc: Use ndr_policy_handle_empty()
Volker Lendecke [Mon, 20 Sep 2021 14:49:53 +0000 (16:49 +0200)] 
mdssvc: Use ndr_policy_handle_empty()

is_zero_policy_handle() was a duplicate.

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): Sat Sep 25 00:46:23 UTC 2021 on sn-devel-184

4 years agorpc_server: Simplify dcesrv_handle_lookup()
Volker Lendecke [Mon, 20 Sep 2021 14:42:08 +0000 (16:42 +0200)] 
rpc_server: Simplify dcesrv_handle_lookup()

Reduce indentation with a "break;" from the loop, best reviewed with
git show -b

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server: Move a type check in dcesrv_handle_lookup()
Volker Lendecke [Mon, 20 Sep 2021 14:36:15 +0000 (16:36 +0200)] 
rpc_server: Move a type check in dcesrv_handle_lookup()

This check is independent of whether we found a handle or not, we can
do it before walking the handle list.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Remove unused security_token_is_sid_string()
Volker Lendecke [Tue, 21 Sep 2021 12:35:17 +0000 (14:35 +0200)] 
libcli: Remove unused security_token_is_sid_string()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotests/krb5: Add classes for testing invalid checksums
Joseph Sutton [Mon, 20 Sep 2021 03:10:35 +0000 (15:10 +1200)] 
tests/krb5: Add classes for testing invalid checksums

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

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): Thu Sep 23 19:28:44 UTC 2021 on sn-devel-184

4 years agotests/krb5: Add method to determine if principal is krbtgt
Joseph Sutton [Mon, 20 Sep 2021 03:06:18 +0000 (15:06 +1200)] 
tests/krb5: Add method to determine if principal is krbtgt

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Verify checksums of tickets obtained from the KDC
Joseph Sutton [Mon, 20 Sep 2021 02:10:07 +0000 (14:10 +1200)] 
tests/krb5: Verify checksums of tickets obtained from the KDC

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add get_rodc_krbtgt_creds() to RawKerberosTest
Joseph Sutton [Tue, 21 Sep 2021 01:54:47 +0000 (13:54 +1200)] 
tests/krb5: Add get_rodc_krbtgt_creds() to RawKerberosTest

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Simplify account creation
Joseph Sutton [Mon, 20 Sep 2021 02:05:58 +0000 (14:05 +1200)] 
tests/krb5: Simplify account creation

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Provide ticket enc-part key to tgs_req()
Joseph Sutton [Tue, 21 Sep 2021 23:41:45 +0000 (11:41 +1200)] 
tests/krb5: Provide ticket enc-part key to tgs_req()

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Fix checking for presence of authorization data
Joseph Sutton [Mon, 20 Sep 2021 02:08:16 +0000 (14:08 +1200)] 
tests/krb5: Fix checking for presence of authorization data

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add method to get DC credentials
Joseph Sutton [Mon, 20 Sep 2021 01:58:09 +0000 (13:58 +1200)] 
tests/krb5: Add method to get DC credentials

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow tgs_req() to check the returned ticket enc-part
Joseph Sutton [Mon, 20 Sep 2021 01:59:24 +0000 (13:59 +1200)] 
tests/krb5: Allow tgs_req() to check the returned ticket enc-part

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Set key version number for all accounts created with create_account()
Joseph Sutton [Mon, 20 Sep 2021 01:54:39 +0000 (13:54 +1200)] 
tests/krb5: Set key version number for all accounts created with create_account()

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Correctly check PA-SUPPORTED-ENCTYPES
Joseph Sutton [Tue, 21 Sep 2021 05:11:28 +0000 (17:11 +1200)] 
tests/krb5: Correctly check PA-SUPPORTED-ENCTYPES

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Get supported enctypes for credentials from database
Joseph Sutton [Tue, 21 Sep 2021 05:10:49 +0000 (17:10 +1200)] 
tests/krb5: Get supported enctypes for credentials from database

Look up the account's msDS-SupportedEncryptionTypes attribute to get the
encryption types that it supports. Move the fallback to RC4 to when the
ticket decryption key is obtained.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add methods to convert between enctypes and bitfields
Joseph Sutton [Tue, 21 Sep 2021 09:01:46 +0000 (21:01 +1200)] 
tests/krb5: Add methods to convert between enctypes and bitfields

These methods are useful for converting a collection of encryption types
into msDS-SupportedEncryptionTypes bit flags, and vice versa.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Make get_default_enctypes() return a set of enctype constants
Joseph Sutton [Tue, 21 Sep 2021 05:01:12 +0000 (17:01 +1200)] 
tests/krb5: Make get_default_enctypes() return a set of enctype constants

This is often more convenient than a bitfield.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Simplify adding authdata to ticket by using modified_ticket()
Joseph Sutton [Tue, 21 Sep 2021 01:33:16 +0000 (13:33 +1200)] 
tests/krb5: Simplify adding authdata to ticket by using modified_ticket()

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add method for modifying a ticket and creating PAC checksums
Joseph Sutton [Fri, 17 Sep 2021 03:26:12 +0000 (15:26 +1200)] 
tests/krb5: Add method for modifying a ticket and creating PAC checksums

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add method to verify ticket PAC checksums
Joseph Sutton [Fri, 17 Sep 2021 02:56:51 +0000 (14:56 +1200)] 
tests/krb5: Add method to verify ticket PAC checksums

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoregistry: skip root check when running with uid-wrapper enabled
Ralph Boehme [Wed, 25 Aug 2021 07:26:00 +0000 (09:26 +0200)] 
registry: skip root check when running with uid-wrapper enabled

Currently registry config is not used in the clustered testenv, so currently
there's no problem. But once we do add that, the check would be triggered.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 22 16:57:25 UTC 2021 on sn-devel-184

4 years agotests/krb5: Add RodcPacEncryptionKey type allowing for RODC PAC signatures
Joseph Sutton [Thu, 16 Sep 2021 05:20:22 +0000 (17:20 +1200)] 
tests/krb5: Add RodcPacEncryptionKey type allowing for RODC PAC signatures

Signatures created by an RODC have an RODCIdentifier appended to them
identifying the RODC's krbtgt account.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep 21 23:55:39 UTC 2021 on sn-devel-184

4 years agotests/krb5: Add methods for creating zeroed checksums and verifying checksums
Joseph Sutton [Thu, 16 Sep 2021 04:54:57 +0000 (16:54 +1200)] 
tests/krb5: Add methods for creating zeroed checksums and verifying checksums

Creating a zeroed checksum is needed for signing a PAC.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Cache obtained tickets
Joseph Sutton [Mon, 20 Sep 2021 23:51:20 +0000 (11:51 +1200)] 
tests/krb5: Cache obtained tickets

Now tickets obtained with get_tgt() and get_service_ticket() make use of
a cache so they can be reused, unless the 'fresh' parameter is specified
as true.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Return encpart from get_tgt() as part of KerberosTicketCreds
Joseph Sutton [Mon, 20 Sep 2021 23:51:05 +0000 (11:51 +1200)] 
tests/krb5: Return encpart from get_tgt() as part of KerberosTicketCreds

The encpart is already contained in ticket_creds, so it no longer needs
to be returned as a separate value.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Move get_tgt() and get_service_ticket() to kdc_base_test
Joseph Sutton [Thu, 16 Sep 2021 01:24:46 +0000 (13:24 +1200)] 
tests/krb5: Move get_tgt() and get_service_ticket() to kdc_base_test

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow get_tgt() to specify expected and unexpected flags
Joseph Sutton [Thu, 16 Sep 2021 01:14:45 +0000 (13:14 +1200)] 
tests/krb5: Allow get_tgt() to specify expected and unexpected flags

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow get_tgt() to specify different kdc-options
Joseph Sutton [Thu, 16 Sep 2021 01:14:06 +0000 (13:14 +1200)] 
tests/krb5: Allow get_tgt() to specify different kdc-options

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow get_tgt() to get tickets from the RODC
Joseph Sutton [Thu, 16 Sep 2021 00:41:46 +0000 (12:41 +1200)] 
tests/krb5: Allow get_tgt() to get tickets from the RODC

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow get_service_ticket() to get tickets from the RODC
Joseph Sutton [Thu, 16 Sep 2021 00:38:38 +0000 (12:38 +1200)] 
tests/krb5: Allow get_service_ticket() to get tickets from the RODC

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Set DN of created accounts to ldb.Dn type
Joseph Sutton [Thu, 16 Sep 2021 00:19:28 +0000 (12:19 +1200)] 
tests/krb5: Set DN of created accounts to ldb.Dn type

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Don't manually create PAC request and options in fast_tests
Joseph Sutton [Thu, 16 Sep 2021 00:13:51 +0000 (12:13 +1200)] 
tests/krb5: Don't manually create PAC request and options in fast_tests

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Use PAC buffer type constants from krb5pac.idl
Joseph Sutton [Thu, 16 Sep 2021 00:06:51 +0000 (12:06 +1200)] 
tests/krb5: Use PAC buffer type constants from krb5pac.idl

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow as_req() to specify different kdc-options
Joseph Sutton [Wed, 15 Sep 2021 23:52:46 +0000 (11:52 +1200)] 
tests/krb5: Allow as_req() to specify different kdc-options

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow tgs_req() to send requests to the RODC
Joseph Sutton [Wed, 15 Sep 2021 23:25:01 +0000 (11:25 +1200)] 
tests/krb5: Allow tgs_req() to send requests to the RODC

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow tgs_req() to specify different kdc-options
Joseph Sutton [Wed, 15 Sep 2021 23:18:12 +0000 (11:18 +1200)] 
tests/krb5: Allow tgs_req() to specify different kdc-options

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow tgs_req() to send additional padata
Joseph Sutton [Wed, 15 Sep 2021 23:16:27 +0000 (11:16 +1200)] 
tests/krb5: Allow tgs_req() to send additional padata

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Refactor tgs_req() to use _generic_kdc_exchange
Joseph Sutton [Wed, 15 Sep 2021 23:13:09 +0000 (11:13 +1200)] 
tests/krb5: Refactor tgs_req() to use _generic_kdc_exchange

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Check correct flags element
Joseph Sutton [Wed, 15 Sep 2021 23:22:28 +0000 (11:22 +1200)] 
tests/krb5: Check correct flags element

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add helper method for modifying PACs
Joseph Sutton [Wed, 15 Sep 2021 08:56:28 +0000 (20:56 +1200)] 
tests/krb5: Add helper method for modifying PACs

This method can remove or replace a PAC in an authorization-data
container, while additionally returning the original PAC.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoautobuild: allow AUTOBUILD_FAIL_IMMEDIATELY=0 (say from a gitlab variable)
Andrew Bartlett [Fri, 17 Sep 2021 04:43:00 +0000 (16:43 +1200)] 
autobuild: allow AUTOBUILD_FAIL_IMMEDIATELY=0 (say from a gitlab variable)

This allows making a push to do a full test ignoring errors without
needing "HACK!!!" commits on top.

Use like this:

git push -o ci.variable='AUTOBUILD_FAIL_IMMEDIATELY=0'

RN: Samba CI runs can now continue past the first error if AUTOBUILD_FAIL_IMMEDIATELY=0 is set

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org
Reviewed-by: Noel Power <npower@samba.org>
4 years agopython/join: Check for correct msDS-KrbTgtLink attribute
Joseph Sutton [Fri, 10 Sep 2021 02:02:22 +0000 (14:02 +1200)] 
python/join: Check for correct msDS-KrbTgtLink attribute

Previously, the wrong case was used when checking for this attribute,
which meant krbtgt accounts were not being cleaned up.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopython: Don't leak file handles
Joseph Sutton [Wed, 1 Sep 2021 03:42:28 +0000 (15:42 +1200)] 
python: Don't leak file handles

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib:cmdline: fix a comment
Michael Adam [Mon, 20 Sep 2021 11:27:59 +0000 (13:27 +0200)] 
lib:cmdline: fix a comment

The default log target was changed in 726ccf1d56b2979c827dd8586d1aeb6cb8de236c
(as a side effect), but the comment was only partially updated.

This patch fixes the comment by completing the orignal change to
correctly reflect current behavior.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 21 20:28:49 UTC 2021 on sn-devel-184

4 years agosmbd: Update debug messages for failed sharemode release
Christof Schmitt [Mon, 20 Sep 2021 22:55:32 +0000 (15:55 -0700)] 
smbd: Update debug messages for failed sharemode release

Use new macros, consistent log level and remove reference to flock.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Tue Sep 21 19:39:10 UTC 2021 on sn-devel-184

4 years agosmbd: Remove return variable for releasing filesystem sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:50:08 +0000 (15:50 -0700)] 
smbd: Remove return variable for releasing filesystem sharemode

flock is no longer used, the existing "ret" variable can be used
instead.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Rename return variable for requesting filesystem sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:46:21 +0000 (15:46 -0700)] 
smbd: Rename return variable for requesting filesystem sharemode

flock is no longer used, rename the variable accordingly.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Update comment for durable handles
Christof Schmitt [Mon, 20 Sep 2021 22:38:59 +0000 (15:38 -0700)] 
smbd: Update comment for durable handles

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoVFS: Update tracking documents for renamed function
Christof Schmitt [Mon, 20 Sep 2021 22:29:22 +0000 (15:29 -0700)] 
VFS: Update tracking documents for renamed function

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_catia: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:27:07 +0000 (15:27 -0700)] 
vfs_catia: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_default: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:26:19 +0000 (15:26 -0700)] 
vfs_default: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_streams_xattr: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:25:21 +0000 (15:25 -0700)] 
vfs_streams_xattr: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_gpfs: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:24:33 +0000 (15:24 -0700)] 
vfs_gpfs: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_time_audit: Fix message for fcntl VFS call
Christof Schmitt [Mon, 20 Sep 2021 22:22:50 +0000 (15:22 -0700)] 
vfs_time_audit: Fix message for fcntl VFS call

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_time_audit: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:22:06 +0000 (15:22 -0700)] 
vfs_time_audit: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_glusterfs: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:20:42 +0000 (15:20 -0700)] 
vfs_glusterfs: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_ceph: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:18:56 +0000 (15:18 -0700)] 
vfs_ceph: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodocs-xml: Update vfs_full_audit manpage for renamed function
Christof Schmitt [Mon, 20 Sep 2021 22:17:16 +0000 (15:17 -0700)] 
docs-xml: Update vfs_full_audit manpage for renamed function

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_full_audit: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 22:15:39 +0000 (15:15 -0700)] 
vfs_full_audit: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: Remove definition of removed kernel_flock function
Christof Schmitt [Mon, 20 Sep 2021 21:58:23 +0000 (14:58 -0700)] 
s3: Remove definition of removed kernel_flock function

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoexamples/VFS/skel_opaque: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 21:57:07 +0000 (14:57 -0700)] 
examples/VFS/skel_opaque: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoexamples/VFS/skel_transparent: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 21:56:08 +0000 (14:56 -0700)] 
examples/VFS/skel_transparent: Rename kernel_flock to filesystem_sharemode

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoVFS: Increase VFS version for renamed function
Christof Schmitt [Mon, 20 Sep 2021 21:53:59 +0000 (14:53 -0700)] 
VFS: Increase VFS version for renamed function

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoVFS: Rename kernel_flock to filesystem_sharemode
Christof Schmitt [Mon, 20 Sep 2021 21:51:02 +0000 (14:51 -0700)] 
VFS: Rename kernel_flock to filesystem_sharemode

With the removal of the call to flock LOCK_MAND, the only remaining use
of this VFS path is to register sharemodes with specific file systems.
Rename the VFS call to reflect that this is no longer related to flock.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoprofile: Remove syscall_kernel_flock profiling
Christof Schmitt [Mon, 20 Sep 2021 20:46:18 +0000 (13:46 -0700)] 
profile: Remove syscall_kernel_flock profiling

This no longer calls flock, so it should not be part of the system call
profiling.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:rpc_server: Do not use the default ncalrpc endpoint for external services
Samuel Cabrero [Mon, 23 Aug 2021 12:27:49 +0000 (14:27 +0200)] 
s3:rpc_server: Do not use the default ncalrpc endpoint for external services

In samba3 it is possible to run some services externally, for example:

rpc_daemon:lsasd = fork
rpc_server:netlogon = disabled
rpc_server:samr = external
rpc_server:lsarpc = external

The external services running in separate processes have to use its own
dedicated ncalrpc endpoint, otherwise will race with main smbd serving the
embedded services to accept connections on ncalrpc default socket. If the
connection ends in an external process and the client tries to bind to an
interface not registered there (like winreg for example) the bind will fail.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 21 11:00:01 UTC 2021 on sn-devel-184

4 years agolibrpc:core: Add a function to register an interface passing the binding handle
Samuel Cabrero [Thu, 19 Aug 2021 10:52:04 +0000 (12:52 +0200)] 
librpc:core: Add a function to register an interface passing the binding handle

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agopidl:NDR/ServerCompat.pm: Do not register disabled services
Samuel Cabrero [Mon, 23 Aug 2021 12:23:58 +0000 (14:23 +0200)] 
pidl:NDR/ServerCompat.pm: Do not register disabled services

In samba3 it is possible to disable RPC services, for exapmle:

rpc_server:netlogon = disabled

If a service is disabled do not register the interface neither create its
endpoint.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agolib: Move closefrom_except*() to a separate file
Volker Lendecke [Mon, 20 Sep 2021 10:09:55 +0000 (12:09 +0200)] 
lib: Move closefrom_except*() to a separate file

Enable use in other daemons

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): Tue Sep 21 01:12:12 UTC 2021 on sn-devel-184

4 years agosamba-bgqd: Convert closeall_*() to closefrom_*()
Volker Lendecke [Mon, 20 Sep 2021 09:59:13 +0000 (11:59 +0200)] 
samba-bgqd: Convert closeall_*() to closefrom_*()

Align it with closefrom() in preparation for use elsewhere

Signed-off-by: Volker Lendecke <vl@samba.org>
4 years agolib: Avoid an "includes.h"
Volker Lendecke [Thu, 16 Sep 2021 15:05:25 +0000 (17:05 +0200)] 
lib: Avoid an "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Give util_specialsids.c its own prototype header
Volker Lendecke [Sat, 18 Sep 2021 06:30:07 +0000 (08:30 +0200)] 
lib: Give util_specialsids.c its own prototype header

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Add required #includes
Volker Lendecke [Thu, 16 Sep 2021 15:04:47 +0000 (17:04 +0200)] 
lib: Add required #includes

dom_sid.h itself references talloc, and security.h references
DATA_BLOB.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowinbind: Fix a typo
Volker Lendecke [Sat, 18 Sep 2021 05:59:25 +0000 (07:59 +0200)] 
winbind: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server4: Fix a typo
Volker Lendecke [Fri, 17 Sep 2021 13:00:36 +0000 (15:00 +0200)] 
rpc_server4: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>