]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
6 years agolib: provide UTIME_NOW|OMIT defines under our own namespace
Ralph Boehme [Wed, 27 Nov 2019 11:28:30 +0000 (11:28 +0000)] 
lib: provide UTIME_NOW|OMIT defines under our own namespace

We may want to add additional defines in the future in order to deal with
NTTIME(-1) and NTTIME(-2) coming in over the wire. They have special semantics
attached to them, -1 requests "no automatic write time updates" on a filehandle
and -2 reenables them.

We could use something like

  #define SAMBA_UTIME_FREEZE (SAMBA_UTIME_OMIT - 1)
  #define SAMBA_UTIME_THAW (SAMBA_UTIME_FREEZE - 1)

in the future.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoreplace: ensure UTIME_NOW and UTIME_OMIT are always available
Ralph Boehme [Wed, 27 Nov 2019 11:28:08 +0000 (11:28 +0000)] 
replace: ensure UTIME_NOW and UTIME_OMIT are always available

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:tests: add a blackbox test that confirms broken timestamp behaviour
Ralph Boehme [Thu, 21 Nov 2019 15:44:37 +0000 (16:44 +0100)] 
s3:tests: add a blackbox test that confirms broken timestamp behaviour

This blackbox test confirms that Samba returns NTTIME=0 when a filesystem object
has a UNIX timestamp value of 0, ie UNIX epoch start 1.1.1970.

Here's an example output from running smbstatus allinfo on such a file:

  $ bin/smbclient -U slow%x //localhost/test -c "allinfo time_0_1970"
  altname: T11662~T
  create_time:    NTTIME(0)
  access_time:    NTTIME(0)
  write_time:     NTTIME(0)
  change_time:    NTTIME(0)
  attributes:  (80)
  stream: [::$DATA], 0 bytes

If you look at it with smbclient ls command, it munges the output to be 1970 so
you don't notice the problem:

  $ bin/smbclient -U slow%x //localhost/test -c "ls time_0_1970"
    time_0_1970                         N        0  Thu Jan  1 01:00:00 1970

The test also test other time_t values -1 and 4294967295 that are used as
sentinel values in Samba code and shows that handling these values is equally
broken.

Same for time_t values < -1.

Note that I'm adding a blackbox test *and* a torture test, as with this blackbox
test I can directly control the server side, but with smbtorture I have to go
through the SMB stack to create the files which doesn't work currently.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:lib: remove unused uint64s_nt_time_to_unix_abs()
Ralph Boehme [Thu, 21 Nov 2019 11:29:51 +0000 (12:29 +0100)] 
s3:lib: remove unused uint64s_nt_time_to_unix_abs()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agobootstrap: add debian10 support
Stefan Metzmacher [Wed, 4 Dec 2019 11:10:27 +0000 (12:10 +0100)] 
bootstrap: add debian10 support

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec  6 00:16:45 UTC 2019 on sn-devel-184

6 years agobootstrap: use runners with 'docker' and 'gce' tags for the image creation
Stefan Metzmacher [Wed, 4 Dec 2019 18:52:56 +0000 (19:52 +0100)] 
bootstrap: use runners with 'docker' and 'gce' tags for the image creation

As we currently have the 'shared' tag on our private runners, they
maybe selected for image creation, but it fails there.

A lot of shared runners provide 'docker' and 'gce' and they are able to
generate the images.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3:locking: simplify code in get_share_mode_lock()
Ralph Boehme [Thu, 28 Nov 2019 10:18:29 +0000 (10:18 +0000)] 
s3:locking: simplify code in get_share_mode_lock()

The call to get_static_share_mode_data() is identical in the if/else branches,
so move it behind them.

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 Dec  5 20:12:23 UTC 2019 on sn-devel-184

6 years agos4/smb_server: Fix handling of SMB2 messages after Netbios session setup
Noel Power [Wed, 20 Nov 2019 16:32:59 +0000 (16:32 +0000)] 
s4/smb_server: Fix handling of SMB2 messages after Netbios session setup

On receiving a special NBT packet (e.g. session setup) the samba daemon
effectively sets up SMB1 as the negotiated protocol (in terms of
software handling of the messages) even though no SMB protocol
has yet been negotiated. If the next message after the nbt session setup
is a SMB2 message it will be handled by the SMB1 callbacks and will be
rejected. This is evident when using smbclient (with -p 139) option
in an env where SMB1 cannot be negotiated [*]

This change doesn't set up the SMB1 callbacks on receipt of NBT special
messages but lets the generic callback in place. Once either SMB1 (or)
SMB2 is established (by receipt of a 'real' SMB or >=SMB2 message) then
the proper callbacks will be set as normal.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Dec  5 18:44:40 UTC 2019 on sn-devel-184

