]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
3 years agosmbstatus: move the output of the title lines to their own methods
Jule Anger [Thu, 24 Mar 2022 15:34:10 +0000 (16:34 +0100)] 
smbstatus: move the output of the title lines to their own methods

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbstatus: pass the traverse_state to the traverse methods
Jule Anger [Thu, 24 Mar 2022 15:27:10 +0000 (16:27 +0100)] 
smbstatus: pass the traverse_state to the traverse methods

The state cannot be used as a context, so a NULL context tmp_ctx must be created.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbstatus: add struct traverse_state
Jule Anger [Wed, 23 Mar 2022 14:17:48 +0000 (15:17 +0100)] 
smbstatus: add struct traverse_state

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbstatus: use variables in print_share_mode instead of printing directly
Jule Anger [Wed, 23 Mar 2022 08:13:58 +0000 (09:13 +0100)] 
smbstatus: use variables in print_share_mode instead of printing directly

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbstatus: print errors to stderr instead of stdout
Jule Anger [Wed, 23 Mar 2022 07:58:54 +0000 (08:58 +0100)] 
smbstatus: print errors to stderr instead of stdout

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agoaudit_logging: add method to replace the object for a given key with a new object
Jule Anger [Tue, 22 Mar 2022 15:06:37 +0000 (16:06 +0100)] 
audit_logging: add method to replace the object for a given key with a new object

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agosmbstatus: delete wrong EXCLUSIVE+BATCH oplock
Jule Anger [Mon, 9 May 2022 10:09:18 +0000 (12:09 +0200)] 
smbstatus: delete wrong EXCLUSIVE+BATCH oplock

It is not possible to have an EXCLUSIVE+BATCH oplock, because a BATCH
oplock includes an EXCLUSIVE oplock. Therefore, an EXCLUSIVE+BATCH-Oplock
and a BATCH-Oplock are the same thing.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 years agos3: smbd: Oops. DBG_ERR messages I used to debug parse_dfs_path(), should have been...
Jeremy Allison [Fri, 5 Aug 2022 18:06:13 +0000 (11:06 -0700)] 
s3: smbd: Oops. DBG_ERR messages I used to debug parse_dfs_path(), should have been DBG_DEBUG.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug  8 09:07:24 UTC 2022 on sn-devel-184

3 years agolib/util/access: source3/auth/user_util: Check for INNETGR
listout [Thu, 14 Jul 2022 13:21:09 +0000 (18:51 +0530)] 
lib/util/access: source3/auth/user_util: Check for INNETGR

Checking for presence of both netgroup and innetgr. INNETGR is not
defined on libc's such as musl so not checking results in a build error.

Signed-off-by: listout <brahmajit.xyz@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug  8 07:28:31 UTC 2022 on sn-devel-184

3 years agonsswitch/wins: Define NETDB_* for other libc's
listout [Thu, 14 Jul 2022 13:15:17 +0000 (18:45 +0530)] 
nsswitch/wins: Define NETDB_* for other libc's

Define NETDB_SUCCESS and NETDB_INTERNAL if they are not defined. On
libc's such as musl NETDB_INTERNAL and NETDB_SUCCESS are not defined.

Signed-off-by: listout <brahmajit.xyz@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agovfs: Add struct vfs_open_how.resolve
Volker Lendecke [Fri, 3 Jun 2022 14:45:41 +0000 (16:45 +0200)] 
vfs: Add struct vfs_open_how.resolve

This prepares the later introduction of VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS,
which will be used to make use of RESOLVE_NO_SYMLINKS on linux with openat2().

Right now all terminal VFS objects reject any resolve bits with ENOSYS.
So we only prepare the vfs layer for now without any real change.
But this will make backports to 4.17 much easier.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
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): Sat Aug  6 02:39:11 UTC 2022 on sn-devel-184

