bbaumbach/samba-autobuild/.git
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>
4 years agosmbdotconf: mark "add share command" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 12:58:28 +0000 (13:58 +0100)]
smbdotconf: mark "add share command" with substitution="1"

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

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

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "abort shutdown script" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 15:56:47 +0000 (16:56 +0100)]
smbdotconf: mark "abort shutdown script" with substitution="1"

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "veto oplock files" with substitution="1"
Ralph Boehme [Mon, 4 Nov 2019 11:30:58 +0000 (12:30 +0100)]
smbdotconf: mark "veto oplock files" with substitution="1"

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

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

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

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

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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "path" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 18:14:02 +0000 (19:14 +0100)]
smbdotconf: mark "path" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "msdfs proxy" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 17:56:10 +0000 (18:56 +0100)]
smbdotconf: mark "msdfs proxy" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "magic script" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 17:49:07 +0000 (18:49 +0100)]
smbdotconf: mark "magic script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "magic output" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 17:47:43 +0000 (18:47 +0100)]
smbdotconf: mark "magic output" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "hide files" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 17:44:25 +0000 (18:44 +0100)]
smbdotconf: mark "hide files" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "force user" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 17:40:53 +0000 (18:40 +0100)]
smbdotconf: mark "force user" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "force group" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 16:56:56 +0000 (17:56 +0100)]
smbdotconf: mark "force group" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "dont descend" with substitution="1"
Ralph Boehme [Thu, 31 Oct 2019 16:51:06 +0000 (17:51 +0100)]
smbdotconf: mark "dont descend" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agosmbdotconf: mark "cups options" with substitution="1"
Stefan Metzmacher [Tue, 15 Oct 2019 14:54:45 +0000 (16:54 +0200)]
smbdotconf: mark "cups options" with substitution="1"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosmbdotconf: mark "dfree command" with substitution="1"
Stefan Metzmacher [Tue, 15 Oct 2019 14:54:45 +0000 (16:54 +0200)]
smbdotconf: mark "dfree command" with substitution="1"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosmbdotconf: mark "comment" with substitution="1"
Stefan Metzmacher [Tue, 15 Oct 2019 14:54:45 +0000 (16:54 +0200)]
smbdotconf: mark "comment" with substitution="1"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agosmbdotconf: mark "aio write behind" with substitution="1"
Stefan Metzmacher [Tue, 15 Oct 2019 14:54:45 +0000 (16:54 +0200)]
smbdotconf: mark "aio write behind" with substitution="1"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoparam: add FN_{GLOBAL,LOCAL}_SUBSTITUTED_STRING support
Stefan Metzmacher [Tue, 15 Oct 2019 14:52:30 +0000 (16:52 +0200)]
param: add FN_{GLOBAL,LOCAL}_SUBSTITUTED_STRING support

Pair-Programmed-With: Ralph Boehme <slow@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
4 years agos3:parm: remove unused lp_parm_talloc_string()
Stefan Metzmacher [Tue, 15 Oct 2019 12:05:24 +0000 (14:05 +0200)]
s3:parm: remove unused lp_parm_talloc_string()

Callers should use lp_parm_substituted_string()
directly or just use lp_parm_const_string().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:vfs_glusterfs: make use of lp_parm_substituted_string()
Stefan Metzmacher [Tue, 15 Oct 2019 12:04:27 +0000 (14:04 +0200)]
s3:vfs_glusterfs: make use of lp_parm_substituted_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:vfs_nfs4acl_xattr: make use of lp_parm_substituted_string()
Stefan Metzmacher [Tue, 15 Oct 2019 12:00:29 +0000 (14:00 +0200)]
s3:vfs_nfs4acl_xattr: make use of lp_parm_substituted_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:vfs_streams_depot: make use of lp_parm_substituted_string()
Stefan Metzmacher [Tue, 15 Oct 2019 11:58:48 +0000 (13:58 +0200)]
s3:vfs_streams_depot: make use of lp_parm_substituted_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:vfs_tsmsm: make use of lp_parm_substituted_string()
Stefan Metzmacher [Tue, 15 Oct 2019 11:56:44 +0000 (13:56 +0200)]
s3:vfs_tsmsm: make use of lp_parm_substituted_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:mdssvc: make use of lp_parm_const_string()
Stefan Metzmacher [Tue, 15 Oct 2019 11:38:16 +0000 (13:38 +0200)]
s3:mdssvc: make use of lp_parm_const_string()