6 years agos3/utils: Make sure we can negotiate protocol based on smb.conf settings
Noel Power [Fri, 22 Nov 2019 17:01:45 +0000 (17:01 +0000)] 
s3/utils: Make sure we can negotiate protocol based on smb.conf settings

net_rpc_check was hardcoded to check for rpc using SMB1 only. We
should negotiate protocols based on the client max|min protocol settings

this commit also removes the entry for
   samba3.blackbox.net.misc.lookup share list

from knownfails as this test should now pass following this change.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/script/tests: Add simple test for net share list
Noel Power [Fri, 22 Nov 2019 16:53:08 +0000 (16:53 +0000)] 
s3/script/tests: Add simple test for net share list

Adding a test for the net share list command. Currently this
command will fail because of a bug in the net command when it tries
to see if rpc is supported. This change adds a known fail to swallow
this error. A future commit will fix the net command and remove the
known fail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/utils: net time always hardcoded to use SMB1
Noel Power [Tue, 19 Nov 2019 12:38:18 +0000 (12:38 +0000)] 
s3/utils: net time always hardcoded to use SMB1

net time ... cmd ignores any configuration to do with min/max protocols
and connects allways with smb1

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/script/tests: Use protocol param passed to selectively run tests
Noel Power [Thu, 21 Nov 2019 12:31:31 +0000 (12:31 +0000)] 
s3/script/tests: Use protocol param passed to selectively run tests

samba3.blackbox.smbclient_s3 passes NT1 or SMB3 to run tests however
the PROTOCOL param is not used consistently within the script which
results in NT1 and SMB3 traffic being produced during testing. This
obviously causes issues when running the tests in an test environment
where SMB1 cannot be negiotiated. These changes fix this

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/selftest: allow samba3.blackbox.smbclient_ntlm.plain run SMB1 & SMB3
Noel Power [Wed, 27 Nov 2019 20:06:10 +0000 (20:06 +0000)] 
s3/selftest: allow samba3.blackbox.smbclient_ntlm.plain run SMB1 & SMB3

samba3.blackbox.smbclient_ntlm.plain used test SMB3 & NT1 protocols
in one test. These changes:
  *  modify the test driver script test_smbclient_ntlm.sh to take a
     protocol as param
  *  modify the test description generators to pass NT1 & SMB3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/selftest: run samba3.blackbox.preserve_case with SMB1 & >=SMB2
Noel Power [Wed, 27 Nov 2019 19:44:23 +0000 (19:44 +0000)] 
s3/selftest: run samba3.blackbox.preserve_case with SMB1 & >=SMB2

adjust test generators to run SMB1 & >=SMB2 versions of
samba3.blackbox.preserve_case test.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/script/tests: Allow test script to accept option protocol list
Noel Power [Tue, 19 Nov 2019 15:45:35 +0000 (15:45 +0000)] 
s3/script/tests: Allow test script to accept option protocol list

test_preserve_case.sh tests a range of protocols, this however
fails when running against the normal test env (which have min
protocol of SMB2) because one of the protocols is NT1. This change
allows tests to pass the protocol (or list of protocols) so that
tests can be split.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/selftest: Run samba3.blackbox.net.misc with smb1/smb2
Ralph Boehme [Thu, 5 Dec 2019 10:05:57 +0000 (11:05 +0100)] 
s3/selftest: Run samba3.blackbox.net.misc with smb1/smb2

samba3.blackbox.net.misc now can run with >=SMB2 or SMB1 protocols,
adjust previous test definition and add new one

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/selftest: split SMB1 & SMB2 parts of samba3.blackbox.dfree_quota
Noel Power [Wed, 27 Nov 2019 19:37:26 +0000 (19:37 +0000)] 
s3/selftest: split SMB1 & SMB2 parts of samba3.blackbox.dfree_quota

samba3.blackbox.dfree_quota was almost exclusively a SMB3 test, only
one part was testing legacy SMB1 behaviour, this change splits this
out so the SMB1 part can be run independantly.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/script/tests: Prepare to split samba3.blackbox.net.misc for SMB1/SMB2
Noel Power [Tue, 19 Nov 2019 14:11:21 +0000 (14:11 +0000)] 
s3/script/tests: Prepare to split samba3.blackbox.net.misc for SMB1/SMB2