3 years agosmbd: Hand vfs_open_how to openat_pathref_fullname
Volker Lendecke [Fri, 17 Jun 2022 08:54:14 +0000 (10:54 +0200)] 
smbd: Hand vfs_open_how to openat_pathref_fullname

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agosmbd: Pass vfs_open_how through fd_openat
Volker Lendecke [Fri, 17 Jun 2022 08:39:20 +0000 (10:39 +0200)] 
smbd: Pass vfs_open_how through fd_openat

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agosmbd: Pass vfs_open_how through non_widelink_open
Volker Lendecke [Thu, 16 Jun 2022 15:09:55 +0000 (17:09 +0200)] 
smbd: Pass vfs_open_how through non_widelink_open

process_symlink_open goes with it

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agovfs: change openat propotype to match linux openat2
Volker Lendecke [Fri, 3 Jun 2022 13:53:29 +0000 (15:53 +0200)] 
vfs: change openat propotype to match linux openat2

The Linux prototype for openat2 looks like this:

       long openat2(int dirfd, const char *pathname,
                   struct open_how *how, size_t size);

where "struct open_how" is defined in "linux/openat2.h". It is
designed to be extensible with further flags.

The "size" parameter is required because there is no type checking
between userland and kernelspace, so the way for Linux to find which
version of open_how is being passed in is looking at the size:
"open_how" is expected to only every grow with additional fields,
should a change be necessary in the future.

Samba does not have this problem, we can typecheck the struct and
pointers, we expect all VFS modules to be compiled against the current
vfs.h.

For now this adds no functionality, but it will make further patches
much smaller.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agovfs_glusterfs: add missing END_PROFILE(syscall_openat) to vfs_gluster_openat()
Stefan Metzmacher [Fri, 5 Aug 2022 11:17:50 +0000 (11:17 +0000)] 
vfs_glusterfs: add missing END_PROFILE(syscall_openat) to vfs_gluster_openat()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agosamba-tool gpo: clean up tmpdir after create
Douglas Bagnall [Thu, 24 Mar 2022 05:39:55 +0000 (18:39 +1300)] 
samba-tool gpo: clean up tmpdir after create

'fetch' and 'backup' might also leave files in /tmp, but in those cases
we want the files.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Sat Aug  6 01:42:09 UTC 2022 on sn-devel-184

3 years agosamba-tool: allow testparm to dump global section only
Douglas Bagnall [Thu, 4 Aug 2022 03:44:45 +0000 (15:44 +1200)] 
samba-tool: allow testparm to dump global section only

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
3 years agopyparam: expose lpcfg_dump_globals()
Douglas Bagnall [Thu, 4 Aug 2022 03:41:25 +0000 (15:41 +1200)] 
pyparam: expose lpcfg_dump_globals()

This is needed by samba-tool testparm, in the next commit.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
3 years agopytest/netcmd: test samba-tool testparm global section
Douglas Bagnall [Thu, 4 Aug 2022 22:48:06 +0000 (10:48 +1200)] 
pytest/netcmd: test samba-tool testparm global section

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
3 years agos3: smbd: Remove ugly SMB1-specific hack to filename_convert_dirfsp()
Jeremy Allison [Thu, 4 Aug 2022 18:32:05 +0000 (11:32 -0700)] 
s3: smbd: Remove ugly SMB1-specific hack to filename_convert_dirfsp()

This was added due to the error code check in test_symlink_traversal_smb1_posix.sh.
After careful consideration I've realized the error code expected here
is incorrect, and not providing any security benefit.

We already check that trying to fetch a file/traverse through a
symlink that points outside of a share returns NT_STATUS_OBJECT_PATH_NOT_FOUND,
and this is enforced in the symlink checks already inside filename_convert_dirfsp().

If a symlink points to a directory within the share for which
the user has no permissions (as is tested here), then there's no
benefit in mapping the error code from NT_STATUS_ACCESS_DENIED
to NT_STATUS_OBJECT_PATH_NOT_FOUND, as we are not providing any
extra information about the filesystem state the user cannot already
obtain by normal SMB1+POSIX calls.

Change the error code expected in this single test from NT_STATUS_OBJECT_PATH_NOT_FOUND
to NT_STATUS_ACCESS_DENIED.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Aug  5 10:24:23 UTC 2022 on sn-devel-184

3 years agos3: smbd: Remove the ucf_flags parameter from extract_snapshot_token().
Jeremy Allison [Thu, 4 Aug 2022 17:02:15 +0000 (10:02 -0700)] 
s3: smbd: Remove the ucf_flags parameter from extract_snapshot_token().

