samba.git
4 years agos3: VFS: vfs_audit. Implement mkdirat().
Jeremy Allison [Wed, 4 Sep 2019 20:38:56 +0000 (13:38 -0700)]
s3: VFS: vfs_audit. Implement mkdirat().

Currently identical to mkdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: Add SMB_VFS_MKDIRAT().
Jeremy Allison [Wed, 4 Sep 2019 19:20:46 +0000 (12:20 -0700)]
s3: VFS: Add SMB_VFS_MKDIRAT().

Currently identical to SMB_VFS_MKDIR().

Next, add to all VFS modules that implement
mkdir and eventually remove mkdir.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: pysmbd: Ensure conn->cwd_fsp member of created connections is initialized.
Jeremy Allison [Fri, 6 Sep 2019 21:51:29 +0000 (14:51 -0700)]
s3: pysmbd: Ensure conn->cwd_fsp member of created connections is initialized.

This is needed to correctly call the XXXAT() vfs calls.

We should probably just use create_conn_struct_tos_cwd() here
and pass $cwd instead of using create_conn_struct_tos() and
passing "/" as the share root. We wouldn't change the current
working directory and the created share root would be set to $cwd
but I'm not sure what effects this may have on users of pysmbd
in case any of them pass paths above the $cwd to these functions.

Less changes to just call vfs_ChDir(conn, &cwd) which doesn't
change the current directory and leaves the share root as "/".

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: torture: vfstest: Change from create_conn_struct_tos() -> create_conn_struct_tos_...
Jeremy Allison [Fri, 6 Sep 2019 21:05:43 +0000 (14:05 -0700)]
s3: torture: vfstest: Change from create_conn_struct_tos() -> create_conn_struct_tos_cwd().

This does a vfs_ChDir() to the share root (not changing the
directory) which correctly sets up the conn->cwd_fsp member
so any XXXAT() calls correctly work inside vfstest.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: profile: Remove syscall_symlink entry now syscall is no longer used.
Jeremy Allison [Fri, 6 Sep 2019 23:02:00 +0000 (16:02 -0700)]
s3: smbd: profile: Remove syscall_symlink entry now syscall is no longer used.

Missed as part of the previous replacement of symlink -> symlinkat.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3:smbd: skip write-time fetching for directories.
Ralph Boehme [Mon, 2 Sep 2019 10:21:56 +0000 (12:21 +0200)]
s3:smbd: skip write-time fetching for directories.

The whole logic only applies to files.

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): Wed Sep 11 00:33:26 UTC 2019 on sn-devel-184

4 years agosmbd: Do boolean short-circuiting
Volker Lendecke [Mon, 9 Sep 2019 08:42:59 +0000 (10:42 +0200)]
smbd: Do boolean short-circuiting

&= does bitwise AND, and does not do boolean short-circuiting if the
variable is already 0. As has_other_nonposix_opens() might have its
cost, this speeds up closing a handle.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use dbwrap_do_locked() in fd_close_posix()
Volker Lendecke [Mon, 26 Aug 2019 14:22:23 +0000 (16:22 +0200)]
smbd: Use dbwrap_do_locked() in fd_close_posix()

We don't need to make a copy of the fd array

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use dbwrap_do_locked() in add_fd_to_close_entry()
Volker Lendecke [Fri, 23 Aug 2019 16:11:57 +0000 (18:11 +0200)]
smbd: Use dbwrap_do_locked() in add_fd_to_close_entry()

Less explicit talloc. Right now dbwrap_rbt behind the scenes does a
dbwrap_fetch_locked(), but that will eventually change.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodbwrap: Initialize state in dbwrap_delete()
Volker Lendecke [Fri, 23 Aug 2019 15:47:47 +0000 (17:47 +0200)]
dbwrap: Initialize state in dbwrap_delete()

Probably not required, but looks safer and gives static checkers less
reason to complain about potentially uninitialized variable reads

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Remove an obsolete comment
Volker Lendecke [Thu, 5 Sep 2019 15:25:07 +0000 (17:25 +0200)]
lib: Remove an obsolete comment

At least as of 2ac9d0afa66 ctdb does not care about db prios anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Fix DBG typo in find_delete_on_close_token()
Volker Lendecke [Tue, 3 Sep 2019 14:40:00 +0000 (16:40 +0200)]
smbd: Fix DBG typo in find_delete_on_close_token()

