]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agotests/krb5: Clarify checksum type assertion message
Joseph Sutton [Mon, 11 Oct 2021 01:39:26 +0000 (14:39 +1300)] 
tests/krb5: Clarify checksum type assertion message

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: Use correct principal name type
Joseph Sutton [Mon, 11 Oct 2021 01:37:03 +0000 (14:37 +1300)] 
tests/krb5: Use correct principal name type

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 compatability tests for ticket checksums
Joseph Sutton [Thu, 14 Oct 2021 03:43:05 +0000 (16:43 +1300)] 
tests/krb5: Add compatability tests for ticket 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 parameter to enforce presence of ticket checksums
Joseph Sutton [Thu, 30 Sep 2021 03:53:35 +0000 (16:53 +1300)] 
tests/krb5: Add parameter to enforce presence of ticket checksums

This allows existing tests to pass before this functionality is
implemented.

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: Supply supported account enctypes in tgs_req()
Joseph Sutton [Wed, 29 Sep 2021 03:52:01 +0000 (16:52 +1300)] 
tests/krb5: Supply supported account enctypes in 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: Allow specifying options and expected flags when obtaining a ticket
Joseph Sutton [Wed, 29 Sep 2021 03:48:50 +0000 (16:48 +1300)] 
tests/krb5: Allow specifying options and expected flags when obtaining a 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: Save account SPN
Joseph Sutton [Wed, 29 Sep 2021 03:41:23 +0000 (16:41 +1300)] 
tests/krb5: Save account SPN

This is useful for testing delegation.

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: Check constrained delegation PAC buffer
Joseph Sutton [Wed, 29 Sep 2021 03:26:54 +0000 (16:26 +1300)] 
tests/krb5: Check constrained delegation PAC buffer

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: Check buffer types in PAC with STRICT_CHECKING=1
Joseph Sutton [Wed, 29 Sep 2021 03:15:26 +0000 (16:15 +1300)] 
tests/krb5: Check buffer types in PAC with STRICT_CHECKING=1

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 agoheimdal:kdc: Only check for default salt for des-cbc-crc enctype
Joseph Sutton [Fri, 8 Oct 2021 02:53:47 +0000 (15:53 +1300)] 
heimdal:kdc: Only check for default salt for des-cbc-crc enctype

Previously, this algorithm was preferring RC4 over AES for machine
accounts in the preauth case. This is because AES keys for machine
accounts in Active Directory use a non-default salt, while RC4 keys do
not use a salt. To avoid this behaviour, only prefer keys with default
salt for the des-cbc-crc enctype.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Add expect_claims parameter to kdc_exchange_dict
Joseph Sutton [Wed, 29 Sep 2021 03:10:07 +0000 (16:10 +1300)] 
tests/krb5: Add expect_claims parameter to kdc_exchange_dict

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 error data
Joseph Sutton [Wed, 29 Sep 2021 02:48:58 +0000 (15:48 +1300)] 
tests/krb5: Fix checking for presence of error 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: Remove unneeded parameters from ticket cache key
Joseph Sutton [Wed, 29 Sep 2021 01:02:37 +0000 (14:02 +1300)] 
tests/krb5: Remove unneeded parameters from ticket cache key

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 assertElementFlags()
Joseph Sutton [Wed, 29 Sep 2021 00:03:49 +0000 (13:03 +1300)] 
tests/krb5: Fix assertElementFlags()

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 expected_sname checking more explicit
Joseph Sutton [Wed, 29 Sep 2021 00:01:30 +0000 (13:01 +1300)] 
tests/krb5: Make expected_sname checking more explicit

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 status code checking
Joseph Sutton [Tue, 28 Sep 2021 23:16:58 +0000 (12:16 +1300)] 
tests/krb5: Fix status code checking

