gd/samba-autobuild/.git
4 years agos3:net: remove unused net_use_machine_account()
Stefan Metzmacher [Mon, 11 Nov 2019 12:35:16 +0000 (13:35 +0100)]
s3:net: remove unused net_use_machine_account()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:cli_pipe: remove unused 'use_kerberos' from cli_rpc_pipe_open_generic_auth()
Stefan Metzmacher [Mon, 11 Nov 2019 12:11:53 +0000 (13:11 +0100)]
s3:cli_pipe: remove unused 'use_kerberos' from cli_rpc_pipe_open_generic_auth()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoOID: Reserve 1.3.6.1.4.1.7165.777.x for use on the wiki
Andrew Bartlett [Tue, 26 May 2020 10:35:40 +0000 (22:35 +1200)]
OID: Reserve 1.3.6.1.4.1.7165.777.x for use on the wiki

This allows us to handle some OIDs more freely and use them in example schema
without patching the main git repo each time.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Wed May 27 22:17:10 UTC 2020 on sn-devel-184

4 years agolib/util: Allow gdb to be started by samba_start_debugger() under the default Ubuntu...
Andrew Bartlett [Sat, 23 May 2020 09:24:07 +0000 (21:24 +1200)]
lib/util: Allow gdb to be started by samba_start_debugger() under the default Ubuntu restrictions

Ubuntu (in particular) restricts ptrace by default for security reasons
but the processe to be traced can allow tracing by a child process
using prctl().  This matches what is done for panic action =

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
4 years agos3: VFS: cap. Fixup mistake using the wrong parameter to capencode.
Jeremy Allison [Tue, 26 May 2020 18:34:08 +0000 (11:34 -0700)]
s3: VFS: cap. Fixup mistake using the wrong parameter to capencode.

Caught by Coverity.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue May 26 21:35:55 UTC 2020 on sn-devel-184

4 years agolibgpo: Remove unused code
Stefan Metzmacher [Mon, 11 Nov 2019 14:56:32 +0000 (15:56 +0100)]
libgpo: Remove unused code

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue May 26 11:22:07 UTC 2020 on sn-devel-184

4 years agos3-net: disable net_ads_gpo_apply() and net_ads_gpo_refresh()
David Mulder [Fri, 12 Oct 2018 10:10:43 +0000 (04:10 -0600)]
s3-net: disable net_ads_gpo_apply() and net_ads_gpo_refresh()

These are now handled in samba-gpupdate, and the
net ads gpo refresh has not worked for some time.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Apply some const to parse_finfo_id_both_directory_info()
Volker Lendecke [Sat, 16 May 2020 15:33:38 +0000 (17:33 +0200)]
libsmb: Apply some const to parse_finfo_id_both_directory_info()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon May 25 09:36:15 UTC 2020 on sn-devel-184

4 years agolibsmb: Remove unused cli_errstr()
Volker Lendecke [Sat, 16 May 2020 15:01:04 +0000 (17:01 +0200)]
libsmb: Remove unused cli_errstr()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotorture3: Remove some ancient unused code
Volker Lendecke [Sat, 16 May 2020 15:00:35 +0000 (17:00 +0200)]
torture3: Remove some ancient unused code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Move a variable declaration closer to its use
Volker Lendecke [Mon, 20 Apr 2020 07:57:31 +0000 (09:57 +0200)]
libsmb: Move a variable declaration closer to its use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Remove some lines that were never used
Volker Lendecke [Sun, 19 Apr 2020 12:40:56 +0000 (14:40 +0200)]
libsmb: Remove some lines that were never used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Avoid casts
Volker Lendecke [Sat, 22 Feb 2020 10:52:51 +0000 (11:52 +0100)]
libsmb: Avoid casts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Use IS[DOT]DOT
Volker Lendecke [Sat, 22 Feb 2020 10:48:45 +0000 (11:48 +0100)]
libsmb: Use IS[DOT]DOT

strequal is not necessary here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Remove a pointless ZERO_STRUCT()
Volker Lendecke [Sat, 22 Feb 2020 10:21:44 +0000 (11:21 +0100)]
libsmb: Remove a pointless ZERO_STRUCT()

"c" is a pointer that was initialized to NULL above

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Simplify callers of SMBC_dlist_contains()
Volker Lendecke [Fri, 21 Feb 2020 21:35:44 +0000 (22:35 +0100)]
libsmb: Simplify callers of SMBC_dlist_contains()

This function already does the NULL check on the file pointer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Make SMBC_dlist_contains return bool
Volker Lendecke [Fri, 21 Feb 2020 21:13:49 +0000 (22:13 +0100)]
libsmb: Make SMBC_dlist_contains return bool