The routine isn't called find__delete_on_close_token. Also avoid
casts.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in close_remove_share_mode()
Volker Lendecke [Mon, 9 Sep 2019 14:34:10 +0000 (16:34 +0200)]
smbd: Use file_id_str_buf() in close_remove_share_mode()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in setup_poll_open()
Volker Lendecke [Mon, 9 Sep 2019 14:32:21 +0000 (16:32 +0200)]
smbd: Use file_id_str_buf() in setup_poll_open()

While there, remove a pointless empty line

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in defer_open()
Volker Lendecke [Mon, 9 Sep 2019 14:30:57 +0000 (16:30 +0200)]
smbd: Use file_id_str_buf() in defer_open()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbstatus: Use file_id_str_buf() in print_brl()
Volker Lendecke [Mon, 9 Sep 2019 14:28:57 +0000 (16:28 +0200)]
smbstatus: Use file_id_str_buf() in print_brl()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in set_sticky_write_time()
Volker Lendecke [Fri, 6 Sep 2019 05:31:22 +0000 (07:31 +0200)]
smbd: Use file_id_str_buf() in set_sticky_write_time()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in share_mode_str()
Volker Lendecke [Fri, 6 Sep 2019 05:29:10 +0000 (07:29 +0200)]
smbd: Use file_id_str_buf() in share_mode_str()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in brl_cleanup_disconnected()
Volker Lendecke [Tue, 3 Sep 2019 14:26:09 +0000 (16:26 +0200)]
smbd: Use file_id_str_buf() in brl_cleanup_disconnected()

Also avoid some casts and use DBG_ instead of DEBUG()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Use file_id_str_buf() in brl_get_locks()
Volker Lendecke [Tue, 3 Sep 2019 14:18:00 +0000 (16:18 +0200)]
smbd: Use file_id_str_buf() in brl_get_locks()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: Use file_id_str_buf() in xattr_tdb_setattr()
Volker Lendecke [Tue, 3 Sep 2019 14:15:40 +0000 (16:15 +0200)]
vfs: Use file_id_str_buf() in xattr_tdb_setattr()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: Use file_id_str_buf() in xattr_tdb_getattr()
Volker Lendecke [Tue, 3 Sep 2019 14:14:28 +0000 (16:14 +0200)]
vfs: Use file_id_str_buf() in xattr_tdb_getattr()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Use file_id_str_buf() in file_id_string()
Volker Lendecke [Tue, 3 Sep 2019 14:12:35 +0000 (16:12 +0200)]
lib: Use file_id_str_buf() in file_id_string()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Add file_id_str_buf()
Volker Lendecke [Mon, 2 Sep 2019 17:04:25 +0000 (19:04 +0200)]
lib: Add file_id_str_buf()

file_id_string() without talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Properly #ifdef __LIB_FILE_ID_H__
Volker Lendecke [Mon, 2 Sep 2019 17:04:42 +0000 (19:04 +0200)]
lib: Properly #ifdef __LIB_FILE_ID_H__

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: restore stat fields in vfs_stat_fsp()
Ralph Boehme [Mon, 9 Sep 2019 06:08:06 +0000 (08:08 +0200)]
vfs: restore stat fields in vfs_stat_fsp()

This ensures we preserve btime, itime and File-ID.

As the Durable Handles code calls vfs_stat_fsp() in the DH disconnect function,
previously the btime was lost and NOT stored in the cookie. With this change the
cookie will store the correct btime (and iflags), which requires us to call
dos_mode() in the reconnect function to ensure we pass
vfs_default_durable_reconnect_check_stat().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Sep 10 20:22:21 UTC 2019 on sn-devel-184

4 years agos3:vfs: streamline vfs_stat_fsp()
Ralph Boehme [Mon, 9 Sep 2019 06:03:53 +0000 (08:03 +0200)]
s3:vfs: streamline vfs_stat_fsp()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3: replace fsp_stat() with vfs_stat_fsp()
Ralph Boehme [Mon, 9 Sep 2019 05:57:34 +0000 (07:57 +0200)]
s3: replace fsp_stat() with vfs_stat_fsp()