The type used to encode the status code is actually KERB-ERROR-DATA,
rather than PA-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: Fix handling authdata with missing PAC
Joseph Sutton [Tue, 28 Sep 2021 23:06:03 +0000 (12:06 +1300)] 
tests/krb5: Fix handling authdata with missing PAC

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 excluding the PAC server checksum
Joseph Sutton [Tue, 28 Sep 2021 23:03:33 +0000 (12:03 +1300)] 
tests/krb5: Allow excluding the PAC server checksum

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 checksum generation and verification
Joseph Sutton [Tue, 28 Sep 2021 22:59:42 +0000 (11:59 +1300)] 
tests/krb5: Fix checksum generation and verification

The KDC and server checksums may be generated using the same key, but
only the KDC checksum should have an RODCIdentifier. To fix this,
instead of overriding the existing methods, add additional ones for
RODC-specific signatures, so that both types of signatures can be
generated or verified.

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 method for creating invalid length zeroed checksum
Joseph Sutton [Tue, 28 Sep 2021 22:56:21 +0000 (11:56 +1300)] 
tests/krb5: Fix method for creating invalid length zeroed checksum

Previously the base class method was being used.

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: Introduce helper method for creating invalid length checksums
Joseph Sutton [Tue, 28 Sep 2021 22:54:49 +0000 (11:54 +1300)] 
tests/krb5: Introduce helper method for creating invalid length 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 assertion to make failures clearer
Joseph Sutton [Tue, 28 Sep 2021 22:52:17 +0000 (11:52 +1300)] 
tests/krb5: Add assertion to make failures clearer

These failures may occur if tests are not run against an RODC.

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 created accounts to use resource-based constrained delegation
Joseph Sutton [Tue, 28 Sep 2021 22:50:36 +0000 (11:50 +1300)] 
tests/krb5: Allow created accounts to use resource-based constrained delegation

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: Rename allowed_to_delegate_to parameter for clarity
Joseph Sutton [Tue, 28 Sep 2021 22:47:39 +0000 (11:47 +1300)] 
tests/krb5: Rename allowed_to_delegate_to parameter for clarity

This helps to distinguish resourced-based and non-resource-based
constrained delegation.

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 PA-PAC-OPTIONS checking
Joseph Sutton [Wed, 29 Sep 2021 21:54:33 +0000 (10:54 +1300)] 
tests/krb5: Fix PA-PAC-OPTIONS checking

Make the check work correctly if bits other than the claims bit are
specified.

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 sending PA-PAC-OPTIONS and PA-PAC-REQUEST
Joseph Sutton [Wed, 29 Sep 2021 21:51:01 +0000 (10:51 +1300)] 
tests/krb5: Fix sending PA-PAC-OPTIONS and PA-PAC-REQUEST

These padata were not being sent if other FAST padata was not specified.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5: Allow for missing msDS-KeyVersionNumber attribute
Joseph Sutton [Tue, 28 Sep 2021 22:23:17 +0000 (11:23 +1300)] 
tests/krb5: Allow for missing msDS-KeyVersionNumber attribute

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: Remove unused parameter
Joseph Sutton [Tue, 28 Sep 2021 22:16:51 +0000 (11:16 +1300)] 
tests/krb5: Remove unused parameter

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: Rename method parameter
Joseph Sutton [Tue, 28 Sep 2021 22:16:24 +0000 (11:16 +1300)] 
tests/krb5: Rename method parameter

For class methods, the name given to the first parameter is generally 'cls'
rather than 'self'.

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 agodebug: Optimise construction of msg_no_nl
Martin Schwenke [Thu, 14 Oct 2021 00:08:38 +0000 (11:08 +1100)] 
debug: Optimise construction of msg_no_nl

If it isn't used then it isn't copied.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Oct 14 11:10:40 UTC 2021 on sn-devel-184

4 years agodebug: Move msg_no_nl to state
Martin Schwenke [Thu, 14 Oct 2021 00:00:20 +0000 (11:00 +1100)] 
debug: Move msg_no_nl to state

This enables an optimisation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Optimise early return when header string buffer is full
Martin Schwenke [Wed, 13 Oct 2021 09:40:34 +0000 (20:40 +1100)] 
debug: Optimise early return when header string buffer is full