It returned True/False, and is used as boolean only. Modernize
formatting a bit.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agolibsmb: Align calls to SMBC_dlist_contains()
Volker Lendecke [Fri, 21 Feb 2020 21:31:06 +0000 (22:31 +0100)]
libsmb: Align calls to SMBC_dlist_contains()

Everywhere else it's called as !SMBC_dlist_contains()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agobuild: add configure option to control vfs_snapper build
Matt Taylor [Mon, 11 May 2020 19:26:41 +0000 (15:26 -0400)]
build: add configure option to control vfs_snapper build

vfs_snapper is currently built if dbus development headers / libraries
are detected during configure. This commit adds new --disable-snapper
and --enable-snapper (default) configure parameters. When enabled,
configure will fail if the dbus development headers / libraries are
missing.

Signed-off-by: Matt Taylor <liverbugg@rinux.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 25 01:16:46 UTC 2020 on sn-devel-184

4 years agobuild: quota wscript error message spelling fix
Matt Taylor [Tue, 12 May 2020 13:07:14 +0000 (15:07 +0200)]
build: quota wscript error message spelling fix

Signed-off-by: Matt Taylor <liverbugg@rinux.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Avoid casts calling to find_policy_by_hnd()
Samuel Cabrero [Mon, 18 May 2020 10:04:33 +0000 (12:04 +0200)]
s3: rpc_server: Avoid casts calling to find_policy_by_hnd()

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Remove dead code
Samuel Cabrero [Mon, 4 Nov 2019 18:01:28 +0000 (19:01 +0100)]
s3: rpc_server: Remove dead code

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Drop s3 rpc handles implementation
Samuel Cabrero [Mon, 4 Nov 2019 17:38:14 +0000 (18:38 +0100)]
s3: rpc_server: Drop s3 rpc handles implementation

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl: Set dce_call in pipes_struct before dispatching call
Samuel Cabrero [Tue, 29 Oct 2019 11:36:30 +0000 (12:36 +0100)]
pidl: Set dce_call in pipes_struct before dispatching call

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Remove SAMR specific policy_handle_find() function
Samuel Cabrero [Thu, 7 May 2020 12:24:56 +0000 (14:24 +0200)]
s3: rpc_server: Remove SAMR specific policy_handle_find() function

The generic function already checks the handle type.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Move SAMR handle based access check to a wrapper function
Samuel Cabrero [Thu, 14 May 2020 16:35:28 +0000 (18:35 +0200)]
s3: rpc_server: Move SAMR handle based access check to a wrapper function

Now that the type associated to the handle is the same for all handle
types we can wrap the access check.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Remove SAMR specific policy_handle_create() function
Samuel Cabrero [Thu, 7 May 2020 11:29:29 +0000 (13:29 +0200)]
s3: rpc_server: Remove SAMR specific policy_handle_create() function

Now that we pass the handle type to the generic handle creation and find
functions we can drop the specific SAMR ones.

The policy_handle_create() function labeled the talloc chunk used to
allocate the handle's associated data, and the policy_handle_find() is
checking the name matches with the expected data. The check is performed
now by the generic functions based on the handle type so we can drop
these SAMR specific functions.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: pass DCE/RPC handle type to find_policy_handle
Samuel Cabrero [Wed, 6 May 2020 11:56:46 +0000 (13:56 +0200)]
s3: rpc_server: pass DCE/RPC handle type to find_policy_handle

Following changes in commit c7a4578d06427a82ead287f0c5248c1a54cc9336
pass the handle type to the handle search functions. The handle type will
be verified unless passing DCESRV_HANDLE_ANY to find functions.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3: rpc_server: Strip out access check field from s3 handles implementation
Samuel Cabrero [Tue, 29 Oct 2019 11:39:10 +0000 (12:39 +0100)]
s3: rpc_server: Strip out access check field from s3 handles implementation

The handle based security model is a SAMR specific feature. The access
granted is stored in the handle's associated data after creating it and
the access is verified after searching the handle.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolibrpc: core: Move the s4 handles implementation to the RPC server core
Samuel Cabrero [Tue, 29 Oct 2019 10:04:43 +0000 (11:04 +0100)]
librpc: core: Move the s4 handles implementation to the RPC server core

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: Add test for handle types
Samuel Cabrero [Fri, 8 May 2020 10:40:55 +0000 (12:40 +0200)]
selftest: Add test for handle types