modify test_net_misc.sh to accept optional protocol, no protocol
specified and it behaves more or less as before (expect this time the
client max protocol is explicitly speficied)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/selftest: allow samba3.blackbox.dfree_command run NT1 & SMB3 tests
Noel Power [Wed, 27 Nov 2019 19:25:49 +0000 (19:25 +0000)] 
s3/selftest: allow samba3.blackbox.dfree_command run NT1 & SMB3 tests

samba3.blackbox.dfree_command was a single test that run both NT1 &
SMB3 tests together. This allow the protocol to be passed into the test
script so the test can be divided into SMB1 & >=SM2 tests.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agoselftest: fix a flapping test
Ralph Boehme [Thu, 5 Dec 2019 09:38:17 +0000 (10:38 +0100)] 
selftest: fix a flapping test

The previous approach of using ls | grep $NAME for testing whether the previous
directory removal succeeded will fail in case $NAME is a substring of any
directory entrie's name.

Eg

  NAME=tmp.123

and the directory contains an unrelated entry

  tmp.123456

Using allinfo instead should fix this.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoldb:tests: Allow test filtering in ldb_mod_op_test
Andreas Schneider [Wed, 4 Dec 2019 12:54:04 +0000 (13:54 +0100)] 
ldb:tests: Allow test filtering in ldb_mod_op_test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Dec  5 17:13:36 UTC 2019 on sn-devel-184

6 years agoldb:tests: Avoid that the debug function overwrites memory
Andreas Schneider [Wed, 4 Dec 2019 12:29:26 +0000 (13:29 +0100)] 
ldb:tests: Avoid that the debug function overwrites memory

We are setting ldb_debug_string() as the ldb debug function. The context
we give it is only valid as long as we're in that function.

On failure, we jump to the teardown function. The pointer for
debug_string isn't valid anymore, but the ldb debug system still points
to that address, and when we store the location of the allocated string,
we overwrite memory, in that case something from talloc and a
talloc_free() then jumps into the nirvana.