The existing check is for truncation, not whether the buffer is full.
However, if the buffer is full (i.e. hs_len == sizeof(header_str) - 1)
then there's no use trying subsequent snprintf() calls because there
will be one byte available that already contains the NUL-terminator.
A subsequent call will just do a no-op truncation.

Check for full buffer instead.

This might be confusing because it isn't the standard check that is
done after snprintf() calls.  Is it worth it for a rare corner case?

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Optimise to avoid walking the header string
Martin Schwenke [Wed, 13 Oct 2021 01:06:13 +0000 (12:06 +1100)] 
debug: Optimise to avoid walking the header string

strlcat() needs to walk to the end of its first argument.  However,
but the length of state.header_str is already known, so optimise by
manually appending the extra characters if they will fit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Optimise construction of header_str_no_nl
Martin Schwenke [Thu, 23 Sep 2021 08:13:30 +0000 (18:13 +1000)] 
debug: Optimise construction of header_str_no_nl

If it isn't used then it isn't copied.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Rename variable for consistency
Martin Schwenke [Wed, 6 Oct 2021 12:02:10 +0000 (23:02 +1100)] 
debug: Rename variable for consistency

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Push message length argument down to backend log functions
Martin Schwenke [Fri, 2 Dec 2016 05:37:47 +0000 (16:37 +1100)] 
debug: Push message length argument down to backend log functions

Optimise because length is now available.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Add length argument to Debug1()
Martin Schwenke [Fri, 2 Dec 2016 05:29:56 +0000 (16:29 +1100)] 
debug: Add length argument to Debug1()

This the first step in avoiding potentially repeated length
calculations in the backends.  The length is known at call time for
most usual callers, so pass it down.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Avoid debug header being separated from debug text
Martin Schwenke [Sat, 3 Dec 2016 01:27:47 +0000 (12:27 +1100)] 
debug: Avoid debug header being separated from debug text

Currently the file backend can produce something like:

  HEADER1 HEADER2  TEXT2
    TEXT1

when different processes try to log at the same time.

Avoid this by writing the header and text at the same time using
writev().  This means that the header always has to be written by the
backend, so update all backends to do this.