The test is written for SAMR, but as the handle type is verified by the
server core library it also applies to other RPC services.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoldb: also use portable __has_attribute macro to check for attribute support
Björn Jacke [Sun, 24 May 2020 12:04:37 +0000 (14:04 +0200)]
ldb: also use portable __has_attribute macro to check for attribute support

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotalloc: also use portable __has_attribute macro to check for attribute support
Björn Jacke [Sun, 24 May 2020 11:56:22 +0000 (13:56 +0200)]
talloc: also use portable __has_attribute macro to check for attribute support

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotdb: also use __has_attribute macro to check for attribute support
Björn Jacke [Sun, 24 May 2020 11:55:02 +0000 (13:55 +0200)]
tdb: also use __has_attribute macro to check for attribute support

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoreplace, attr.: use function attributes only if supported by feature macro (or old...
Björn Jacke [Sun, 24 May 2020 11:57:46 +0000 (13:57 +0200)]
replace, attr.: use function attributes only if supported by feature macro (or old gcc)

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agogitlab-ci: Create a single samba-fips runner
Andreas Schneider [Tue, 19 May 2020 05:21:25 +0000 (07:21 +0200)]
gitlab-ci: Create a single samba-fips runner

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoctdb-tests: Add a new fetch ring test that also checks hot keys
Martin Schwenke [Mon, 4 May 2020 07:15:19 +0000 (17:15 +1000)]
ctdb-tests: Add a new fetch ring test that also checks hot keys

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri May 22 08:05:54 UTC 2020 on sn-devel-184

4 years agoctdb-tests: Update fetch_ring to take database and key on command line
Martin Schwenke [Mon, 4 May 2020 06:58:38 +0000 (16:58 +1000)]
ctdb-tests: Update fetch_ring to take database and key on command line

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Fix sorting of hot keys
Martin Schwenke [Thu, 23 Apr 2020 08:59:47 +0000 (18:59 +1000)]
ctdb-daemon: Fix sorting of hot keys

The current code only ever swaps with slot 0.  This will only ever
happen with slots 0 and 1, so probably never sorts.

Replace with qsort().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Add extra logging of hot keys
Martin Schwenke [Fri, 1 May 2020 06:44:22 +0000 (16:44 +1000)]
ctdb-daemon: Add extra logging of hot keys

ctdbd currently only logs when a new hot key is added.  If a key gets
hotter then nothing new is logged.

Log hot key updates when the number of migrations has doubled since
the last time that key was logged.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Update hot key logging
Martin Schwenke [Fri, 1 May 2020 06:24:27 +0000 (16:24 +1000)]
ctdb-daemon: Update hot key logging

This message indicates that a hot key was added, so say that.  After
all the hot key slots have been filled the id will always be 0, so
don't bother logging it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Fix bug in slot 0 comparison optimisation
Martin Schwenke [Thu, 14 May 2020 10:25:22 +0000 (20:25 +1000)]
ctdb-daemon: Fix bug in slot 0 comparison optimisation

This is only valid if all slots are in use.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Switch some variables to unsigned
Martin Schwenke [Thu, 23 Apr 2020 08:59:24 +0000 (18:59 +1000)]
ctdb-daemon: Switch some variables to unsigned

These should be unsigned but luck is currently on our side.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Add separate hot keys array for database statistics
Martin Schwenke [Thu, 23 Apr 2020 08:51:40 +0000 (18:51 +1000)]
ctdb-daemon: Add separate hot keys array for database statistics

There are 2 reasons for this.  Sorting of hot keys is broken and will
be changed to an implementation that needs a named (i.e. not
anonymous) structure.  Also, at least one non-protocol field will be
added to facilitate more useful logging.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-build: Fix a typo
Martin Schwenke [Thu, 21 May 2020 10:19:17 +0000 (20:19 +1000)]
ctdb-build: Fix a typo

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agosmbd: prepare DH disconnect for AT-names
Ralph Boehme [Sun, 17 May 2020 06:05:47 +0000 (08:05 +0200)]
smbd: prepare DH disconnect for AT-names

This ensure cookie.base_name is set to the full path to deal with fsp->fsp_name
being an atname in the future.

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 May 21 22:01:25 UTC 2020 on sn-devel-184

4 years agosmbd: prepare fsp_str_dbg() for atnames
Ralph Boehme [Sun, 17 May 2020 05:53:42 +0000 (07:53 +0200)]
smbd: prepare fsp_str_dbg() for atnames

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: use fd_openat()
Ralph Boehme [Fri, 8 May 2020 14:32:56 +0000 (16:32 +0200)]
smbd: use fd_openat()

This leaves basically two callers of fd_open():

* open_internal_dirfsp_at()
* smbd_smb2_query_directory_send()

Those will be the only codepaths that use full paths relative to the share root
and so require and use the symlink race protection provided by
non_widelink_open().

Of course, until we actuall start passing real dirfsps to fd_openat(),
fd_openat() internally calls fd_open().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: add fd_openat()
Ralph Boehme [Thu, 14 May 2020 19:20:22 +0000 (21:20 +0200)]
smbd: add fd_openat()

Until we actually start passing real dirfsps to fd_openat(), fd_openat()
internally calls fd_open().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: remove SMB_VFS_OPEN()
Ralph Boehme [Wed, 20 May 2020 21:26:14 +0000 (23:26 +0200)]
vfs: remove SMB_VFS_OPEN()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/torture: use SMB_VFS_OPENAT() in cmd_set_nt_acl()
Ralph Boehme [Tue, 19 May 2020 19:35:56 +0000 (21:35 +0200)]
s3/torture: use SMB_VFS_OPENAT() in cmd_set_nt_acl()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/torture: use SMB_VFS_OPENAT() in cmd_open()
Ralph Boehme [Tue, 19 May 2020 19:34:26 +0000 (21:34 +0200)]
s3/torture: use SMB_VFS_OPENAT() in cmd_open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/pysmbd: use SMB_VFS_OPENAT() in init_files_struct()
Ralph Boehme [Tue, 19 May 2020 19:33:00 +0000 (21:33 +0200)]
s3/pysmbd: use SMB_VFS_OPENAT() in init_files_struct()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: use SMB_VFS_OPENAT() in non_widelink_open()
Ralph Boehme [Tue, 19 May 2020 19:30:24 +0000 (21:30 +0200)]
smbd: use SMB_VFS_OPENAT() in non_widelink_open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_shadow_copy2: use SMB_VFS_NEXT_OPENAT() in shadow_copy2_get_shadow_copy_data()
Ralph Boehme [Wed, 20 May 2020 20:48:36 +0000 (22:48 +0200)]
vfs_shadow_copy2: use SMB_VFS_NEXT_OPENAT() in shadow_copy2_get_shadow_copy_data()

These are paths not under user control, so it should be safe to call it with
AT_FDCWD and multi-component paths.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: VFS: fruit. Now we've gotten rid of SMB_VFS_OPEN(), add const to the functions...
Jeremy Allison [Thu, 21 May 2020 18:56:14 +0000 (11:56 -0700)]
s3: VFS: fruit. Now we've gotten rid of SMB_VFS_OPEN(), add const to the functions called by fruit_openat().

Remove the hack that allowed openat() to call non-const functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agovfs_fruit: use SMB_VFS_NEXT_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:05:07 +0000 (23:05 +0200)]
vfs_fruit: use SMB_VFS_NEXT_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_xattr_tdb: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:32:57 +0000 (22:32 +0200)]
vfs_xattr_tdb: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_virusfilter: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:31:04 +0000 (22:31 +0200)]
vfs_virusfilter: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_unityed_media: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:24:37 +0000 (22:24 +0200)]
vfs_unityed_media: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_syncops: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:22:26 +0000 (22:22 +0200)]
vfs_syncops: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_streams_xattr: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:18:54 +0000 (22:18 +0200)]
vfs_streams_xattr: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_streams_depot: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:07:20 +0000 (23:07 +0200)]
vfs_streams_depot: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_snapper: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:02:48 +0000 (22:02 +0200)]
vfs_snapper: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_preopen: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 19:51:00 +0000 (21:51 +0200)]
vfs_preopen: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_prealloc: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 19:46:41 +0000 (21:46 +0200)]
vfs_prealloc: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_media_harmony: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 19:43:26 +0000 (21:43 +0200)]
vfs_media_harmony: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_gpfs: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 19:34:35 +0000 (21:34 +0200)]
vfs_gpfs: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_glusterfs: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 19:32:30 +0000 (21:32 +0200)]
vfs_glusterfs: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_fruit: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:04:26 +0000 (23:04 +0200)]
vfs_fruit: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_widelinks: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:03:30 +0000 (23:03 +0200)]
vfs_widelinks: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_time_audit: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:03:18 +0000 (23:03 +0200)]
vfs_time_audit: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_shadow_copy2: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:03:05 +0000 (23:03 +0200)]
vfs_shadow_copy2: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_full_audit: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:02:39 +0000 (23:02 +0200)]
vfs_full_audit: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_extd_audit: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:02:20 +0000 (23:02 +0200)]
vfs_extd_audit: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_error_inject: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:02:06 +0000 (23:02 +0200)]
vfs_error_inject: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_default: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:01:54 +0000 (23:01 +0200)]
vfs_default: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_commit: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:01:16 +0000 (23:01 +0200)]
vfs_commit: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_ceph_snapshots: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:01:04 +0000 (23:01 +0200)]
vfs_ceph_snapshots: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_ceph: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 21:00:52 +0000 (23:00 +0200)]
vfs_ceph: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_catia: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:59:05 +0000 (22:59 +0200)]
vfs_catia: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: VFS: catia: Change saved_errno to catia_saved_errno in a macro.
Jeremy Allison [Thu, 21 May 2020 18:03:14 +0000 (11:03 -0700)]
s3: VFS: catia: Change saved_errno to catia_saved_errno in a macro.