Both functions do the same, they differ just in the type of the returned result.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:lib: add update_stat_ex_from_saved_stat()
Ralph Boehme [Fri, 30 Aug 2019 12:49:47 +0000 (14:49 +0200)]
s3:lib: add update_stat_ex_from_saved_stat()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agovfs_catia: stat info may have been updated, make sure to return changes
Ralph Boehme [Fri, 30 Aug 2019 12:48:57 +0000 (14:48 +0200)]
vfs_catia: stat info may have been updated, make sure to return changes

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:smbd: ensure to update the File-ID in struct smb_filename
Ralph Boehme [Fri, 30 Aug 2019 12:48:40 +0000 (14:48 +0200)]
s3:smbd: ensure to update the File-ID in struct smb_filename

Initialize the File-ID in fsp->fsp_name->st, any subsequent metadata fetch on
this file-handle needs this, eg QFID SMB2 Create-Context or GETINFO SMB
requests.

It would be nice if SMB_VFS_SET_DOS_ATTRIBUTE() would do this, unfortunately it
gets a const struct smb_filename.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:lib: round itime to NTTIME resolution in make_file_id_from_itime()
Ralph Boehme [Mon, 9 Sep 2019 09:12:08 +0000 (11:12 +0200)]
s3:lib: round itime to NTTIME resolution in make_file_id_from_itime()

The rounding is needed because when a file is created via eg an SMB2 CREATE
request, we need to calculate the correct File-ID for the QFID Create-Context or
for a subsequent GETINFO SMB request on the same file-handle.

Any later metadata request that received the File-ID will do so by going through
dos_mode() -> ... -> parse_dos_attribute_blob(), where the File-ID will be
calculated from the on-disk itime which has NTTIME resolution.

As long as that is the only available itime backend, I'm rounding itime inside
make_file_id_from_itime(), not in the callers.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib: add round_timespec_to_nttime()
Ralph Boehme [Tue, 3 Sep 2019 15:50:54 +0000 (17:50 +0200)]
lib: add round_timespec_to_nttime()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4:torture: add a file-id related test
Ralph Boehme [Fri, 30 Aug 2019 12:49:24 +0000 (14:49 +0200)]
s4:torture: add a file-id related test

Note I'm using the share vfs_fruit_xattr because I need a share with both a
streams and a acl_* VFS object.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4:torture/smb2: try to fix a RESOURCE_LEAK in smb2.samba3misc.localposixlock1
Stefan Metzmacher [Tue, 10 Sep 2019 10:37:52 +0000 (12:37 +0200)]
s4:torture/smb2: try to fix a RESOURCE_LEAK in smb2.samba3misc.localposixlock1

CID 1453656:    (RESOURCE_LEAK)
Handle variable "fd" going out of scope leaks the handle.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 10 18:56:45 UTC 2019 on sn-devel-184

4 years agolib/torture: protect torture_assert[_goto]() with a do { } while(0) block
Stefan Metzmacher [Tue, 10 Sep 2019 08:55:15 +0000 (10:55 +0200)]
lib/torture: protect torture_assert[_goto]() with a do { } while(0) block

This hopefully fixes a lot of coverity defects like:

Control flow issues  (DEADCODE)
Execution cannot reach this statement: ";".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4:torture: always add ';' after torture_assert()
Stefan Metzmacher [Tue, 10 Sep 2019 10:33:34 +0000 (12:33 +0200)]
s4:torture: always add ';' after torture_assert()

The next commit will require this.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoCreate SECURITY.md
Andrew Bartlett [Thu, 5 Sep 2019 03:48:53 +0000 (15:48 +1200)]
Create SECURITY.md

This file location is shown under "Security -> Policy" on GitHub
and helps ensure people with a need to report a security issue
find us the right way.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep  9 21:13:35 UTC 2019 on sn-devel-184

4 years agos3:selftest: add delay_inject:brl_lock_windows testing
Stefan Metzmacher [Tue, 20 Aug 2019 13:53:59 +0000 (15:53 +0200)]
s3:selftest: add delay_inject:brl_lock_windows testing

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

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): Mon Sep  9 15:42:45 UTC 2019 on sn-devel-184

4 years agovfs_delay_inject: add support for brl_[un]lock_windows()
Stefan Metzmacher [Mon, 19 Aug 2019 16:22:38 +0000 (18:22 +0200)]
vfs_delay_inject: add support for brl_[un]lock_windows()