The non-file backends should behave as before when they were invoked
separately to render the header.  It might be possible to optimise
some of them (e.g. via sd_journal_sendv) but this requires more
investigation (e.g. sd_journal_sendv()'s handling of newlines) and is
beyond the scope of this change.

state.header_str_no_nl takes the place of msg_no_nl for the header,
since some of the backends need the no-newline version.  It is handled
the same was as msg_no_nl: produce the no_nl version exactly once,
whether or not it is needed, since this is better than repeating it in
several backends.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Factor out function copy_no_nl()
Martin Schwenke [Wed, 6 Oct 2021 11:49:06 +0000 (22:49 +1100)] 
debug: Factor out function copy_no_nl()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Add a level of indirection to ring buffer logging
Martin Schwenke [Thu, 23 Sep 2021 00:25:04 +0000 (10:25 +1000)] 
debug: Add a level of indirection to ring buffer logging

Add an internal function to do the work and call it.  It will be
called again in a subsequent commit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodebug: Move header_str and hs_len to state
Martin Schwenke [Wed, 13 Oct 2021 00:42:14 +0000 (11:42 +1100)] 
debug: Move header_str and hs_len to state

They'll need to be accessible by the backends.

Note that the snprintf() and strlcat() calls can result in
state.hs_len >= sizeof(state.header_str), so state.hs_len needs to be
sanitised before any potential use.  Previously this wasn't necessary
because this value was on the stack, so it couldn't be used after
dbghdrclass() returned.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agodocs: document new Spotlight Elasticsearch options
Ralph Boehme [Wed, 13 Oct 2021 17:16:10 +0000 (19:16 +0200)] 
docs: document new Spotlight Elasticsearch options

  elasticsearch:ignore unknown attribute = yes | no (default: no)
  elasticsearch:ignore unknown type = yes | no (default: no)

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Oct 14 10:20:27 UTC 2021 on sn-devel-184

4 years agomdssvc: add options to allow ignoring attribute and type mapping errors
Ralph Boehme [Sat, 9 Oct 2021 16:51:14 +0000 (18:51 +0200)] 
mdssvc: add options to allow ignoring attribute and type mapping errors

This adds two options that are used by the Spotlight query parser to optionally
ignore unknown attributes or types in a query.

    elasticsearch:ignore unknown attribute = yes | no (default: no)
    elasticsearch:ignore unknown type = yes | no (default: no)

Example Spotlight query with unknown attributes and type:

    kMDItemContentType=="public.calendar-event"||kMDItemSubject=="Kalender*"cdw||
    kMDItemTitle=="Kalender*"cdw||kMDItemTopic=="Kalender*"cdw||
    kMDItemTextContent=="Kalender*"cd||*=="Kalender*"cdw||
    kMDItemTextContent=="Kalender*"cdw

The unknown attributes are "kMDItemTopic" and "kMDItemSubject". The unkown type
is "public.calendar-event".

Currently the parser will outright fail to parse the query and the search will
enter an error state.

To give users some control over the mapping the above options can be used to
tell the parser to simply ignore such unknown attributes and types.

  (meta.title:Kalender* OR content:Kalender* OR Kalender* OR content:Kalender*)

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
4 years agomdssvc: prepare for ignore attribute and type mapping errors
Ralph Boehme [Sat, 9 Oct 2021 16:50:02 +0000 (18:50 +0200)] 
mdssvc: prepare for ignore attribute and type mapping errors

Lower the debug levels to debug from error. No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
4 years agoselftest: add a test ignored spotlight/elasticsearch mapping failures
Ralph Boehme [Sat, 9 Oct 2021 14:44:25 +0000 (16:44 +0200)] 
selftest: add a test ignored spotlight/elasticsearch mapping failures

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
4 years ago.gitlab-ci: Avoid duplicate CI on all merge requests
Andrew Bartlett [Wed, 13 Oct 2021 19:51:21 +0000 (08:51 +1300)] 
.gitlab-ci: Avoid duplicate CI on all merge requests

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Oct 14 01:21:11 UTC 2021 on sn-devel-184

4 years ago.gitlab-ci.yml: Restore building most of our jobs
Andrew Bartlett [Wed, 13 Oct 2021 19:11:49 +0000 (08:11 +1300)] 
.gitlab-ci.yml: Restore building most of our jobs

We are changing the primary build jobs to use "when"
not "only".  These a similar and related GitLab syntax
tools to control when jobs are run.

With 'when' now in use it must be specified on all jobs
that inherit from each other via:

.extends .shared_template

"only" can be left however for the pages and coverity as
these use:

.extends .shared_runner_build_image

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
4 years ago.gitlab-ci: Increase build timeout
Joseph Sutton [Mon, 11 Oct 2021 02:37:48 +0000 (15:37 +1300)] 
.gitlab-ci: Increase build timeout

While the build will not take > 1hr, uploading the artifacts
needed to pass the build objects to the next stage can take
some time due to the distance between the runners and the
private CI server.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Oct 13 12:00:03 UTC 2021 on sn-devel-184

4 years ago.gitlab-ci.yml: Honour AUTOBUILD_SKIP_SAMBA_O3 in GitLab CI
Andrew Bartlett [Mon, 11 Oct 2021 18:55:54 +0000 (07:55 +1300)] 
.gitlab-ci.yml: Honour AUTOBUILD_SKIP_SAMBA_O3 in GitLab CI

GitLab CI resources are expensive and often rationed so
provide a way to test other things without testing an -O3
build also, as this will save 9 jobs.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoFix detection of rpc/xdr.h on macOS
Alex Richardson [Wed, 8 Sep 2021 13:42:57 +0000 (14:42 +0100)] 
Fix detection of rpc/xdr.h on macOS

We need to include rpc/types.h first to include this header.

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct 13 02:33:05 UTC 2021 on sn-devel-184

4 years agovfs_preopen.c: Fix -Wformat error on macOS
Alex Richardson [Wed, 8 Sep 2021 13:42:25 +0000 (14:42 +0100)] 
vfs_preopen.c: Fix -Wformat error on macOS

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosource3/smbd/statcache.c: Fix -Wformat build error on macOS
Alex Richardson [Wed, 8 Sep 2021 12:29:54 +0000 (13:29 +0100)] 
source3/smbd/statcache.c: Fix -Wformat build error on macOS

The format string uses PRIx64, so we should be using uint64_t and not
uintmax_t.

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosec_ctx.c: Fix -Wunused-function warning on macOS
Alex Richardson [Wed, 8 Sep 2021 12:27:41 +0000 (13:27 +0100)] 
sec_ctx.c: Fix -Wunused-function warning on macOS

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosource3/printing/queue_process.c: fix build on macOS
Alex Richardson [Wed, 8 Sep 2021 12:25:04 +0000 (13:25 +0100)] 
source3/printing/queue_process.c: fix build on macOS

On macOS environ is defined to (*_NSGetEnviron()) in lib/replace/replace.h
and otherwise the `extern char **environ` can be found there.

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoaudit_logging.c: fix compilation on macOS
Alex Richardson [Wed, 8 Sep 2021 11:57:03 +0000 (12:57 +0100)] 
audit_logging.c: fix compilation on macOS

On macOS tv_usec is an int so failus the build with -Werror,-Wformat.

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agocharset_macosxfs.c: fix compilation on macOS
Alex Richardson [Wed, 8 Sep 2021 11:52:57 +0000 (12:52 +0100)] 
charset_macosxfs.c: fix compilation on macOS

The DEBUG macro was missing and the CFStringGetBytes() was triggering a
-Werror,-Wpointer-sign build failure.

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-tests: Drop unused function ctdb_get_all_public_addresses()
Martin Schwenke [Tue, 12 Oct 2021 01:27:51 +0000 (12:27 +1100)] 
ctdb-tests: Drop unused function ctdb_get_all_public_addresses()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Oct 12 23:24:18 UTC 2021 on sn-devel-184

4 years agoctdb-tests: add a comment to the generated public_addresses file used by eventscript...
Ralph Boehme [Fri, 8 Oct 2021 03:58:37 +0000 (05:58 +0200)] 
ctdb-tests: add a comment to the generated public_addresses file used by eventscript UNIT tests

test stub code has been updated to handle this, so now let's put it
to work.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14826
RN: Correctly ignore comments in CTDB public addresses file

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tests: Fix typo in ctdb stub comment matching
Martin Schwenke [Tue, 12 Oct 2021 01:19:27 +0000 (12:19 +1100)] 
ctdb-tests: Fix typo in ctdb stub comment matching

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoctdb-scripts: filter out comments in public_addresses file
Ralph Boehme [Wed, 8 Sep 2021 14:53:12 +0000 (16:53 +0200)] 
ctdb-scripts: filter out comments in public_addresses file

Note that order of sed expressions matters: the expression to delete
comment lines must come first as the second expression would transform

  # comment

to

  comment

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agos3: VFS: zfsacl: Ensure we use a pathref fd, not an io fd, for getting/setting ZFS...
Jeremy Allison [Mon, 11 Oct 2021 19:26:57 +0000 (12:26 -0700)] 
s3: VFS: zfsacl: Ensure we use a pathref fd, not an io fd, for getting/setting ZFS ACLs.

Don't use path-based calls.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 12 18:14:27 UTC 2021 on sn-devel-184

4 years agodocs-xml: Use /var/tmp for spooling in smb.conf.5
Andreas Schneider [Wed, 6 Oct 2021 12:02:10 +0000 (14:02 +0200)] 
docs-xml: Use /var/tmp for spooling in smb.conf.5

This is a world writeable directory which exists on Linux distributions by
default already.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Oct 12 17:24:01 UTC 2021 on sn-devel-184

4 years agodocs-xml: Remove trailing spaces in smb.conf.5.xml
Andreas Schneider [Wed, 6 Oct 2021 12:01:42 +0000 (14:01 +0200)] 
docs-xml: Remove trailing spaces in smb.conf.5.xml

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agodocs-xml: Update winbindd(8) manpage
Pavel Filipenský [Fri, 8 Oct 2021 11:16:05 +0000 (13:16 +0200)] 
docs-xml: Update winbindd(8) manpage

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

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 12 09:30:02 UTC 2021 on sn-devel-184

4 years agos3:winbindd: Fix winbindd child logfile name handling
Pavel Filipenský [Thu, 7 Oct 2021 10:08:22 +0000 (12:08 +0200)] 
s3:winbindd: Fix winbindd child logfile name handling

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

Handling of logfile name for main and child winbindd must ensure:

1) Log directory is selected in this order:
  * -l option of winbindd
  * "log file" parameter in smb.conf
  * compile time value '/usr/local/samba/var'