Thanks to Florian Weimer who helped debugging this.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
6 years agos3: smbd: Only set xconn->smb1.negprot.done = true after supported_protocols[protocol...
Jeremy Allison [Tue, 26 Nov 2019 20:53:09 +0000 (12:53 -0800)] 
s3: smbd: Only set xconn->smb1.negprot.done = true after supported_protocols[protocol].proto_reply_fn() succeeds.

Otherwise we can end up with negprot.done set, but
without smbXsrv_connection_init_tables() being called.

This can cause a client self-crash.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Dec  4 21:27:24 UTC 2019 on sn-devel-184

6 years agopython: tests. Add test for fuzzing smbd crash bug.
Jeremy Allison [Tue, 3 Dec 2019 01:23:21 +0000 (17:23 -0800)] 
python: tests. Add test for fuzzing smbd crash bug.

Mark knownfail for now.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3: smbd: Ensure we exit if supported_protocols[protocol].proto_reply_fn() fails.
Jeremy Allison [Tue, 26 Nov 2019 20:46:16 +0000 (12:46 -0800)] 
s3: smbd: Ensure we exit if supported_protocols[protocol].proto_reply_fn() fails.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agos3: smbd: Change (*proto_reply_fn()) to return an NTSTATUS.
Jeremy Allison [Tue, 26 Nov 2019 20:43:25 +0000 (12:43 -0800)] 
s3: smbd: Change (*proto_reply_fn()) to return an NTSTATUS.

That way the caller can know if the negprot really
succeeded or not.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agos3: smbd: Change reply_smb20xx() to return NTSTATUS.
Jeremy Allison [Tue, 26 Nov 2019 20:21:06 +0000 (12:21 -0800)] 
s3: smbd: Change reply_smb20xx() to return NTSTATUS.

Not yet used.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agos3: smbd: Ensure we exit on smbd_smb2_process_negprot() fail.
Jeremy Allison [Tue, 26 Nov 2019 20:17:29 +0000 (12:17 -0800)] 
s3: smbd: Ensure we exit on smbd_smb2_process_negprot() fail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agos3: smbd: Allow smbd_smb2_process_negprot() to return NTSTATUS as it can fail.
Jeremy Allison [Tue, 26 Nov 2019 20:14:29 +0000 (12:14 -0800)] 
s3: smbd: Allow smbd_smb2_process_negprot() to return NTSTATUS as it can fail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agopidl: don't export parser class methods
Douglas Bagnall [Sun, 1 Dec 2019 09:41:06 +0000 (22:41 +1300)] 
pidl: don't export parser class methods

These methods are not used or usable as exported functions. The
correct (and actual) usage is along these lines;

    require Parse::Pidl::Samba3::ClientNDR;
    my $generator = new Parse::Pidl::Samba3::ClientNDR();
    my ($c_code,$h_code) = $generator->Parse($ndr, $header, $c_header);

where the methods are either explicitly referenced (new A::B::C),
or are called from the blessed object, neither of which need
exporting.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Dec  4 06:35:06 UTC 2019 on sn-devel-184

6 years agopidl s4/TDR: use Parse::Pidl::Base
Douglas Bagnall [Sat, 30 Nov 2019 03:59:31 +0000 (16:59 +1300)] 
pidl s4/TDR: use Parse::Pidl::Base

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4/TDR: use conventional ->{res} name
Douglas Bagnall [Sun, 1 Dec 2019 04:43:20 +0000 (17:43 +1300)] 
pidl s4/TDR: use conventional ->{res} name

rather than ->{ret}, meaning this class can be moved to a Pidl::Base subclass

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl: s4/NDR/Parser uses Pidl::Base
Douglas Bagnall [Sat, 30 Nov 2019 03:55:15 +0000 (16:55 +1300)] 
pidl: s4/NDR/Parser uses Pidl::Base

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4/NDR/Client: use Pidl::Base
Douglas Bagnall [Sat, 30 Nov 2019 03:49:06 +0000 (16:49 +1300)] 
pidl s4/NDR/Client: use Pidl::Base

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4/NDR/Client: fix pidl_both()
Douglas Bagnall [Sat, 30 Nov 2019 03:37:43 +0000 (16:37 +1300)] 
pidl s4/NDR/Client: fix pidl_both()

This function was clearly meant to be adding output to both the .c and
.h files, but was only adding it to the .h due to a typo.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4::Python uses Pidl::Base
Douglas Bagnall [Sat, 30 Nov 2019 03:31:27 +0000 (16:31 +1300)] 
pidl s4::Python uses Pidl::Base

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl:: adjust s4::Python pidl_hdr() to be the same as others
Douglas Bagnall [Sat, 30 Nov 2019 03:30:48 +0000 (16:30 +1300)] 
pidl:: adjust s4::Python pidl_hdr() to be the same as others

The common case is for pidl_hdr() to add a "\n", which we can
easily do here, allowing this to be merged into the Pidl::Base borg.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl Samba3::ClientNDR uses Pidl::Base
Douglas Bagnall [Sat, 30 Nov 2019 03:25:54 +0000 (16:25 +1300)] 
pidl Samba3::ClientNDR uses Pidl::Base

We need to modify the '@ISA = ' line, because it overwrites
the inheritance from Pidl::Base.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl: optionally annotate output for debug purposes
Douglas Bagnall [Sat, 30 Nov 2019 03:22:22 +0000 (16:22 +1300)] 
pidl: optionally annotate output for debug purposes

It can sometimes be hard to tell which bit of pidl generated which bit
of C. This commit wants to help.

If the PIDL_DEVELOPER environment variable is set (via waf
--pidl-developer or some other means), pidl will annotate *most* C
indicating which lines were generated by which bits of pidl. It looks
something like this:

_PUBLIC_ enum ndr_err_code ndr_push_auth_session_info(struct ndr_push *ndr, int ndr_flags, const struct auth_session_info *r)
{  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseTypePushFunction  lib/Parse/Pidl/Samba4/NDR/Parser.pm:3079
NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseStructPush  lib/Parse/Pidl/Samba4/NDR/Parser.pm:604
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 5));  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseStructPushPrimitives  lib/Parse/Pidl/Samba4/NDR/Parser.pm:1448
NDR_CHECK(ndr_push_unique_ptr(ndr, r->security_token));  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParsePtrPush  lib/Parse/Pidl/Samba4/NDR/Parser.pm:604
NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_token));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_info));
NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
/* [ignore] 'torture' */  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseElementPushLevel  lib/Parse/Pidl/Samba4/NDR/Parser.pm:729
NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->session_key));  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseDataPush  lib/Parse/Pidl/Samba4/NDR/Parser.pm:604
NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParsePtrPush  lib/Parse/Pidl/Samba4/NDR/Parser.pm:604
/* [ignore] 'credentials' */  //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseElementPushLevel  lib/Parse/Pidl/Samba4/NDR/Parser.pm:729

The comments starting with '//:PIDL:' have the function name, the filename,
and line number. The comment follows the ordinary output, and uses the '//'
style so as not to interfere with multiline /* */ comments if they happen
to exist.

A '//:PIDL:' comment is added whenever the pidl function or indentation
level changes, and very occasionally at other places if pidl runs for a
while without either of these things happening.

This does not affect pidl parsers that do not inherit from Parse::Pidl::Base,
and is careful to have no performance impact on non-debug generation.