Now we always call check_path_syntaxXXX(), even on DFS names
we no longer need this. It was a BAD change, and I should feel BAD :-).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Cleanup - integer align. consumedcnt should be a size_t.
Jeremy Allison [Thu, 4 Aug 2022 20:23:28 +0000 (13:23 -0700)] 
s3: smbd: Cleanup - integer align. consumedcnt should be a size_t.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Minor cleanup in parse_dfs_path().
Jeremy Allison [Thu, 4 Aug 2022 20:08:51 +0000 (13:08 -0700)] 
s3: smbd: Minor cleanup in parse_dfs_path().

allow_wcards parameter is not used or looked at.

Remove it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Remove 'bool posix_path' from struct dfs_path.
Jeremy Allison [Fri, 5 Aug 2022 02:09:39 +0000 (19:09 -0700)] 
s3: smbd: Remove 'bool posix_path' from struct dfs_path.

Nothing now sets or looks at it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Change srvstr_get_path_internal() to always call check_path_syntaxXXX(...
Jeremy Allison [Thu, 4 Aug 2022 16:52:17 +0000 (09:52 -0700)] 
s3: smbd: Change srvstr_get_path_internal() to always call check_path_syntaxXXX(), even on DFS pathnames.

The original design decision to just copy a DFS path and let
parse_dfs_path() take care of it was a horrible mistake.

Fix srvstr_get_path_internal() to always return a
/server/share/path (i.e. a path separated with '/', not '\').

This is a more complex change than I like to allow
DFS path procesing in srvstr_get_path_internal() but
needed as clients (including Samba smbclient) have a
rather "fuzzy" idea of what constitutes a valid DFS path.
If we detect the DFS path isn't valid here we have to
fall back to treating it as a local path.

I also need to modify the DFS parsing in
filename_convert_smb1_search_path() to cope with only '/'
separators.

This also means parse_dfs_path() needs changing to
cope.

The changes here are best reviewed by just applying
the fix and looking at the modified functions:

srvstr_get_path_internal()
parse_dfs_path()

For parse_dfs_path() it's mostly removing bad code
and makes parse_dfs_path() much easier to read.

These changes will enable me to remove some ugly mistakes made
adding ucf_flags to extract_snapshot_token(), as
we can now always assume canonicalized paths.

This is a little messy, but has to be done in
one chunk as the change to srvstr_get_path_internal()
depends on the change to parse_dfs_path().

Thanks to Volker for the insight that made this
cleanup possible.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agosmbd: Fix a "set but not used" warning
Volker Lendecke [Tue, 2 Aug 2022 11:08:43 +0000 (13:08 +0200)] 
smbd: Fix a "set but not used" warning

This is copy&paste from reply_negprot() where this variable was used
to set the remote architecture. This isn't used anymore in the
stripped down smb2 version of this.

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): Thu Aug  4 21:46:23 UTC 2022 on sn-devel-184

3 years agosmbd: Security fix for systems without O_PATH
Volker Lendecke [Thu, 4 Aug 2022 14:44:44 +0000 (16:44 +0200)] 
smbd: Security fix for systems without O_PATH

Further up we add O_PATH manually. Initial development versions of
this code did set the is_pathref, but then I found this potential
problem. I forgot to remove this incarnation of is_pathref=true, doing
it now.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agolib: Align an integer type
Volker Lendecke [Wed, 3 Aug 2022 09:05:33 +0000 (11:05 +0200)] 
lib: Align an integer type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agosmbd: Fix the build on FreeBSD
Volker Lendecke [Fri, 22 Jul 2022 17:17:29 +0000 (19:17 +0200)] 
smbd: Fix the build on FreeBSD

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
3 years agos3: smbd: Convert driver_unix_convert() to use filename_convert_dirfsp().
Jeremy Allison [Tue, 2 Aug 2022 21:06:44 +0000 (14:06 -0700)] 
s3: smbd: Convert driver_unix_convert() to use filename_convert_dirfsp().

There is now only one user left of unix_convert(), inside
the MSDFS code. I have plans to get rid of this soon.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  4 18:10:43 UTC 2022 on sn-devel-184

3 years agos3: smbd: Add dirfsp return parameter to driver_unix_convert().
Jeremy Allison [Tue, 2 Aug 2022 21:01:59 +0000 (14:01 -0700)] 
s3: smbd: Add dirfsp return parameter to driver_unix_convert().

Not yet used, but (dirfsp=NULL) value passed to functions
called after driver_unix_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: In filename_convert_dirfsp_nosymlink() only use synthetic_smb_fname_split...
Jeremy Allison [Wed, 3 Aug 2022 01:13:52 +0000 (18:13 -0700)] 
s3: smbd: In filename_convert_dirfsp_nosymlink() only use synthetic_smb_fname_split() for fake_files, not printer shares too.

Printer shares can have real filenames.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Remove filename_convert().
Jeremy Allison [Wed, 3 Aug 2022 17:04:37 +0000 (10:04 -0700)] 
s3: smbd: Remove filename_convert().

                            (\  _  /)
                            ( \ O / )
                             (// \\)
                                X
                               / \
                              /___\
                       _____/      \\_____
                      |         +         ||
                      |                   ||
                      |  filename_convert ||
                      |                   ||
                      |                   ||
                      |                   ||
                      |                   ||
                      |  _     ___   _    ||
                      | | \     |   | \   ||
                      | |  |    |   |  |  ||
                      | |_/     |   |_/   ||
                      | | \     |   |     ||
                      | |  \    |   |     ||
                      | |   \. _|_. | .   ||
                      |                   ||
              *     * | *   **    * **    |**     **
               \)),.,\(/.,(//,,..,,\||(,,.,\\,.((//

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert filename_convert_smb1_search_path() to use filename_convert_dirfsp().
Jeremy Allison [Wed, 3 Aug 2022 17:02:42 +0000 (10:02 -0700)] 
s3: smbd: Convert filename_convert_smb1_search_path() to use filename_convert_dirfsp().

There are now no more users of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Add returned dirfsp pointer to filename_convert_smb1_search_path().
Jeremy Allison [Wed, 3 Aug 2022 16:58:54 +0000 (09:58 -0700)] 
s3: smbd: Add returned dirfsp pointer to filename_convert_smb1_search_path().

Preparation for convertion of the last filename_convert() -> filename_convert_dirfsp().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: We now know get_original_lcomp() never has to deal with an MSDFS pathname.
Jeremy Allison [Wed, 3 Aug 2022 18:45:39 +0000 (11:45 -0700)] 
s3: smbd: We now know get_original_lcomp() never has to deal with an MSDFS pathname.

Remove the call to dfs_redirect() within it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: In filename_convert_smb1_search_path(), after we have called dfs_redirect...
Jeremy Allison [Wed, 3 Aug 2022 18:42:17 +0000 (11:42 -0700)] 
s3: smbd: In filename_convert_smb1_search_path(), after we have called dfs_redirect(), the path separator is always '/'.

This will allow us to remove the call to dfs_redirect() from get_original_lcomp().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Remove TWRP handing inside get_original_lcomp().
Jeremy Allison [Tue, 2 Aug 2022 21:24:46 +0000 (14:24 -0700)] 
s3: smbd: Remove TWRP handing inside get_original_lcomp().

Now we know all @GMT paths are removed before get_original_lcomp()
is called, we can eliminate this code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: In reply_ntrename(), move the call to get_original_lcomp(..newname..) after...
Jeremy Allison [Tue, 2 Aug 2022 21:16:15 +0000 (14:16 -0700)] 
s3: smbd: In reply_ntrename(), move the call to get_original_lcomp(..newname..) after the call to extract_snapshot_token(..newname..).

This was the last case where the snapshot TWRP token could be
passed into get_original_lcomp(). get_original_lcomp() can now
be changed to ignore TWRP tokens.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Remove code for unused strip_gmt_from_raw_dfs().
Jeremy Allison [Wed, 3 Aug 2022 16:50:57 +0000 (09:50 -0700)] 
s3: smbd: Remove code for unused strip_gmt_from_raw_dfs().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Change filename_convert_smb1_search_path() to use extract_snapshot_token().
Jeremy Allison [Wed, 3 Aug 2022 16:50:02 +0000 (09:50 -0700)] 
s3: smbd: Change filename_convert_smb1_search_path() to use extract_snapshot_token().

strip_gmt_from_raw_dfs() is now no longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Remove const from name_in parameter to filename_convert_smb1_search_path().
Jeremy Allison [Wed, 3 Aug 2022 16:27:37 +0000 (09:27 -0700)] 
s3: smbd: Remove const from name_in parameter to filename_convert_smb1_search_path().

We're going to need to convert in place if it's an MSDFS path
with an SMB1 @GMT token.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Remove separate talloc_stackframe() from filename_convert_smb1_search_path().
Jeremy Allison [Wed, 3 Aug 2022 16:33:48 +0000 (09:33 -0700)] 
s3: smbd: Remove separate talloc_stackframe() from filename_convert_smb1_search_path().

We're soon going to change this to return dirfsp and use convert_filename_dirfsp()
so we need to return values on the passed in talloc ctx.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Allow extract_snapshot_token() to cope with MSDFS paths.
Jeremy Allison [Wed, 3 Aug 2022 16:20:36 +0000 (09:20 -0700)] 
s3: smbd: Allow extract_snapshot_token() to cope with MSDFS paths.

"raw" MSDFS paths are passed here as \server\share\path.

find_snapshot_token() only looks for a '/' as a separator
in SMB1 shapshot paths.

Allow extract_snapshot_token() to cope with SMB1 MSDFS paths by
converting in place, looking for the @GMT token with a '/'
separator via find_snapshot_token(), and then converting back.

Note, this a temporary measure until we handle DFS paths better
and will be removed in the next patchset.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Add ucf_flags parameter to extract_snapshot_token().
Jeremy Allison [Wed, 3 Aug 2022 16:08:48 +0000 (09:08 -0700)] 
s3: smbd: Add ucf_flags parameter to extract_snapshot_token().

Will be needed to cope with MSDFS paths which can be passed in
to this function.

Note, this a temporary measure until we handle DFS paths better
and will be removed in the next patchset.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agotestprogs: Reformat test_ktpass.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_ktpass.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_ktpass.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Aug  4 13:49:54 UTC 2022 on sn-devel-184

3 years agotestprogs: Reformat test_kpasswd_mit.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_kpasswd_mit.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_kpasswd_mit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_kpasswd_heimdal.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_kpasswd_heimdal.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_kpasswd_heimdal.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_kinit_trusts_mit.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_kinit_trusts_mit.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_kinit_trusts_mit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_kinit_trusts_heimdal.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_kinit_trusts_heimdal.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_kinit_trusts_heimdal.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_kinit_mit.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_kinit_mit.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_kinit_mit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_kinit_heimdal.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)] 
testprogs: Reformat test_kinit_heimdal.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_kinit_heimdal.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_export_keytab_mit.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat test_export_keytab_mit.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_export_keytab_mit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_export_keytab_heimdal.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat test_export_keytab_heimdal.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_export_keytab_heimdal.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_client_kerberos.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat test_client_kerberos.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_client_kerberos.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_client_etypes.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat test_client_etypes.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_client_etypes.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat test_chgdcpass.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat test_chgdcpass.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_chgdcpass.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat subunit.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat subunit.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/subunit.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat schemaupgrade.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat schemaupgrade.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/schemaupgrade.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat runtime-links.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat runtime-links.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/runtime-links.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat renamedc.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat renamedc.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/renamedc.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat nsstest.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat nsstest.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/nsstest.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat ldapcmp_restoredc.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat ldapcmp_restoredc.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/ldapcmp_restoredc.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat join_ldapcmp.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat join_ldapcmp.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/join_ldapcmp.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat functionalprep.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat functionalprep.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/functionalprep.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat dom_parse.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat dom_parse.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dom_parse.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat dfree.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat dfree.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dfree.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat demote-saveddb.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat demote-saveddb.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/demote-saveddb.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat dbcheck.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat dbcheck.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dbcheck.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Thu Aug  4 10:11:30 UTC 2022 on sn-devel-184