2) Log filename pattern
  * parent process uses log.winbindd
  * child uses log.wb-<name>

3) Log reopen works for both parent and child (i.e. log filename is not changed)
  * kill -HUP <pid>
  * smbcontrol <pid> reload-config

This commit removes 3 calls of is_default_dyn_LOGFILEBASE() to make sure that:
  - 1st removal: child uses log.wb-<name> after the fork
  - 2nd removal: child after HUP signal, does not switch to log.winbindd
  - 3rd removal: child after smbcontrol reload-config, does not switch to
    log.winbindd

Interesting commits: bfa1b2a8 1484b7f3 3b015a4c d1f7a371

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: smbd: Ensure when we change security context we delete any $cwd cache.
Jeremy Allison [Thu, 7 Oct 2021 21:11:25 +0000 (14:11 -0700)] 
s3: smbd: Ensure when we change security context we delete any $cwd cache.

This will ensure we *always* call into the VFS_SMB_CHDIR backends
on security context switch. The $cwd was an optimization that
was only looking at the raw filesystem path. We could delete it
completely but that is a patch for another day.

Remove knownfail on regression test.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14682
RN: vfs_shadow_copy2: core dump in make_relative_path

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Oct  8 21:28:04 UTC 2021 on sn-devel-184

4 years agos3: selftest: Add regression test to show the $cwd cache is misbehaving when we conne...
Jeremy Allison [Thu, 7 Oct 2021 21:08:48 +0000 (14:08 -0700)] 
s3: selftest: Add regression test to show the $cwd cache is misbehaving when we connect as a different user on a share.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agovfs: add and use a few SMB_VFS_ODX defines
Ralph Boehme [Fri, 9 Jul 2021 09:28:22 +0000 (11:28 +0200)] 
vfs: add and use a few SMB_VFS_ODX defines

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 Oct  8 20:21:21 UTC 2021 on sn-devel-184