This may help with semi-automated flow analysis.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl: add a base class for PIDL parsers
Douglas Bagnall [Sat, 30 Nov 2019 02:22:16 +0000 (15:22 +1300)] 
pidl: add a base class for PIDL parsers

There are about 5 object-oriented parsers, all with their own
effectively identical but differently spelt versions of pidl(),
pidl_hdr(), indent(), and deindent(). With this commit we add a base
class that they can all use.

The ultimate aim is to be able to add some debugging instrumentation
that benefits all[1] the parsers.

[1] The parsers (e.g. Samba::ServerNDR) which use global scope rather
than objects will not be affected.

The versions of the functions in this file follow the most
sophisticated versions of the soon-to-be subclasses. For example, the
pidl() function avoids spurious whitespace and puts #define at column
0, following the Python parser.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopygpo: use correct method flags
Douglas Bagnall [Mon, 2 Dec 2019 22:17:26 +0000 (11:17 +1300)] 
pygpo: use correct method flags

The METH_KEYWORDS argument must always be combined with METH_VARARGS.

In Python up to 3.7 this was checked at runtime, and as we had no callers to
get_unix_path() in Python we never noticed. In Python 3.8 it is checked at
import time, and everyone notices even if they aren't directly using GPOs.

Found and reported by Val Kulkov.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14209
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibrpc: Avoid spinning on string_array elements with a short input
Andrew Bartlett [Thu, 7 Nov 2019 01:19:24 +0000 (14:19 +1300)] 
librpc: Avoid spinning on string_array elements with a short input

Without this protection we will spin during decode of a string_array or nstring_array
that is terminated by only a single NUL byte, not two as required by UTF-16.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolibrpc ndr: Tests for ndr_pull_string
Gary Lockyer [Mon, 2 Dec 2019 02:54:08 +0000 (15:54 +1300)] 
librpc ndr: Tests for ndr_pull_string

Tests to ensure that ndr_pull_string handles zero and one byte length
data correctly for both character strings and UTF-16 strings.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13874

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibrpc ndr: Infinite loop parsing Suplemental creds
Gary Lockyer [Tue, 3 Dec 2019 19:46:57 +0000 (08:46 +1300)] 
librpc ndr: Infinite loop parsing Suplemental creds

Fuzzing by Michael Hanselmann found an infinite loop parsing a malformed
supplemental credentials structure.  There are no server-side
network-accessible calls using this code.

This patch adds an ndrdump blackbox test to replicate the issue.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13874

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:heimdal_build: move krb5-types.h into include/krb5-types.h
Stefan Metzmacher [Mon, 2 Dec 2019 12:21:57 +0000 (13:21 +0100)] 
s4:heimdal_build: move krb5-types.h into include/krb5-types.h

source4/heimdal_build/include/ contains public headers,
which are needed by callers.

