gd/samba-autobuild/.git
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agosmbdotconf: mark "remote announce" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 10:39:27 +0000 (11:39 +0100)]
smbdotconf: mark "remote announce" with substitution="1"

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3: remove a prototype that is generated by loadparm
Ralph Boehme [Mon, 18 Nov 2019 17:39:53 +0000 (18:39 +0100)]
s3: remove a prototype that is generated by loadparm

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "passwd program" with substitution="1"
Ralph Boehme [Mon, 18 Nov 2019 17:28:27 +0000 (18:28 +0100)]
smbdotconf: mark "passwd program" with substitution="1"

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

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "message command" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 09:59:40 +0000 (10:59 +0100)]
smbdotconf: mark "message command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "log nt token command" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 09:52:56 +0000 (10:52 +0100)]
smbdotconf: mark "log nt token command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "log level" with substitution="1"
Ralph Boehme [Tue, 5 Nov 2019 09:50:32 +0000 (10:50 +0100)]
smbdotconf: mark "log level" with substitution="1"

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "iprint server" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:52:37 +0000 (17:52 +0100)]
smbdotconf: mark "iprint server" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "homedir map" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:50:59 +0000 (17:50 +0100)]
smbdotconf: mark "homedir map" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:lib: add missing TALLOC_CTX parameter in call to lp_homedir_map()
Ralph Boehme [Mon, 4 Nov 2019 16:49:47 +0000 (17:49 +0100)]
s3:lib: add missing TALLOC_CTX parameter in call to lp_homedir_map()

This seems to be dead (at least dying) code,
is WITH_NISPLUS_HOME ever defined?

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "get quota command" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:43:45 +0000 (17:43 +0100)]
smbdotconf: mark "get quota command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "enumports command" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:42:38 +0000 (17:42 +0100)]
smbdotconf: mark "enumports command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "delete user script" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:35:22 +0000 (17:35 +0100)]
smbdotconf: mark "delete user script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "delete user from group script" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:31:57 +0000 (17:31 +0100)]
smbdotconf: mark "delete user from group script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "delete share command" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:30:37 +0000 (17:30 +0100)]
smbdotconf: mark "delete share command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "deleteprinter command" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:26:29 +0000 (17:26 +0100)]
smbdotconf: mark "deleteprinter command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "delete group script" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:25:09 +0000 (17:25 +0100)]
smbdotconf: mark "delete group script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "defaultservice" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:21:34 +0000 (17:21 +0100)]
smbdotconf: mark "defaultservice" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "cups server" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 16:19:58 +0000 (17:19 +0100)]
smbdotconf: mark "cups server" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "next configfile" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 15:50:41 +0000 (16:50 +0100)]
smbdotconf: mark "next configfile" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "check password script" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 14:27:43 +0000 (15:27 +0100)]
smbdotconf: mark "check password script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "change share command" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 14:24:16 +0000 (15:24 +0100)]
smbdotconf: mark "change share command" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "auto services" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 14:11:04 +0000 (15:11 +0100)]
smbdotconf: mark "auto services" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:param: let lp_add_auto_services() take a const char *
Ralph Boehme [Mon, 4 Nov 2019 14:10:28 +0000 (15:10 +0100)]
s3:param: let lp_add_auto_services() take a const char *

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "add user to group script" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 13:17:43 +0000 (14:17 +0100)]
smbdotconf: mark "add user to group script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "add user script" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 13:12:08 +0000 (14:12 +0100)]
smbdotconf: mark "add user script" with substitution="1"

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