We don't need any substitution for elasticsearch options.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:param: split out lp_parm_substituted_string()
Stefan Metzmacher [Tue, 15 Oct 2019 10:29:08 +0000 (12:29 +0200)]
s3:param: split out lp_parm_substituted_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:param: split out loadparm_s3_global_substitution from lp_string()
Stefan Metzmacher [Tue, 15 Oct 2019 10:07:17 +0000 (12:07 +0200)]
s3:param: split out loadparm_s3_global_substitution from lp_string()

The idea is to get rid of the global state that's
currently used for the substitution in lp_string().

In the end all callers need to pass an explicit
const struct loadparm_substitution *sub_ctx,
which contains all relevant information
for the substitution. At that point lp_string() can be removed.

For now we provide loadparm_s3_global_substitution()
for callers to keep the current bahavior unchanged.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agolib/param: introduce loadparm_substitution infrastructure
Ralph Boehme [Wed, 6 Nov 2019 15:25:00 +0000 (16:25 +0100)]
lib/param: introduce loadparm_substitution infrastructure

Pair-Programmed-With: Ralph Boehme <slow@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
4 years agos3:param: rename lp_string() argument ctx to mem_ctx
Ralph Boehme [Thu, 31 Oct 2019 14:12:35 +0000 (15:12 +0100)]
s3:param: rename lp_string() argument ctx to mem_ctx

Minimizes diff of subsequent patch.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:lib: remove unused str_list_substitute()
Stefan Metzmacher [Tue, 15 Oct 2019 08:15:41 +0000 (10:15 +0200)]
s3:lib: remove unused str_list_substitute()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:lib: remove unused str_list_sub_basic()
Stefan Metzmacher [Tue, 15 Oct 2019 08:15:14 +0000 (10:15 +0200)]
s3:lib: remove unused str_list_sub_basic()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agonet: Delete share ACL from 'net conf delshare'
Christof Schmitt [Wed, 20 Nov 2019 18:39:20 +0000 (11:39 -0700)]
net: Delete share ACL from 'net conf delshare'

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 26 22:55:38 UTC 2019 on sn-devel-184

4 years agoselftest: Add test for 'net conf delshare' also removing share ACL
Christof Schmitt [Tue, 26 Nov 2019 16:59:15 +0000 (09:59 -0700)]
selftest: Add test for 'net conf delshare' also removing share ACL

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoselftest: Make net command available in sharesec test
Christof Schmitt [Tue, 26 Nov 2019 16:58:32 +0000 (09:58 -0700)]
selftest: Make net command available in sharesec test

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosharesec: Return NTSTATUS from delete_share_security
Christof Schmitt [Wed, 18 Sep 2019 20:37:32 +0000 (13:37 -0700)]
sharesec: Return NTSTATUS from delete_share_security

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosharesec: Return NTSTATUS from set_share_security
Christof Schmitt [Wed, 18 Sep 2019 20:20:35 +0000 (13:20 -0700)]
sharesec: Return NTSTATUS from set_share_security

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosharesec: Return NTSTATUS from share_info_db_init
Christof Schmitt [Tue, 17 Sep 2019 19:11:59 +0000 (12:11 -0700)]
sharesec: Return NTSTATUS from share_info_db_init

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agog_lock: Speed up sync g_lock_lock()
Volker Lendecke [Fri, 22 Nov 2019 11:02:22 +0000 (12:02 +0100)]
g_lock: Speed up sync g_lock_lock()