This demonstrates the two ways to handle the retry:
- smb layer retry => plock->context.smblctx = UINT64_MAX
- vfs backend retry => plock->context.smblctx = 0

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:locking: add brl_req_guid() and brl_req_mem_ctx() helper functions
Stefan Metzmacher [Thu, 8 Aug 2019 17:26:28 +0000 (19:26 +0200)]
s3:locking: add brl_req_guid() and brl_req_mem_ctx() helper functions

This allows the vfs backend to detect a retry and keep state between
the retries.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: handle NT_STATUS_RETRY from the VFS backend
Stefan Metzmacher [Mon, 19 Aug 2019 14:25:59 +0000 (16:25 +0200)]
s3:smb2_lock: handle NT_STATUS_RETRY from the VFS backend

This allows the VFS backends to implement async byte
range locking.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: handle NT_STATUS_RETRY from the VFS backend
Stefan Metzmacher [Mon, 19 Aug 2019 13:29:32 +0000 (15:29 +0200)]
s3:blocking: handle NT_STATUS_RETRY from the VFS backend

This allows the VFS backends to implement async byte
range locking.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: make use of smbd_smb1_do_locks_try() in smbd_smb1_do_locks_send()
Stefan Metzmacher [Thu, 15 Aug 2019 18:09:55 +0000 (20:09 +0200)]
s3:blocking: make use of smbd_smb1_do_locks_try() in smbd_smb1_do_locks_send()

We only need the logic to call smbd_smb1_do_locks_check() and a possible
retry once in smbd_smb1_do_locks_try().

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: call smbd_smb1_do_locks_setup_timeout() also in smbd_smb1_do_locks_try()
Stefan Metzmacher [Thu, 15 Aug 2019 16:18:50 +0000 (18:18 +0200)]
s3:blocking: call smbd_smb1_do_locks_setup_timeout() also in smbd_smb1_do_locks_try()

This is a noop if smbd_smb1_do_locks_setup_timeout() was called before.

But it allows us to use smbd_smb1_do_locks_try() in
smbd_smb1_do_locks_send() in a following commit.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: fix the fsp->blocked_smb1_lock_reqs handling
Stefan Metzmacher [Fri, 16 Aug 2019 12:55:13 +0000 (14:55 +0200)]
s3:blocking: fix the fsp->blocked_smb1_lock_reqs handling

A new request is first checks against all pending
requests before checking the already granted locks.

Before we retried the lock array of another request
(the first in the list), but then finished current request,
which is wrong.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: do the timeout calculation before calling dbwrap_watched_watch_send()
Stefan Metzmacher [Mon, 19 Aug 2019 13:21:50 +0000 (15:21 +0200)]
s3:blocking: do the timeout calculation before calling dbwrap_watched_watch_send()

This makes the next commits easier to understand.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: split out smbd_smb1_do_locks_setup_timeout()
Stefan Metzmacher [Thu, 15 Aug 2019 16:02:57 +0000 (18:02 +0200)]
s3:blocking: split out smbd_smb1_do_locks_setup_timeout()

This function can be called multiple times, but only
the first time will setup the endtime. And the
endtime is relative to the request time and not
the current time.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: use timeval_expired(&state->endtime) to stop processing
Stefan Metzmacher [Thu, 15 Aug 2019 16:17:47 +0000 (18:17 +0200)]
s3:blocking: use timeval_expired(&state->endtime) to stop processing

This is less racy than timeval_elapsed() > 0
as the current time is already expired and timeout = 0
will always work correct.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/raw: add multilock6 test
Stefan Metzmacher [Fri, 16 Aug 2019 14:24:34 +0000 (16:24 +0200)]
s4:torture/raw: add multilock6 test

This is similar to multilock3, but uses a read-only
(LOCKING_ANDX_SHARED_LOCK) locks for the 2nd lock
request.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/raw: add multilock5 test
Stefan Metzmacher [Fri, 16 Aug 2019 13:12:01 +0000 (15:12 +0200)]
s4:torture/raw: add multilock5 test

This is similar to multilock3, but uses a read-only
(LOCKING_ANDX_SHARED_LOCK) locks for the first lock
request.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/raw: add multilock4 test
Stefan Metzmacher [Fri, 16 Aug 2019 12:49:29 +0000 (14:49 +0200)]
s4:torture/raw: add multilock4 test