3 years agotestprogs: Reformat dbcheck-oldrelease.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat dbcheck-oldrelease.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dbcheck-oldrelease.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agotestprogs: Reformat dbcheck-links.sh
Andreas Schneider [Fri, 22 Apr 2022 13:46:04 +0000 (15:46 +0200)] 
testprogs: Reformat dbcheck-links.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dbcheck-links.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
3 years agomdssvc: check if the user closed the query before trying to read the HTTP response...
Ralph Boehme [Fri, 19 Nov 2021 12:24:50 +0000 (13:24 +0100)] 
mdssvc: check if the user closed the query before trying to read the HTTP response from Elasticsearch

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Aug  3 14:00:36 UTC 2022 on sn-devel-184

3 years agomdssvc: fold two if blocks into one
Ralph Boehme [Fri, 19 Nov 2021 15:50:44 +0000 (16:50 +0100)] 
mdssvc: fold two if blocks into one

No change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: don't trigger http reconnect if a search was cancelled
Ralph Boehme [Fri, 19 Nov 2021 12:21:31 +0000 (13:21 +0100)] 
mdssvc: don't trigger http reconnect if a search was cancelled

Calling tevent_req_error() triggers a HTTP reconnect in mds_es_search_done() as
mds_es_search_recv() returns the error so we call mds_es_reconnect_on_error().