The comment "this is used in very hot code paths" is not true right now, but
will get true soon....

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agog_lock: Move a variable inside the block were it's used
Volker Lendecke [Fri, 22 Nov 2019 10:56:55 +0000 (11:56 +0100)]
g_lock: Move a variable inside the block were it's used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agog_lock: Factor out g_lock_cleanup_shared()
Volker Lendecke [Fri, 22 Nov 2019 10:55:52 +0000 (11:55 +0100)]
g_lock: Factor out g_lock_cleanup_shared()

This function will find a second user soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:winbind: Also set the cmd name for bool dispatch table
Guenther Deschner [Tue, 26 Nov 2019 12:10:47 +0000 (13:10 +0100)]
s3:winbind: Also set the cmd name for bool dispatch table

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov 26 14:14:51 UTC 2019 on sn-devel-184

4 years agos3:winbind: Print priv pipe location
Andreas Schneider [Tue, 26 Nov 2019 11:45:24 +0000 (12:45 +0100)]
s3:winbind: Print priv pipe location

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agogitignore: Add .build.log
Andreas Schneider [Tue, 26 Nov 2019 12:32:53 +0000 (13:32 +0100)]
gitignore: Add .build.log

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agotorture: Test g_lock deadlock detection
Volker Lendecke [Wed, 20 Nov 2019 15:03:37 +0000 (16:03 +0100)]
torture: Test g_lock deadlock detection

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 23 01:25:12 UTC 2019 on sn-devel-184

4 years agolib: Change the g_lock data model
Volker Lendecke [Tue, 19 Nov 2019 16:29:18 +0000 (17:29 +0100)]
lib: Change the g_lock data model

Now we have one fixed field for the exclusive lock holder and an array
of shared locks. This way we now prioritize writers over readers: If a
pending write comes in while readers are active, it will put itself
into the exclusive slot. Then it waits for the readers to vanish. Only
when all readers are gone the exclusive lock request is granted. New
readers will just look at the exclusive slot and see it's taken. They
will then line up as watchers, retrying whenever things change.

This also means that it will be cheaper to support many shared locks:
Granting a shared lock just means to extend the array. We don't have
to walk the array for possible conflicts.

This also adds explicit UPGRADE and DOWNGRADE operations for better
error checking.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Add g_lock_ctx_init_backend()
Volker Lendecke [Tue, 5 Nov 2019 15:36:44 +0000 (16:36 +0100)]
lib: Add g_lock_ctx_init_backend()

This will allow using the g_lock.c logic on other databases as well

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture: g_lock will allow duplicate READ locks soon
Volker Lendecke [Mon, 28 Oct 2019 12:50:09 +0000 (13:50 +0100)]
torture: g_lock will allow duplicate READ locks soon

In the future, g_lock will not check for duplicate READ locks anymore,
as there might be many of them and the check might be expensive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Make struct g_lock_rec private to g_lock.c
Volker Lendecke [Tue, 19 Nov 2019 14:31:57 +0000 (15:31 +0100)]
lib: Make struct g_lock_rec private to g_lock.c

This is no longer exposed in the API

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agog_lock: Change prototype of g_lock_dump
Volker Lendecke [Fri, 25 Oct 2019 11:35:39 +0000 (13:35 +0200)]
g_lock: Change prototype of g_lock_dump

Soon the g_lock database format will change. There will be one
exclusive entry and an array of shared entries. In that format,
there's no need to attach a lock_type to each entry in the g_lock
database. Reflect this change in the g_lock_dump API

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Remove share_mode_data->record
Volker Lendecke [Mon, 4 Nov 2019 12:13:02 +0000 (13:13 +0100)]
smbd: Remove share_mode_data->record

In the future, there won't be a record anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Pass the db_record down to share_mode_data_store()
Volker Lendecke [Mon, 4 Nov 2019 12:10:54 +0000 (13:10 +0100)]
smbd: Pass the db_record down to share_mode_data_store()

Remove a dependency on share_mode_data->record

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use share_mode_watch_send()
Volker Lendecke [Mon, 4 Nov 2019 12:06:20 +0000 (13:06 +0100)]
smbd: Use share_mode_watch_send()