This is similar to multilock3, but uses read-only
(LOCKING_ANDX_SHARED_LOCK) locks for the blocked
requests.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/raw: add multilock3 test
Stefan Metzmacher [Fri, 16 Aug 2019 10:13:15 +0000 (12:13 +0200)]
s4:torture/raw: add multilock3 test

This demonstrates that unrelated lock ranges
are not blocked by other blocked requests on the same
fsp.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/raw: improvements for multilock2
Stefan Metzmacher [Fri, 16 Aug 2019 10:28:39 +0000 (12:28 +0200)]
s4:torture/raw: improvements for multilock2

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: add retry for POSIX locks
Stefan Metzmacher [Fri, 2 Aug 2019 12:50:27 +0000 (14:50 +0200)]
s3:smb2_lock: add retry for POSIX locks

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/smb2: add smb2.samba3misc.localposixlock1
Stefan Metzmacher [Mon, 19 Aug 2019 15:38:30 +0000 (17:38 +0200)]
s4:torture/smb2: add smb2.samba3misc.localposixlock1

This demonstrates that the SMB2 code path doesn't do
any retry for local posix locks.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: make use of smbd_smb2_lock_try() in smbd_smb2_lock_send()
Stefan Metzmacher [Tue, 13 Aug 2019 14:39:41 +0000 (16:39 +0200)]
s3:smb2_lock: make use of smbd_smb2_lock_try() in smbd_smb2_lock_send()

We only need the logic to call smbd_do_locks_try() and a possible
retry once in smbd_smb2_lock_try().

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:smb2_lock: let smbd_smb2_lock_try() explicitly check for the retry condition
Stefan Metzmacher [Tue, 13 Aug 2019 14:39:41 +0000 (16:39 +0200)]
s3:smb2_lock: let smbd_smb2_lock_try() explicitly check for the retry condition

This makes it possible to reuse _try() in the _send() function in the
next commit.

We should not retry forever on a hard error.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: error out early in smbd_smb2_lock_send()
Stefan Metzmacher [Tue, 13 Aug 2019 14:39:41 +0000 (16:39 +0200)]
s3:smb2_lock: error out early in smbd_smb2_lock_send()

We no longer expect NT_STATUS_FILE_LOCK_CONFLICT from
the VFS layer and assert that in a future version.

This makes it easier to port the same logic to smbd_smb2_lock_try().

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: split smbd_smb2_lock_retry() into _try() and _retry()
Stefan Metzmacher [Tue, 13 Aug 2019 14:39:41 +0000 (16:39 +0200)]
s3:smb2_lock: split smbd_smb2_lock_retry() into _try() and _retry()

This makes it possible to reuse _try() in the _send() function in the
next commits.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: move from 'blocking' to 'state->blocking'
Stefan Metzmacher [Tue, 13 Aug 2019 14:14:23 +0000 (16:14 +0200)]
s3:smb2_lock: move from 'blocking' to 'state->blocking'

This will simplify the next commits.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:brlock: always return LOCK_NOT_GRANTED instead of FILE_LOCK_CONFLICT
Stefan Metzmacher [Mon, 19 Aug 2019 10:33:28 +0000 (12:33 +0200)]
s3:brlock: always return LOCK_NOT_GRANTED instead of FILE_LOCK_CONFLICT

Returning NT_STATUS_FILE_LOCK_CONFLICT is a SMB1 only detail
for delayed brlock requests, which is handled in
smbd_smb1_do_locks*().

The brlock layer should be consistent even for posix locks.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: maintain state->deny_status
Stefan Metzmacher [Mon, 19 Aug 2019 10:04:43 +0000 (12:04 +0200)]
s3:blocking: maintain state->deny_status

For Windows locks we start with LOCK_NOT_GRANTED and use
FILE_LOCK_CONFLICT if we retried after a timeout.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture/raw: assert to get LOCK_NOT_GRANTED in torture_samba3_posixtimedlock()
Stefan Metzmacher [Mon, 19 Aug 2019 14:30:16 +0000 (16:30 +0200)]
s4:torture/raw: assert to get LOCK_NOT_GRANTED in torture_samba3_posixtimedlock()

There should not be a different if the blocker is a posix process
instead of another smbd.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: use dynamic posix lock wait intervals
Stefan Metzmacher [Thu, 15 Aug 2019 15:26:43 +0000 (17:26 +0200)]
s3:blocking: use dynamic posix lock wait intervals