This is a common variable name.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agovfs_cap: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:58:56 +0000 (22:58 +0200)]
vfs_cap: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_audit: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:58:47 +0000 (22:58 +0200)]
vfs_audit: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_aio_pthread: implement SMB_VFS_OPENAT()
Ralph Boehme [Wed, 20 May 2020 20:58:29 +0000 (22:58 +0200)]
vfs_aio_pthread: implement SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_aio_pthread: add dirfsp arg to create_private_open_data()
Ralph Boehme [Wed, 20 May 2020 14:47:05 +0000 (16:47 +0200)]
vfs_aio_pthread: add dirfsp arg to create_private_open_data()

Prepares for an upcoming aio_pthread_openat_fn(). open_async() passes fspcwd.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_aio_pthread: realign create_private_open_data() args
Ralph Boehme [Wed, 20 May 2020 14:44:15 +0000 (16:44 +0200)]
vfs_aio_pthread: realign create_private_open_data() args

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_aio_pthread: realign create_private_open_data args
Ralph Boehme [Wed, 20 May 2020 14:43:11 +0000 (16:43 +0200)]
vfs_aio_pthread: realign create_private_open_data args

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: add SMB_VFS_OPENAT()
Ralph Boehme [Fri, 15 May 2020 14:29:44 +0000 (16:29 +0200)]
vfs: add SMB_VFS_OPENAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_fruit: pass down cwdfsp as dirfsp in fruit_open()
Ralph Boehme [Wed, 20 May 2020 15:51:23 +0000 (17:51 +0200)]
vfs_fruit: pass down cwdfsp as dirfsp in fruit_open()