This removes some dependencies on share_mode_data->record

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Add share_mode_watch_send/recv
Volker Lendecke [Mon, 4 Nov 2019 11:57:35 +0000 (12:57 +0100)]
smbd: Add share_mode_watch_send/recv

For now this is a simple wrapper around dbwrap_watched_watch_send()
that will make the direct db_record reference in struct
share_mode_data unnecessary.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_watch: Don't store in-RAM caches
Volker Lendecke [Mon, 18 Nov 2019 20:46:55 +0000 (21:46 +0100)]
dbwrap_watch: Don't store in-RAM caches

The history of this file is a mess with lots of bugs. Most of the bugs
I believe are based on the cache of database contents we maintain in
struct dbwrap_watch_rec. This patch removes that cache and does all
modifications directly in the backend database.

This means we have to mess with the database format in a few more
places, but I think the format is simple enough that this does not
really hurt.

I tried for a few days to split this up into small pieces that are
easier to understand, but every time I separated out individual chunks
I found difficult to track down bugs that are all resolved in the
final code presented here. It's more lines of code, but I hope it's more
robust.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_watch: Simplify struct dbwrap_watched_watch_state
Volker Lendecke [Mon, 18 Nov 2019 12:43:13 +0000 (13:43 +0100)]
dbwrap_watch: Simplify struct dbwrap_watched_watch_state

With the wakeup messages changed, we don't need to store what used to
be the old message in the struct dbwrap_watched_watch_state
anymore. We still need to store the key that is watched for removal of
our watch entry in the request destructor

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_watch: Simplify the wakeup messages
Volker Lendecke [Mon, 18 Nov 2019 12:36:58 +0000 (13:36 +0100)]
dbwrap_watch: Simplify the wakeup messages

The instance ID per process globally identifies a watch instance
across databases. It's not necessary to send the database ID and the
watched key across, the uin64_t instance ID is sufficient.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_watch: Add a uin64_t instance to watchers
Volker Lendecke [Mon, 18 Nov 2019 12:23:52 +0000 (13:23 +0100)]
dbwrap_watch: Add a uin64_t instance to watchers

Initially used for debugging purposes only

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_watch: Encapsulate watchers in "struct dbwrap_watcher"
Volker Lendecke [Mon, 18 Nov 2019 11:37:21 +0000 (12:37 +0100)]
dbwrap_watch: Encapsulate watchers in "struct dbwrap_watcher"

Next patch will extend this structure

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap_watch: Prevent two watchers per fetch_locked sequence
Volker Lendecke [Sun, 17 Nov 2019 15:45:45 +0000 (16:45 +0100)]
dbwrap_watch: Prevent two watchers per fetch_locked sequence

This can lead to very confusing bugs, and the code right now does not
deal with it well.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture3: Test the next patch: No two waiters in one do_locked()
Volker Lendecke [Sat, 16 Nov 2019 12:20:14 +0000 (13:20 +0100)]
torture3: Test the next patch: No two waiters in one do_locked()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture3: Consolidate dbwrap_watch test initialization
Volker Lendecke [Sat, 16 Nov 2019 11:41:13 +0000 (12:41 +0100)]
torture3: Consolidate dbwrap_watch test initialization

More lines, but less error-prone copy&paste

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap: Don't set rec->value in dbwrap_do_locked()
Volker Lendecke [Wed, 23 Oct 2019 10:19:38 +0000 (12:19 +0200)]
dbwrap: Don't set rec->value in dbwrap_do_locked()

We pass that via the callback now

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolocking: Remove a call to dbwrap_record_get_value()
Volker Lendecke [Sun, 17 Nov 2019 13:50:51 +0000 (14:50 +0100)]
locking: Remove a call to dbwrap_record_get_value()

This makes a copy of the record values TDB_DATA.

In this case, it is okay: We only do a dbwrap_record_storev modifying
the value that we retrieved from the share_mode_lock destructor.

This patch is necessary because the next commit will make the "value"
argument to the dbwrap_do_locked() callback the only source of the
record value. Thus for a nested share_mode_do_locked() call we have to
maintain the record value explicitly.

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