We want to start with a short timeout (200ms) and
slow down to larger timeouts up to 2s for the default
value of "lock spin time".

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: Remove bug reproducer from a few commits ago
Stefan Metzmacher [Thu, 15 Aug 2019 14:44:11 +0000 (16:44 +0200)]
s3:blocking: Remove bug reproducer from a few commits ago

The problem is fixed, now we can revert the change that made it
easier to trigger.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: fix posix lock retry
Stefan Metzmacher [Thu, 15 Aug 2019 12:21:38 +0000 (14:21 +0200)]
s3:blocking: fix posix lock retry

We should evaluate the timeout condition after the very last
retry and not before.

Otherwise we'd fail to retry when waiting for posix locks.
The problem happens if the client provided timeout is smaller
than the 1 sec (for testing temporary 15 secs) retry.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: move from 'timeout' to 'smbd_smb1_do_locks_state->timeout'
Stefan Metzmacher [Tue, 13 Aug 2019 16:34:36 +0000 (18:34 +0200)]
s3:blocking: move from 'timeout' to 'smbd_smb1_do_locks_state->timeout'

This will make it possible to just use smbd_smb1_do_locks_try()
in a later commit.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: split smbd_smb1_do_locks_retry() into _try() and _retry()
Stefan Metzmacher [Tue, 13 Aug 2019 16:34:36 +0000 (18:34 +0200)]
s3:blocking: split smbd_smb1_do_locks_retry() into _try() and _retry()

This will make it possible to have just one caller to
smbd_do_locks_try() later and use smbd_smb1_do_locks_try()
from within smbd_smb1_do_locks_send().

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

Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:blocking: demonstrate the posix lock retry fails
Stefan Metzmacher [Thu, 15 Aug 2019 09:09:47 +0000 (11:09 +0200)]
s3:blocking: demonstrate the posix lock retry fails

This is just a temporary commit that shows the bug and its
fix. It will be reverted once the problem is fixed.

The posix lock retry fails if the client specified timeout
is smaller than the hardcoded 1 second retry.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:torture: convert LOCK9 into LOCK9A and LOCK9B
Stefan Metzmacher [Thu, 15 Aug 2019 12:31:54 +0000 (14:31 +0200)]
s3:torture: convert LOCK9 into LOCK9A and LOCK9B

LOCK9A is the original test (with a timeout of -1)
and LOCK9B is the same but with timeout of 10 seconds.

LOCK9B is needed to demonstrate a server bug in the next
commits.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:torture: fix the timeout alarm handling on LOCK9
Stefan Metzmacher [Thu, 15 Aug 2019 14:10:58 +0000 (16:10 +0200)]
s3:torture: fix the timeout alarm handling on LOCK9

smbXcli_conn_disconnect(alarm_cli->conn, NT_STATUS_OK)
means existing requests are not finished with an error,
but instead just keep dangling arround.

Pass NT_STATUS_LOCAL_DISCONNECT in order to fail the
cli_lock32() call after getting SIGALARM.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: remove unused timeval_brl_min()
Stefan Metzmacher [Tue, 13 Aug 2019 17:19:07 +0000 (19:19 +0200)]
s3:blocking: remove unused timeval_brl_min()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:locking: add share_mode_wakeup_waiters() helper function
Stefan Metzmacher [Thu, 8 Aug 2019 22:47:39 +0000 (00:47 +0200)]
s3:locking: add share_mode_wakeup_waiters() helper function

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:locking: add/split out byte_range_{valid,overlap}() helper functions
Stefan Metzmacher [Thu, 5 Sep 2019 06:43:32 +0000 (08:43 +0200)]
s3:locking: add/split out byte_range_{valid,overlap}() helper functions

They implement the logic from [MS-FSA].

The following commits will use these functions in other locations.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smb2_lock: call change_to_user_by_fsp() when dbwrap_watched_watch* finishes
Stefan Metzmacher [Wed, 4 Sep 2019 10:47:07 +0000 (12:47 +0200)]
s3:smb2_lock: call change_to_user_by_fsp() when dbwrap_watched_watch* finishes