Not yet used, that comes when we add fruit_openat(). Passing cwdfsp as dirfsp
ensures when calling openat() we get the same behaviour as open().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/vfs: add vfs_at_fspcwd()
Ralph Boehme [Wed, 20 May 2020 15:01:48 +0000 (17:01 +0200)]
s3/vfs: add vfs_at_fspcwd()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove redundant conn arg from non_widelink_open()
Ralph Boehme [Fri, 8 May 2020 13:46:02 +0000 (15:46 +0200)]
smbd: remove redundant conn arg from non_widelink_open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu May 21 06:43:04 UTC 2020 on sn-devel-184

4 years agosmbd: realign non_widelink_open() args
Ralph Boehme [Fri, 8 May 2020 13:45:11 +0000 (15:45 +0200)]
smbd: realign non_widelink_open() args

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove redundant conn arg from fd_open()
Ralph Boehme [Fri, 10 Apr 2020 14:58:16 +0000 (16:58 +0200)]
smbd: remove redundant conn arg from fd_open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove redundant conn arg from fd_open_atomic()
Ralph Boehme [Fri, 10 Apr 2020 14:54:53 +0000 (16:54 +0200)]
smbd: remove redundant conn arg from fd_open_atomic()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: realign fd_open_atomic() args
Ralph Boehme [Fri, 8 May 2020 13:24:04 +0000 (15:24 +0200)]
smbd: realign fd_open_atomic() args

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: realign args to fd_open_atomic() in open_file()
Ralph Boehme [Thu, 7 May 2020 18:52:18 +0000 (20:52 +0200)]
smbd: realign args to fd_open_atomic() in open_file()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: realign args to open_file() in open_file_ntcreate()
Ralph Boehme [Thu, 7 May 2020 18:46:06 +0000 (20:46 +0200)]
smbd: realign args to open_file() in open_file_ntcreate()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove redundant conn arg from open_file()
Ralph Boehme [Fri, 10 Apr 2020 14:52:07 +0000 (16:52 +0200)]
smbd: remove redundant conn arg from open_file()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: assert (fsp->dirfsp == conn->cwd_fsp) in open_file_ntcreate()
Ralph Boehme [Mon, 18 May 2020 10:24:30 +0000 (12:24 +0200)]
smbd: assert (fsp->dirfsp == conn->cwd_fsp) in open_file_ntcreate()

There's a bunch of stuff that needs updating to work with atnames.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>