4 years agolib: add sys_block_align[_truncate]()
Ralph Boehme [Tue, 22 Jun 2021 16:58:21 +0000 (18:58 +0200)] 
lib: add sys_block_align[_truncate]()

This implements MS-FSA algorithms BlockAlign() and BlockAlignTruncate().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: Add flags and xferlen args to SMB_VFS_OFFLOAD_READ_RECV
Ralph Boehme [Tue, 22 Jun 2021 18:13:02 +0000 (20:13 +0200)] 
vfs: Add flags and xferlen args to SMB_VFS_OFFLOAD_READ_RECV

We missed these values which follow from MS-FSCC 2.3.80 “FSCTL_OFFLOAD_READ
Reply”:

  Flags (4 bytes):

    A 32-bit unsigned integer that indicates which flags were returned for this
    operation. Possible values for the flags follow. All unused bits are reserved
    for future use, SHOULD be set to 0, and MUST be ignored.

    OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE (0x00000001)
    => The data beyond the current range is logically equivalent to zero.

  TransferLength (8 bytes):

    A 64-bit unsigned integer that contains the amount, in bytes, of data that the
    Token logically represents. This value indicates a contiguous region of the
    file from the beginning of the requested offset in the FileOffset field in the
    FSCTL_OFFLOAD_READ_INPUT data element (section 2.3.79). This value can be
    smaller than the CopyLength field specified in the FSCTL_OFFLOAD_READ_INPUT
    data element, which indicates that less data was logically
    represented (logically read) with the Token than was requested. The value of
    this field MUST be greater than 0x0000000000000000 and MUST be aligned to a
    logical sector boundary on the volume.

