1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

53814 Commits

Author SHA1 Message Date
Ralph Boehme
b98e1ad771 smbdotconf: mark "printername" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
e95e1c2d4f smbdotconf: mark "preexec" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
4f2ee224ce smbdotconf: mark "postexec" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
f7619ac22b smbdotconf: mark "path" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
95f0f22ca5 smbdotconf: mark "msdfs proxy" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
223c1f725a smbdotconf: mark "magic script" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
595685c165 smbdotconf: mark "magic output" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
8684352921 smbdotconf: mark "hide files" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
78593e2f00 smbdotconf: mark "force user" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
2cf62e85e5 smbdotconf: mark "force group" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Ralph Boehme
79cff6295d smbdotconf: mark "dont descend" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:33 +00:00
Stefan Metzmacher
7e918fad6e smbdotconf: mark "cups options" with substitution="1"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
7973c87344 smbdotconf: mark "dfree command" with substitution="1"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
8e86ac18e7 smbdotconf: mark "comment" with substitution="1"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
c23e3564fc smbdotconf: mark "aio write behind" with substitution="1"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
ef1f0e9ffe 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>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
3215d357e6 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>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
cea386de15 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>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
f6747ccc3b 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>
2019-11-27 10:25:32 +00:00
Stefan Metzmacher
48c7d777f2 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>
2019-11-27 10:25:31 +00:00
Stefan Metzmacher
5170fc2421 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>
2019-11-27 10:25:31 +00:00
Stefan Metzmacher
564049fbc9 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>
2019-11-27 10:25:31 +00:00
Stefan Metzmacher
236857b434 s3:param: split out lp_parm_substituted_string()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:31 +00:00
Stefan Metzmacher
063c4b25b1 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>
2019-11-27 10:25:31 +00:00
Ralph Boehme
c36dd59318 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>
2019-11-27 10:25:31 +00:00
Stefan Metzmacher
57fa96b476 s3:lib: remove unused str_list_substitute()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:31 +00:00
Stefan Metzmacher
848cd4c460 s3:lib: remove unused str_list_sub_basic()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-11-27 10:25:31 +00:00
Christof Schmitt
ff35160dc6 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
2019-11-26 22:55:38 +00:00
Christof Schmitt
9dddb28a17 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>
2019-11-26 21:28:31 +00:00
Christof Schmitt
cb907fbee8 selftest: Make net command available in sharesec test
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-26 21:28:31 +00:00
Christof Schmitt
6bf6e5364a sharesec: Return NTSTATUS from delete_share_security
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-26 21:28:31 +00:00
Christof Schmitt
1f304fc16c sharesec: Return NTSTATUS from set_share_security
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-26 21:28:31 +00:00
Christof Schmitt
6dfa5bb64f sharesec: Return NTSTATUS from share_info_db_init
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-26 21:28:31 +00:00
Volker Lendecke
39f21a58b0 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>
2019-11-26 21:28:30 +00:00
Volker Lendecke
ba852a3d92 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>
2019-11-26 21:28:30 +00:00
Volker Lendecke
f849d8c0cf 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>
2019-11-26 21:28:30 +00:00
Guenther Deschner
0385496087 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
2019-11-26 14:14:51 +00:00
Andreas Schneider
97d43cf698 s3:winbind: Print priv pipe location
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2019-11-26 12:49:41 +00:00
Volker Lendecke
9aa03be946 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
2019-11-23 01:25:12 +00:00
Volker Lendecke
d734547488 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>
2019-11-22 23:57:48 +00:00
Volker Lendecke
effad89f62 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>
2019-11-22 23:57:48 +00:00
Volker Lendecke
859148479b 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>
2019-11-22 23:57:48 +00:00
Volker Lendecke
97ba1ee2f9 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>
2019-11-22 23:57:48 +00:00
Volker Lendecke
c9b34cd205 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>
2019-11-22 23:57:47 +00:00
Volker Lendecke
06b0bcdf8d 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>
2019-11-22 23:57:47 +00:00
Volker Lendecke
0a66c97354 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>
2019-11-22 23:57:47 +00:00
Volker Lendecke
24f56aefb4 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>
2019-11-22 23:57:47 +00:00
Volker Lendecke
2379dc29bc 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>
2019-11-22 23:57:47 +00:00
Volker Lendecke
341223a005 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>
2019-11-22 23:57:47 +00:00
Volker Lendecke
e5c28fec6f 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>
2019-11-22 23:57:47 +00:00