This is not strictly required as fd-based calls are used,
but it's more consistent to call SMB_VFS_BRL_LOCK_WINDOWS()
in the same environment on retry.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:blocking: call change_to_user_by_fsp() when dbwrap_watched_watch* finishes
Stefan Metzmacher [Wed, 4 Sep 2019 10:50:06 +0000 (12:50 +0200)]
s3:blocking: call change_to_user_by_fsp() when dbwrap_watched_watch* finishes

This is not strictly required as fd-based calls are used,
but it's more consistent to call SMB_VFS_BRL_LOCK_WINDOWS()
in the same environment on retry.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4:torture: make rpc.handles.random-assoc test more robust
Stefan Metzmacher [Fri, 16 Aug 2019 10:50:21 +0000 (12:50 +0200)]
s4:torture: make rpc.handles.random-assoc test more robust

We've seen failures like this:

  RPC-HANDLE-RANDOM-ASSOC
  connect samr pipe1
  pipe1 uses assoc_group_id[0x00000001]
  connect samr pipe2 with assoc_group_id[0xFFFFFFFF]- should fail
  Failed to bind to uuid 12345778-1234-abcd-ef00-0123456789ac for
    ncacn_np:localdc[\pipe\samr,bigendian,assoc_group_id=0xffffffff,
    abstract_syntax=12345778-1234-abcd-ef00-0123456789ac/0x00000001] NT_STATUS_UNSUCCESSFUL
  connect samr pipe3 with assoc_group_id[0x00000000]- should fail
  UNEXPECTED(failure): samba4.rpc.handles on ncacn_np with bigendian.random-assoc(ad_dc_default)
  REASON: Exception: Exception: ../../source4/torture/rpc/handles.c:546:
    status was NT_STATUS_OK, expected NT_STATUS_UNSUCCESSFUL: opening samr pipe3

Prevent that it wraps to 0x00000000

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos3:smbcontrol: avoid printing NULL help strings
David Disseldorp [Sun, 8 Sep 2019 13:08:54 +0000 (15:08 +0200)]
s3:smbcontrol: avoid printing NULL help strings

Some smbcontrol commands leave the .help pointer NULL, resulting in the
following usage text:
        disconnect-dc                 (null)
        notify-cleanup                (null)
...
        msg-cleanup                   (null)

Improve this by printing an empty string instead.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Sep  9 10:32:53 UTC 2019 on sn-devel-184

4 years agoctdb-eventscripts: Remove non-posix -v option to mkdir
Amitay Isaacs [Wed, 31 Jul 2019 02:13:52 +0000 (12:13 +1000)]
ctdb-eventscripts: Remove non-posix -v option to mkdir

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Sep  6 11:11:02 UTC 2019 on sn-devel-184

4 years agoctdb-eventscripts: Fix the regression in 01.reclock.script
Amitay Isaacs [Wed, 31 Jul 2019 02:12:14 +0000 (12:12 +1000)]
ctdb-eventscripts: Fix the regression in 01.reclock.script

Commit ea7708d8c7fa674111ccea58b3cd0757765c702a simplified
01.reclock.script and removed include of functions file which is
required for setting CTDB_HELPER_BINDIR and for die() function.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agodocs: Deprecate "lanman auth = yes"
Andrew Bartlett [Wed, 4 Sep 2019 23:23:22 +0000 (11:23 +1200)]
docs: Deprecate "lanman auth = yes"

This feature is only available for SMB1 and we need to warn users that this
is going away soon, and allow the removal in a future release under our rules
for parameter deprecation.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep  5 04:04:18 UTC 2019 on sn-devel-184

4 years agodocs: Deprecate "encrypt passwords = no"
Andrew Bartlett [Wed, 4 Sep 2019 23:19:10 +0000 (11:19 +1200)]
docs: Deprecate "encrypt passwords = no"

This feature is only available for SMB1 and we need to warn users that this
is going away soon, and allow the removal in a future release under our rules
for parameter deprecation.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
4 years agotorture: Fix the FreeBSD clang build
Volker Lendecke [Wed, 4 Sep 2019 09:32:58 +0000 (11:32 +0200)]
torture: Fix the FreeBSD clang build

clang complained that "full_filename==NULL" is always false, because
it's a normal stack variable.

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): Wed Sep  4 18:20:22 UTC 2019 on sn-devel-184