As we currently only implement COPY_CHUNK over the OFFLOAD VFS interface, the
VFS COPY_CHUNK backend in vfs_default just sets both values to 0 and they are
unused in the SMB frontend.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoidl: declare token array of storage_offload_token as in-line
Ralph Boehme [Fri, 18 Jun 2021 14:32:53 +0000 (16:32 +0200)] 
idl: declare token array of storage_offload_token as in-line

This ensures the order of the struct element is the same as in the IDL
definition. For an conformant array using the [sizeis(n)] syntax the sizeis
member is stored as first element in the marshall buffer.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Remove pipes_struct->private_data
Volker Lendecke [Thu, 7 Oct 2021 09:22:59 +0000 (11:22 +0200)] 
rpc_server3: Remove pipes_struct->private_data

netlogon3 was the only user

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Use dcesrv_iface_state in netlogon3
Volker Lendecke [Thu, 7 Oct 2021 09:22:20 +0000 (11:22 +0200)] 
rpc_server3: Use dcesrv_iface_state in netlogon3

Align with the source4/rpc_server/netlogon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonetlogon: Move netlogon_server_pipe_state to netlogon.idl
Volker Lendecke [Thu, 7 Oct 2021 08:07:48 +0000 (10:07 +0200)] 
netlogon: Move netlogon_server_pipe_state to netlogon.idl

Make this available as a shared structure for both source3 and source4

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Remove an outdated comment
Volker Lendecke [Mon, 4 Oct 2021 08:25:14 +0000 (10:25 +0200)] 
rpc_server3: Remove an outdated comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Remove "pipes_struct->opnum"
Volker Lendecke [Mon, 4 Oct 2021 08:19:24 +0000 (10:19 +0200)] 
rpc_server3: Remove "pipes_struct->opnum"

Also available via dce_call->pkt.u.request.opnum

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Remove "pipes_struct->call_id"
Volker Lendecke [Mon, 4 Oct 2021 08:07:09 +0000 (10:07 +0200)] 
rpc_server3: Remove "pipes_struct->call_id"

Unused.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Simplify get_sec_mask_str()
Volker Lendecke [Wed, 6 Oct 2021 08:33:50 +0000 (10:33 +0200)] 
libcli: Simplify get_sec_mask_str()

Use talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodsdb: Simplify schema_attribute_description() & friends
Volker Lendecke [Wed, 6 Oct 2021 08:47:48 +0000 (10:47 +0200)] 
dsdb: Simplify schema_attribute_description() & friends

Use talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowinbind: Simplify winbindd_sids_to_xids_recv()
Volker Lendecke [Wed, 6 Oct 2021 08:13:52 +0000 (10:13 +0200)] 
winbind: Simplify winbindd_sids_to_xids_recv()

Use talloc_asprintf_addbuf(), fix an realloc error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowinbind: Simplify winbindd_getusersids_recv()
Volker Lendecke [Wed, 6 Oct 2021 08:10:21 +0000 (10:10 +0200)] 
winbind: Simplify winbindd_getusersids_recv()

Use talloc_asprintf_addbuf(), fix an realloc error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowinbind: Simplify winbindd_getsidaliases_recv()
Volker Lendecke [Wed, 6 Oct 2021 08:09:45 +0000 (10:09 +0200)] 
winbind: Simplify winbindd_getsidaliases_recv()