slq (which is s->slq) or s->mds_es_ctx will be NULL if the user closed a search
or disconnected a share with an active mdssvc IPC pipe, no need to trigger a
HTTP reconnect for those cases.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: fix check if search connection state is gone
Ralph Boehme [Fri, 19 Nov 2021 12:11:20 +0000 (13:11 +0100)] 
mdssvc: fix check if search connection state is gone

This was dead code: before this patchset noone set s->mds_es_ctx->mds_ctx to
NULL. A previous commit changed that so now the mds_es_ctx destructor sets
s->mds_es_ctx to NULL if a search "s" was currently in-flight.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: reapply default search destructor when marking a search non-pending
Ralph Boehme [Thu, 18 Nov 2021 15:51:36 +0000 (16:51 +0100)] 
mdssvc: reapply default search destructor when marking a search non-pending

This is needed to ensure searches that are scheduled more then once to the
Elasticsarch server (because the first run didn't return all results) get
removed from the list of searches in case the user closes the query.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: prevent a crash when pending search finishes after the client closed the...
Ralph Boehme [Fri, 19 Nov 2021 12:29:54 +0000 (13:29 +0100)] 
mdssvc: prevent a crash when pending search finishes after the client closed the search connection

When a search is in-flight and currently being processed against the
Elasticsearch server, we set s->pending. In the destructor of "s" we check "pending"
and reject deallocation of the object.

One instance where "s" is requested to be deallocated is when the client closes
the top-level per-share search connection. This will implicitly close all
searches associated with the mds_ctx from mds_ctx_destructor_cb():

while (mds_ctx->query_list != NULL) {
/*
 * slq destructor removes element from list.
 * Don't use TALLOC_FREE()!
 */
talloc_free(mds_ctx->query_list);
}

So when this happens the Elasticsearch backend query object stays around,
alongside with any active tevent_req request and a tevent_req timer set with
tevent_req_set_endtime() in mds_es_search_send().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14915
RN: mdssvc crashes when searches are pending and the client closes the mdssvc IPC pipe

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: move calling mds_es_search_set_pending() to mds_es_next_search_trigger()
Ralph Boehme [Fri, 19 Nov 2021 11:56:37 +0000 (12:56 +0100)] 
mdssvc: move calling mds_es_search_set_pending() to mds_es_next_search_trigger()

This makes the calls to mds_es_search_set_pending() and
mds_es_search_unset_pending() symmetric. No change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: consolidate calls of mds_es_search_unset_pending()
Ralph Boehme [Fri, 19 Nov 2021 12:28:17 +0000 (13:28 +0100)] 
mdssvc: consolidate calls of mds_es_search_unset_pending()

Both codepaths were mds_es_search_unset_pending() is currently called end up
going through the higher level callback mds_es_search_done(). Moving the call to
mds_es_search_unset_pending() ensures we call it consistently and don't miss it
in some error code path.

Otherwise no change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: update a comment
Ralph Boehme [Fri, 19 Nov 2021 07:27:34 +0000 (08:27 +0100)] 
mdssvc: update a comment

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agomdssvc: fix a comment
Ralph Boehme [Thu, 18 Nov 2021 15:51:21 +0000 (16:51 +0100)] 
mdssvc: fix a comment

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
3 years agos3: smbd: Convert smb_file_rename_information() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:38:47 +0000 (12:38 -0700)] 
s3: smbd: Convert smb_file_rename_information() to use filename_convert_dirfsp().