source4/heimdal_build/*.h should only be used for building the
in tree heimdal itself.

Without this an '#include "replace.h"' can catch 'config.h' from
source4/heimal_build/config.h before bin/default/include/config.h.
This #defines HAVE_CLOSEFROM unconditionally before replace.h can define
the replacement for rep_closefrom() on systems without libbsd.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec  3 23:36:17 UTC 2019 on sn-devel-184

6 years agoauth3: Remove auth_script
Volker Lendecke [Sun, 1 Dec 2019 09:07:06 +0000 (10:07 +0100)] 
auth3: Remove auth_script

Did this ever really work?

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 Dec  2 22:47:24 UTC 2019 on sn-devel-184

6 years agos3: smbclient doc fix
Puran Chand [Thu, 31 Oct 2019 15:32:47 +0000 (21:02 +0530)] 
s3: smbclient doc fix

Signed-off-by: Puran Chand <pchand@vmware.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Fix a typo
Volker Lendecke [Fri, 29 Nov 2019 14:44:00 +0000 (15:44 +0100)] 
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibndr: Fix a talloc context leak
Volker Lendecke [Fri, 29 Nov 2019 13:00:51 +0000 (14:00 +0100)] 
libndr: Fix a talloc context leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Avoid leaking share_entries.tdb records
Volker Lendecke [Fri, 29 Nov 2019 20:30:39 +0000 (21:30 +0100)] 
smbd: Avoid leaking share_entries.tdb records

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Use share_mode_do_locked() in smbd_do_unlocking()
Volker Lendecke [Thu, 28 Nov 2019 15:07:40 +0000 (16:07 +0100)] 
smbd: Use share_mode_do_locked() in smbd_do_unlocking()

We don't really need the share mode data here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolib: Remove unused smb_xvasprintf()
Volker Lendecke [Wed, 27 Nov 2019 18:02:43 +0000 (19:02 +0100)] 
lib: Remove unused smb_xvasprintf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martins@samba.org>
6 years agowinbind: Use vasprintf() in winbindd_cache
Volker Lendecke [Wed, 27 Nov 2019 18:00:26 +0000 (19:00 +0100)] 
winbind: Use vasprintf() in winbindd_cache

Don't need to panic, we can do explicit checks in these few callers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martins@samba.org>
6 years agolib: Remove a duplicate fdprintf() prototype
Volker Lendecke [Wed, 27 Nov 2019 17:55:53 +0000 (18:55 +0100)] 
lib: Remove a duplicate fdprintf() prototype

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martins@samba.org>
6 years agolib: Remove duplicate get_pass() prototypes
Volker Lendecke [Wed, 27 Nov 2019 07:36:59 +0000 (08:36 +0100)] 
lib: Remove duplicate get_pass() prototypes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martins@samba.org>
6 years agolib: Make stdin_new_passwd() static
Volker Lendecke [Wed, 27 Nov 2019 07:35:05 +0000 (08:35 +0100)] 
lib: Make stdin_new_passwd() static

It's only used in one place

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martins@samba.org>
6 years agoheimdal-build: avoid hard-coded /usr/include/heimdal in asn1_compile-generated code.
Uri Simchoni [Sun, 20 Oct 2019 18:36:11 +0000 (21:36 +0300)] 
heimdal-build: avoid hard-coded /usr/include/heimdal in asn1_compile-generated code.

This fixes a cross-compilation issue, as cross-compilers (rightly)
complain if host include directories are in the include path.

The fix is taken from buildroot (https://github.com/buildroot/buildroot/blob/8b11b96f41a6ffa76556c9bf03a863955871ee57/package/samba4/0006-heimdal_build-wscript_build-do-not-add-host-include-.patch) where it was applied by Bernd Kuhls <bernd.kuhls@t-online.de>.

This reverts some of 3fe2bfddda6149f6bf7402720226e9285f479fef, but
building Samba's bundled Heimdal with a system roken is not supported
anyway.

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

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): Sun Dec  1 10:22:01 UTC 2019 on sn-devel-184

6 years agoSplit winbindd into library and binary
Michael Hanselmann [Wed, 27 Nov 2019 23:25:52 +0000 (23:25 +0000)] 
Split winbindd into library and binary

The winbindd program was built in a single target with many source file,
making reuse of parts elsewhere impossible. With this change the
majority of the code is built as a subsystem and included in the binary
as a dependency.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: Test partial parse behaviour in ndrdump
Andrew Bartlett [Wed, 20 Nov 2019 05:55:47 +0000 (18:55 +1300)] 
selftest: Test partial parse behaviour in ndrdump

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): Fri Nov 29 02:09:11 UTC 2019 on sn-devel-184

6 years agondrdump: Do not run the validate step after a failure
Andrew Bartlett [Wed, 20 Nov 2019 05:54:28 +0000 (18:54 +1300)] 
ndrdump: Do not run the validate step after a failure

This avoids ending a failed parse with 'dump OK'

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agondrdump: Improve error message when the pipes fail to dump
Andrew Bartlett [Wed, 20 Nov 2019 05:54:04 +0000 (18:54 +1300)] 
ndrdump: Improve error message when the pipes fail to dump

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agondrdump: Show the actual struct/function name in the print, not just what it was...
Andrew Bartlett [Wed, 20 Nov 2019 05:53:09 +0000 (18:53 +1300)] 
ndrdump: Show the actual struct/function name in the print, not just what it was called

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolibrpc/ndr: Remove unused ndr_cab_generate_checksum()
Andrew Bartlett [Wed, 20 Nov 2019 22:28:36 +0000 (11:28 +1300)] 
librpc/ndr: Remove unused ndr_cab_generate_checksum()

This function is not just unused, it is a problem because there is no
enforced connection between r->ab.length and r->cbData.

The last caller was removed in the previous commit.

Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X
fuzzer.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolibrpc: Make CFDATA private to cab.idl and remove pull and push functions
Andrew Bartlett [Tue, 19 Nov 2019 03:07:50 +0000 (16:07 +1300)] 
librpc: Make CFDATA private to cab.idl and remove pull and push functions

We can do this because ndr_{pull,push}_CFDATA is unused.

The earlier commit 466d5e814727046dd630d5503b43874ec46a365e removed
the link between "uint16 cbData" and the size of "DATA_BLOB ab" so
when the new ndr_fuzz_X fusser pushed a new structure this allowed
a read beyond the end of allocated memory.

The ndr_push_cab_file() function is also manually written and
does not rely on the value of cbData to calculate the checksum.

Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X
fuzzer, which like ndrdump's struct mode uses the public structure
tables.  (This is how it found the unused functions to test).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agosamba-tool tests: re-add tests for attribute value verification using samba-tool
Björn Baumbach [Tue, 26 Nov 2019 09:56:15 +0000 (10:56 +0100)] 
samba-tool tests: re-add tests for attribute value verification using samba-tool

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool {user,group,computer,contact} show: avoid base64 encoded strings if possible
Björn Baumbach [Mon, 25 Nov 2019 13:13:37 +0000 (14:13 +0100)] 
samba-tool {user,group,computer,contact} show: avoid base64 encoded strings if possible

Be more user friendly and use clear text argument strings if possible.

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool tests: prepare tests for new samba-tool functionality
Björn Baumbach [Tue, 26 Nov 2019 09:41:29 +0000 (10:41 +0100)] 
samba-tool tests: prepare tests for new samba-tool functionality

Use ldbsearch instead of "samba-tool user show" to get base64 encoded
attribute. Used to verify that the attribute value has been changed
successfully.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool tests: remove duplicate definitions of test functions
Björn Baumbach [Mon, 25 Nov 2019 19:53:35 +0000 (20:53 +0100)] 
samba-tool tests: remove duplicate definitions of test functions

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool group show: fix a copy-paste mistake
Björn Baumbach [Mon, 25 Nov 2019 15:36:03 +0000 (16:36 +0100)] 
samba-tool group show: fix a copy-paste mistake

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agokrb5: move disabling dns-canon to lower level init calls
Isaac Boukris [Fri, 22 Nov 2019 21:39:09 +0000 (22:39 +0100)] 
krb5: move disabling dns-canon to lower level init calls

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov 27 12:24:16 UTC 2019 on sn-devel-184

6 years agokrb5: remove "set_dns_canonicalize" conf option
Isaac Boukris [Thu, 21 Nov 2019 18:44:05 +0000 (19:44 +0100)] 
krb5: remove "set_dns_canonicalize" conf option

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
6 years agoRevert "selftest: system-heimdal: workaround upstream "host" canon bug"
Isaac Boukris [Thu, 21 Nov 2019 18:26:57 +0000 (19:26 +0100)] 
Revert "selftest: system-heimdal: workaround upstream "host" canon bug"

This reverts commit 15ddd95d94688ed742a2965c4b269d7c84e2d858.

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agoheimdal: invoke gsskrb5_set_dns_canonicalize(false) in gse_context_init()
Isaac Boukris [Thu, 21 Nov 2019 20:05:24 +0000 (21:05 +0100)] 
heimdal: invoke gsskrb5_set_dns_canonicalize(false) in gse_context_init()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
6 years agoparam: remove now unused lp_string()
Ralph Boehme [Thu, 7 Nov 2019 10:40:07 +0000 (11:40 +0100)] 
param: remove now unused lp_string()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agoparam: remove FN_LOCAL_STRING
Ralph Boehme [Thu, 7 Nov 2019 10:37:47 +0000 (11:37 +0100)] 
param: remove FN_LOCAL_STRING

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:param: make "servicename" a substituted option
Ralph Boehme [Thu, 7 Nov 2019 10:01:05 +0000 (11:01 +0100)] 
s3:param: make "servicename" a substituted option

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agoprinting: use lpcfg_substituted_string() in print_run_command()
Ralph Boehme [Thu, 7 Nov 2019 08:50:37 +0000 (09:50 +0100)] 
printing: use lpcfg_substituted_string() in print_run_command()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agodocs-xml: remove explicit "constant"
Ralph Boehme [Tue, 19 Nov 2019 10:53:50 +0000 (11:53 +0100)] 
docs-xml: remove explicit "constant"

The constant mark applied to types "string" and "ustring". The previous patches
in this patchset already markes all string options as either constant or
substituted, but it's still possible to add options or change existing ones to
be neither constant nor substituted.

In order to enforce strings to be either constant or substitued, remove the
explicit constant marker. Instead, any option that is not marked as substituted
is implicitly made constant.

This patch doesn't change behaviour and all generated files are the same before
and after this change.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agoparam: remove now unused FN_GLOBAL_STRING macro
Ralph Boehme [Tue, 19 Nov 2019 09:30:46 +0000 (10:30 +0100)] 
param: remove now unused FN_GLOBAL_STRING macro

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agodocs-xml: remove SWAT specific flags
Ralph Boehme [Wed, 6 Nov 2019 13:24:58 +0000 (14:24 +0100)] 
docs-xml: remove SWAT specific flags

Most of the SWAT stuff was removed in 4a6a010e78721624813a84bfefa7a1b80eaf0abb,
somehow these two crept back in afterwards.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "usershare template share" with constant="1"
Ralph Boehme [Tue, 5 Nov 2019 11:20:22 +0000 (12:20 +0100)] 
smbdotconf: mark "usershare template share" with constant="1"

The code uses Globals.usershare_template_share directly anyway.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "rpc server dynamic port range" with constant="1"
Ralph Boehme [Tue, 5 Nov 2019 10:55:12 +0000 (11:55 +0100)] 
smbdotconf: mark "rpc server dynamic port range" with constant="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "mangling method" with constant="1"
Ralph Boehme [Tue, 5 Nov 2019 09:53:54 +0000 (10:53 +0100)] 
smbdotconf: mark "mangling method" with constant="1"

From the manpage:

  ... controls the algorithm used for the generating
  the mangled names. Can take two different values, "hash" and
  "hash2". ...

No need for variable substitution support in this option, declare it const.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "ldap user suffix" with constant="1"
Ralph Boehme [Mon, 4 Nov 2019 18:27:41 +0000 (19:27 +0100)] 
smbdotconf: mark "ldap user suffix" with constant="1"

Due to the use of append_ldap_suffix() where Globals.ldap_suffix is returned
directly, variable substitution isn't supported anyway, so we can just mark this
const.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "ldap machine suffix" with constant="1"
Ralph Boehme [Mon, 4 Nov 2019 18:27:41 +0000 (19:27 +0100)] 
smbdotconf: mark "ldap machine suffix" with constant="1"

Due to the use of append_ldap_suffix() where Globals.ldap_suffix is returned
directly, variable substitution isn't supported anyway, so we can just mark this
const.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "ldap idmap suffix" with constant="1"
Ralph Boehme [Mon, 4 Nov 2019 18:27:41 +0000 (19:27 +0100)] 
smbdotconf: mark "ldap idmap suffix" with constant="1"

Due to the use of append_ldap_suffix() where Globals.ldap_suffix is returned
directly, variable substitution isn't supported anyway, so we can just mark this
const.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "ldap group suffix" with constant="1"
Ralph Boehme [Mon, 4 Nov 2019 18:27:41 +0000 (19:27 +0100)] 
smbdotconf: mark "ldap group suffix" with constant="1"

Due to the use of append_ldap_suffix() where Globals.ldap_suffix is returned
directly, variable substitution isn't supported anyway, so we can just mark this
const.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "ldap suffix" with constant="1"
Ralph Boehme [Tue, 5 Nov 2019 08:46:21 +0000 (09:46 +0100)] 
smbdotconf: mark "ldap suffix" with constant="1"

Due to the use of append_ldap_suffix() where Globals.ldap_suffix was used
directly in the dependent options like "ldap group suffix", we can just mark
this option as const thereby removing substitution from "ldap suffix".

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "ldap admin dn" with constant="1"
Ralph Boehme [Mon, 4 Nov 2019 16:54:23 +0000 (17:54 +0100)] 
smbdotconf: mark "ldap admin dn" with constant="1"

All the other LDAP related options like "ldap user suffix" don't support
variable substitution, so I guess it's safe to remove support for it from this
one as well.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "wins hook" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:21:58 +0000 (12:21 +0100)] 
smbdotconf: mark "wins hook" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "usershare path" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:14:37 +0000 (12:14 +0100)] 
smbdotconf: mark "usershare path" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "username map script" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:12:51 +0000 (12:12 +0100)] 
smbdotconf: mark "username map script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "username map" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:11:54 +0000 (12:11 +0100)] 
smbdotconf: mark "username map" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "shutdown script" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:07:21 +0000 (12:07 +0100)] 
smbdotconf: mark "shutdown script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "set quota command" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:01:45 +0000 (12:01 +0100)] 
smbdotconf: mark "set quota command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "set primary group script" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 11:00:49 +0000 (12:00 +0100)] 
smbdotconf: mark "set primary group script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "server string" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 10:58:43 +0000 (11:58 +0100)] 
smbdotconf: mark "server string" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "root directory" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 10:51:56 +0000 (11:51 +0100)] 
smbdotconf: mark "root directory" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "rename user script" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 10:49:28 +0000 (11:49 +0100)] 
smbdotconf: mark "rename user script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agosmbdotconf: mark "remote browse sync" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 10:46:23 +0000 (11:46 +0100)] 
smbdotconf: mark "remote browse sync" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>