Use talloc_asprintf_addbuf(), fix an realloc error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Use talloc_asprintf_addbuf() in utok_string()
Volker Lendecke [Wed, 6 Oct 2021 08:01:07 +0000 (10:01 +0200)] 
lib: Use talloc_asprintf_addbuf() in utok_string()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibrpc: Use talloc_asprintf_addbuf() in dcerpc_binding_string()
Volker Lendecke [Wed, 6 Oct 2021 07:54:46 +0000 (09:54 +0200)] 
librpc: Use talloc_asprintf_addbuf() in dcerpc_binding_string()

Saves quite a few lines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Add talloc_asprintf_addbuf()
Volker Lendecke [Wed, 6 Oct 2021 07:53:57 +0000 (09:53 +0200)] 
lib: Add talloc_asprintf_addbuf()

Simplifies building up a string step by step, see next commit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowinbind: Align an integer type
Volker Lendecke [Wed, 6 Oct 2021 08:09:27 +0000 (10:09 +0200)] 
winbind: Align an integer type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Remove unused fields from struct dcerpc_ncacn_conn
Volker Lendecke [Wed, 6 Oct 2021 09:10:57 +0000 (11:10 +0200)] 
rpc_server3: Remove unused fields from struct dcerpc_ncacn_conn

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Align integer types
Volker Lendecke [Wed, 6 Oct 2021 07:20:44 +0000 (09:20 +0200)] 
libcli: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Avoid an includes.h
Volker Lendecke [Wed, 6 Oct 2021 07:16:32 +0000 (09:16 +0200)] 
libcli: Avoid an includes.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoidmap_script: Save a few lines with str_list_add_printf()
Volker Lendecke [Thu, 30 Sep 2021 07:27:10 +0000 (09:27 +0200)] 
idmap_script: Save a few lines with str_list_add_printf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Fix a typo in a DEBUG fn prefix by using DBG_
Volker Lendecke [Tue, 5 Oct 2021 19:44:53 +0000 (21:44 +0200)] 
lib: Fix a typo in a DEBUG fn prefix by using DBG_

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Simplify set_privileges with a struct initialization
Volker Lendecke [Tue, 5 Oct 2021 19:40:45 +0000 (21:40 +0200)] 
lib: Simplify set_privileges with a struct initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Avoid a cast in a DBG statement
Volker Lendecke [Tue, 5 Oct 2021 19:31:41 +0000 (21:31 +0200)] 
lib: Avoid a cast in a DBG statement

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Simplify security_session_user_level()
Volker Lendecke [Sat, 25 Sep 2021 06:23:03 +0000 (08:23 +0200)] 
libcli: Simplify security_session_user_level()

Use sid_compose(), use struct dom_sid on the stack.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Introduce a helper variable in security_session_user_level()
Volker Lendecke [Sat, 25 Sep 2021 06:20:18 +0000 (08:20 +0200)] 
libcli: Introduce a helper variable in security_session_user_level()

Makes it easier to read for me

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli: Remove unused security_token_has_sid_string()
Volker Lendecke [Sat, 25 Sep 2021 05:58:47 +0000 (07:58 +0200)] 
libcli: Remove unused security_token_has_sid_string()

This should have been removed in ef990008f22, I just was not aware
it's there...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba: Save a line with TALLOC_FREE
Volker Lendecke [Tue, 28 Sep 2021 09:28:01 +0000 (11:28 +0200)] 
samba: Save a line with TALLOC_FREE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Avoid ZERO_STRUCT() with a struct init
Volker Lendecke [Sat, 25 Sep 2021 06:25:14 +0000 (08:25 +0200)] 
smbd: Avoid ZERO_STRUCT() with a struct init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolsa_server3: Align integer types
Volker Lendecke [Mon, 4 Oct 2021 08:10:42 +0000 (10:10 +0200)] 
lsa_server3: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agorpc_server3: Avoid a literal number available as a constant
Volker Lendecke [Fri, 8 Oct 2021 09:38:30 +0000 (11:38 +0200)] 
rpc_server3: Avoid a literal number available as a constant

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