There is only one last user of filename_convert(), in filename_convert_smb1_search_path().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug  2 20:46:38 UTC 2022 on sn-devel-184

3 years agos3: smbd: Convert smb_file_link_information() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:32:07 +0000 (12:32 -0700)] 
s3: smbd: Convert smb_file_link_information() to use filename_convert_dirfsp().

One less use of filename_convert().

Later we should optimize this by passing in
the src_dirfsp from the caller.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert smb2_file_rename_information() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:29:22 +0000 (12:29 -0700)] 
s3: smbd: Convert smb2_file_rename_information() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert smb_set_file_unix_hlink() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:23:36 +0000 (12:23 -0700)] 
s3: smbd: Convert smb_set_file_unix_hlink() to use filename_convert_dirfsp().

One less use of filename_convert().

Later we should optimize this by passing in
the src_dirfsp from the caller.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert reply_ntrename() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:18:47 +0000 (12:18 -0700)] 
s3: smbd: Convert reply_ntrename() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert reply_mv() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:09:34 +0000 (12:09 -0700)] 
s3: smbd: Convert reply_mv() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert reply_mkdir() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 19:04:47 +0000 (12:04 -0700)] 
s3: smbd: Convert reply_mkdir() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert reply_unlink() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 18:52:36 +0000 (11:52 -0700)] 
s3: smbd: Convert reply_unlink() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert cmd_utime() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:56:28 +0000 (10:56 -0700)] 
s3: smbd: Convert cmd_utime() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert smbd_smb2_create_durable_lease_check() to use filename_convert_dirf...
Jeremy Allison [Thu, 28 Jul 2022 17:54:03 +0000 (10:54 -0700)] 
s3: smbd: Convert smbd_smb2_create_durable_lease_check() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert _srvsvc_NetSetFileSecurity() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:48:18 +0000 (10:48 -0700)] 
s3: smbd: Convert _srvsvc_NetSetFileSecurity() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert _srvsvc_NetGetFileSecurity() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:46:25 +0000 (10:46 -0700)] 
s3: smbd: Convert _srvsvc_NetGetFileSecurity() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert call_trans2setfilepathinfo() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:41:25 +0000 (10:41 -0700)] 
s3: smbd: Convert call_trans2setfilepathinfo() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert call_trans2qfilepathinfo() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:39:12 +0000 (10:39 -0700)] 
s3: smbd: Convert call_trans2qfilepathinfo() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert reply_setatr() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:33:31 +0000 (10:33 -0700)] 
s3: smbd: Convert reply_setatr() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Convert reply_getatr() to use filename_convert_dirfsp().
Jeremy Allison [Thu, 28 Jul 2022 17:30:02 +0000 (10:30 -0700)] 
s3: smbd: Convert reply_getatr() to use filename_convert_dirfsp().

One less use of filename_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Add dirfsp parameter to create_directory().
Jeremy Allison [Thu, 28 Jul 2022 19:01:21 +0000 (12:01 -0700)] 
s3: smbd: Add dirfsp parameter to create_directory().

Not yet used but passed down to SMB_VFS_CREATE().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 years agos3: smbd: Add src_dirfsp and dst_dirfsp parameters to copy_internals().
Jeremy Allison [Thu, 28 Jul 2022 18:49:35 +0000 (11:49 -0700)] 
s3: smbd: Add src_dirfsp and dst_dirfsp parameters to copy_internals().

Not yet used.

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