4 years agosamr: Fix CID 1453463: Null pointer dereferences (NULL_RETURNS)
Volker Lendecke [Tue, 3 Sep 2019 08:38:35 +0000 (10:38 +0200)]
samr: Fix CID 1453463: Null pointer dereferences (NULL_RETURNS)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodsdb: Fix CID 1453464: Error handling issues (CHECKED_RETURN)
Volker Lendecke [Tue, 3 Sep 2019 08:35:33 +0000 (10:35 +0200)]
dsdb: Fix CID 1453464: Error handling issues (CHECKED_RETURN)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodsdb: Fix CID 1453465: Null pointer dereferences (NULL_RETURNS)
Volker Lendecke [Tue, 3 Sep 2019 08:29:53 +0000 (10:29 +0200)]
dsdb: Fix CID 1453465: Null pointer dereferences (NULL_RETURNS)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:ldap: Fix join with don't exists machine account
Evgeny Sinelnikov [Wed, 31 Jul 2019 19:17:20 +0000 (23:17 +0400)]
s3:ldap: Fix join with don't exists machine account

Add check for requested replies of existing machine object during join
machine to domain. This solves regression fail during join with error:
"None of the information to be translated has been translated."

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

Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep  4 17:02:37 UTC 2019 on sn-devel-184

4 years agos3/lib/ctdbd_conn: assert hdr following read/recv
David Disseldorp [Tue, 3 Sep 2019 13:26:19 +0000 (15:26 +0200)]
s3/lib/ctdbd_conn: assert hdr following read/recv

ctdb_pkt_recv_recv() and ctdb_read_packet() give us a non-null hdr on
success, so drop the error path check in favour of an assert.

This fixes a regression in 3913b9a4088b83d6ed7f94d136a26ecfa7e16b35,
where tevent_req_error() may be skipped in the ctdbd_parse_done()
ctdb_pkt_recv_recv() error path.

Reported-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Sep  4 14:20:16 UTC 2019 on sn-devel-184

4 years agotevent: Release tevent 0.10.1 tevent-0.10.1
Stefan Metzmacher [Wed, 4 Sep 2019 08:49:32 +0000 (10:49 +0200)]
tevent: Release tevent 0.10.1

* Update waf to version 2.0.17 in order to
  fix the build with python 3.8.
* Other minor build fixes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Sep  4 11:47:04 UTC 2019 on sn-devel-184

4 years agos3: VFS: Complete the replacement of SMB_VFS_SYMLINK() -> SMB_VFS_SYMLINKAT().
Jeremy Allison [Fri, 30 Aug 2019 21:45:13 +0000 (14:45 -0700)]
s3: VFS: Complete the replacement of SMB_VFS_SYMLINK() -> SMB_VFS_SYMLINKAT().

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 Sep  3 22:32:30 UTC 2019 on sn-devel-184

4 years agos3: VFS: vfs_time_audit. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:39:53 +0000 (14:39 -0700)]
s3: VFS: vfs_time_audit. Remove symlink_fn(). No longer used.

NB, this will now fail smb_vfs_assert_all_fns()
until we remove the symlink_fn() from the VFS definitions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_full_audit. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:38:28 +0000 (14:38 -0700)]
s3: VFS: vfs_full_audit. Remove symlink_fn(). No longer used.

NB, this will now fail smb_vfs_assert_all_fns()
until we remove the symlink_fn() from the VFS definitions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_unityed_media. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:36:58 +0000 (14:36 -0700)]
s3: VFS: vfs_unityed_media. Remove symlink_fn(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_syncops. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:36:10 +0000 (14:36 -0700)]
s3: VFS: vfs_syncops. Remove symlink_fn(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_snapper. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:35:25 +0000 (14:35 -0700)]
s3: VFS: vfs_snapper. Remove symlink_fn(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_shadow_copy2. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:34:37 +0000 (14:34 -0700)]
s3: VFS: vfs_shadow_copy2. Remove symlink_fn(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_media_harmony. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:33:22 +0000 (14:33 -0700)]
s3: VFS: vfs_media_harmony. Remove symlink_fn(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_glusterfs. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:32:22 +0000 (14:32 -0700)]
s3: VFS: vfs_glusterfs. Remove symlink_fn(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: vfs_ceph_snapshots. Remove symlink_fn(). No longer used.
Jeremy Allison [Fri, 30 Aug 2019 21:31:02 +0000 (14:31 -0700)]
s3: VFS: vfs_ceph_snapshots. Remove symlink_fn(). No longer used.

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