samba.git
4 years agos3:lib: assert stream_name is NULL for POSIX paths
Ralph Boehme [Wed, 25 Sep 2019 17:15:27 +0000 (10:15 -0700)]
s3:lib: assert stream_name is NULL for POSIX paths

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:lib: rework a return expression into an if block
Ralph Boehme [Wed, 25 Sep 2019 15:53:29 +0000 (08:53 -0700)]
s3:lib: rework a return expression into an if block

Needed to add additional stuff after the if block in the next commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:smbd: when storing DOS attribute call dos_mode() beforehand
Ralph Boehme [Mon, 23 Sep 2019 22:16:58 +0000 (15:16 -0700)]
s3:smbd: when storing DOS attribute call dos_mode() beforehand

This is required to ensure File-ID info is populated with the correct on-disk
value, before calling file_set_dosmode() which will update the on-disk value.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:smbd: change the place where we call dos_mode() when processing SMB2_CREATE
Ralph Boehme [Mon, 23 Sep 2019 22:15:31 +0000 (15:15 -0700)]
s3:smbd: change the place where we call dos_mode() when processing SMB2_CREATE

This is needed for ordinary file or directory opens so the QFID create context
response gets the correct File-ID value via dos_mode() from the DOS attributes
xattr.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture:smb2: add a File-ID test on directories
Ralph Boehme [Tue, 24 Sep 2019 20:09:03 +0000 (13:09 -0700)]
torture:smb2: add a File-ID test on directories

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture:smb2: extend test for File-IDs
Ralph Boehme [Mon, 23 Sep 2019 22:15:01 +0000 (15:15 -0700)]
torture:smb2: extend test for File-IDs

This now hopefully covers most possible combinations of creating and opening
files plus, checking the file's File-ID after every operation.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: passdb: ret doesn't seem to be needed at all
Noel Power [Fri, 27 Sep 2019 07:07:24 +0000 (08:07 +0100)]
s3: passdb: ret doesn't seem to be needed at all

I was looking at the wrong hunk when examining this, ret seems redundant
and the existing status can cover things

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct  1 00:28:44 UTC 2019 on sn-devel-184

4 years agos3/libsmb: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Thu, 15 Aug 2019 13:50:33 +0000 (14:50 +0100)]
s3/libsmb: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/libsmb/cliconnect.c:1877:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_NO_MEMORY;

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowinbind: provide passwd struct for group sid with ID_TYPE_BOTH mapping (again)
Michael Adam [Fri, 11 Jan 2019 09:44:30 +0000 (10:44 +0100)]
winbind: provide passwd struct for group sid with ID_TYPE_BOTH mapping (again)

https://git.samba.org/?p=samba.git;a=commitdiff;h=394622ef8c916cf361f8596dba4664dc8d6bfc9e
originally introduced the above feature.

This functionality was undone as part of "winbind: Restructure get_pwsid"
https://git.samba.org/?p=samba.git;a=commitdiff;h=bce19a6efe11980933531f0349c8f5212419366a
I think that this semantic change was accidential.

This patch undoes the semantic change and re-establishes the
functionality.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Sep 27 17:25:29 UTC 2019 on sn-devel-184

4 years agoselftest: Test ID_TYPE_BOTH with idmap_rid module
Christof Schmitt [Thu, 26 Sep 2019 00:19:27 +0000 (17:19 -0700)]
selftest: Test ID_TYPE_BOTH with idmap_rid module

ID_TYPE_BOTH means that each user and group has two mappings, a uid and
gid. In addition the calls to getpwent, getpwuid, getgrent and getgrgid
always return some information, so that uid and gid can be mapped to a
name. Establish a test to verify that the expected information is
returned.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3/libsmb: clang: Fix 'warning: Value stored to 'p' is never read'
Noel Power [Thu, 15 Aug 2019 13:30:29 +0000 (14:30 +0100)]
s3/libsmb: clang: Fix 'warning: Value stored to 'p' is never read'

Fixes:

source3/libsmb/cliconnect.c:649:2: warning: Value stored to 'p' is never read <--[clang]
        p += ret;
        ^    ~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 26 19:59:24 UTC 2019 on sn-devel-184

4 years agos3/passdb: clang: Value stored to 'c' is never read
Noel Power [Thu, 5 Sep 2019 14:42:41 +0000 (14:42 +0000)]
s3/passdb: clang: Value stored to 'c' is never read

source3/passdb/pdb_smbpasswd.c:405:4: warning: Value stored to 'c' is never read <--[clang]
                        c = '\0';
                        ^   ~~~~
/home/samba/samba/source3/passdb/pdb_smbpasswd.c:809:4: warning: Value stored to 'c' is never read <--[clang]
                        c = '\0';
                        ^   ~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/libsmb: clang: value stored to 'idx_current' is never read
Noel Power [Thu, 5 Sep 2019 14:16:57 +0000 (14:16 +0000)]
s3/libsmb: clang: value stored to 'idx_current' is never read

Fixes:

source3/libsmb/trusts_util.c:602:2: warning: Value stored to 'idx_current' is never read <--[clang]
        idx_current = idx;
        ^             ~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/passdb: clang: Fix warning: Value stored to 'acct_ctrl' is never read
Noel Power [Fri, 6 Sep 2019 13:46:40 +0000 (13:46 +0000)]
s3/passdb: clang: Fix warning: Value stored to 'acct_ctrl' is never read

Fixes:

source3/passdb/pdb_ldap.c:922:3: warning: Value stored to 'acct_ctrl' is never read <--[clang]
                acct_ctrl |= ACB_NORMAL;
                ^            ~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
Noel Power [Tue, 17 Sep 2019 14:43:20 +0000 (14:43 +0000)]
s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/lib/netapi/user.c:1290:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:1610:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

source3/lib/netapi/user.c:2990:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:3184:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:3522:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/rpc_client: clang: Fix 'Value stored during initialization is never read'
Noel Power [Tue, 17 Sep 2019 14:20:03 +0000 (14:20 +0000)]
s3/rpc_client: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/rpc_client/cli_winreg.c:728:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
/source3/rpc_client/cli_winreg.c:897:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib/talloc: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Tue, 17 Sep 2019 08:13:00 +0000 (08:13 +0000)]
lib/talloc: clang: Fix 'Value stored during its initialization is never read'

Fixes:

ib/talloc/pytalloc_util.c:245:8: warning: Value stored to 'type_obj' during its initialization is never read <--[clang]
        void *type_obj = talloc_check_name(ptr, type_name);
              ^~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/libads: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Tue, 17 Sep 2019 08:05:28 +0000 (08:05 +0000)]
s3/libads: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/libads/ldap.c:370:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/libads/ldap.c:417:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/libads/ldap.c:1783:13: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
                   ^~~   ~~~~~~~~~~~~~~~~~~~~~~~
source3/libads/ldap.c:1862:13: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
                   ^~~   ~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
Noel Power [Mon, 16 Sep 2019 10:43:54 +0000 (10:43 +0000)]
s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/lib/netapi/getdc.c:173:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
Noel Power [Mon, 16 Sep 2019 10:35:49 +0000 (10:35 +0000)]
s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/lib/netapi/group.c:1383:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
samba/source3/lib/netapi/group.c:1521:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
samba/source3/lib/netapi/group.c:1718:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
3 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/auth: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Fri, 13 Sep 2019 13:57:16 +0000 (13:57 +0000)]
s3/auth: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/auth/auth.c:38:35: warning: Value stored to 'entry' during its initialization is never read <--[clang]
        struct auth_init_function_entry *entry = auth_backends;
                                         ^~~~~   ~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/auth: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Fri, 13 Sep 2019 13:54:11 +0000 (13:54 +0000)]
s3/auth: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/auth/auth_util.c:283:11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
                 ^~~   ~~~~~~~~~~~~~~~~~~~~~~
source3/auth/auth_util.c:2005:11: warning: Value stored to 'nt_status' during its initialization is never read <--[clang]
        NTSTATUS nt_status = NT_STATUS_OK;
                 ^~~~~~~~~   ~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/libsmb: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Fri, 6 Sep 2019 14:59:51 +0000 (14:59 +0000)]
s3/libsmb: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/libsmb/dsgetdcname.c:1012:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

source3/libsmb/dsgetdcname.c:1099:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/libads: clang: Fix 'Value stored during initialization is never read'
Noel Power [Fri, 6 Sep 2019 14:50:37 +0000 (14:50 +0000)]
s3/libads: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/libads/ldap_utils.c:52:13: warning: Value stored to 'status' during its initialization is never read <--[clang]
        ADS_STATUS status = ADS_SUCCESS;
                   ^~~~~~   ~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/libads: clang: Fix 'Value stored to 'nt_status' is never read'
Noel Power [Fri, 6 Sep 2019 13:00:05 +0000 (13:00 +0000)]
s3/libads: clang: Fix 'Value stored to 'nt_status' is never read'

Fixes:

source3/libads/sasl.c:219:2: warning: Value stored to 'nt_status' is never read <--[clang]
        nt_status = NT_STATUS_MORE_PROCESSING_REQUIRED;
        ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/passed: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Thu, 5 Sep 2019 15:40:50 +0000 (15:40 +0000)]
s3/passed: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/passdb/passdb.c:2502:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_INTERNAL_ERROR;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/rpc_client: clang: 'Value stored during its initialization is never read'
Noel Power [Thu, 5 Sep 2019 14:48:47 +0000 (14:48 +0000)]
s3/rpc_client: clang: 'Value stored during its initialization is never read'

Fixes:

source3/rpc_client/util_netlogon.c:71:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~

source3/rpc_client/util_netlogon.c:199:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/rpc_client: clang: Fix 'Value stored during initialization is never read'
Noel Power [Thu, 5 Sep 2019 14:22:02 +0000 (14:22 +0000)]
s3/rpc_client: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/rpc_client/cli_lsarpc.c:182:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/passdb: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Thu, 5 Sep 2019 13:40:16 +0000 (13:40 +0000)]
s3/passdb: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/passdb/lookup_sid.c:836:11: warning: Value stored to 'result' during its initialization is never read <--[clang]
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/passdb: clang: Fix 'Value stored during initialization is never read'
Noel Power [Thu, 5 Sep 2019 13:36:22 +0000 (13:36 +0000)]
s3/passdb: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/passdb/pdb_interface.c:65:34: warning: Value stored to 'entry' during its initialization is never read <--[clang]
        struct pdb_init_function_entry *entry = backends;
                                        ^~~~~   ~~~~~~~~

/source3/passdb/pdb_interface.c:140:11: warning: Value stored to 'nt_status' during its initialization is never read <--[clang]
        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
                 ^~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/passdb: clang: Fix 'Value stored during initialization is never read'
Noel Power [Thu, 5 Sep 2019 13:34:05 +0000 (13:34 +0000)]
s3/passdb: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/passdb/pdb_tdb.c:718:18: warning: Value stored to 'nt_status' during its initialization is never read <--[clang]
        NTSTATUS        nt_status = NT_STATUS_UNSUCCESSFUL;
                        ^~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/passdb: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Thu, 15 Aug 2019 15:25:27 +0000 (16:25 +0100)]
s3/passdb: clang: Fix 'Value stored during its initialization is never read'

Fixes:

source3/passdb/pdb_util.c:41:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4/winbind: clang: Fixes 'Value stored during its initialization is never read'
Noel Power [Thu, 15 Aug 2019 14:57:26 +0000 (15:57 +0100)]
s4/winbind: clang: Fixes 'Value stored during its initialization is never read'

Fixes:

source4/winbind/idmap.c:214:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_NONE_MAPPED;

source4/winbind/idmap.c:397:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_NONE_MAPPED;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/rpc_client: clang: Fix 'Value stored during initialization is never read'
Noel Power [Thu, 15 Aug 2019 14:32:13 +0000 (15:32 +0100)]
s3/rpc_client: clang: Fix 'Value stored during initialization is never read'

Fixes:

source3/rpc_client/cli_pipe.c:397:11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        NTSTATUS ret = NT_STATUS_OK;
                 ^~~   ~~~~~~~~~~~~

source3/rpc_client/cli_pipe.c:1234:11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
        NTSTATUS ret = NT_STATUS_OK;
                 ^~~   ~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/groupdb: clang: 'Value stored during its initialization is never read'
Noel Power [Thu, 15 Aug 2019 14:29:03 +0000 (15:29 +0100)]
s3/groupdb: clang: 'Value stored during its initialization is never read'

Fixes:

source3/groupdb/mapping_tdb.c:460:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/groupdb: clang: Fix 'Value stored during its initialization is never read'
Noel Power [Thu, 15 Aug 2019 13:16:52 +0000 (14:16 +0100)]
s3/groupdb: clang: Fix 'Value stored during its initialization is never read'

Fixes:

ource3/groupdb/mapping.c:648:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4-torture: remove duplicate NDR_PRINT
Günther Deschner [Wed, 25 Sep 2019 04:53:34 +0000 (06:53 +0200)]
s4-torture: remove duplicate NDR_PRINT

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4-torture: dump ndr packet in ndr tests with high log level
Günther Deschner [Tue, 30 Aug 2016 17:37:18 +0000 (19:37 +0200)]
s4-torture: dump ndr packet in ndr tests with high log level

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibrpc/ndr: add ndr_print_netlogon_samlogon_response()
Günther Deschner [Tue, 24 Sep 2019 21:10:50 +0000 (23:10 +0200)]
librpc/ndr: add ndr_print_netlogon_samlogon_response()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: VFS: Complete the replacement of SMB_VFS_UNLINK() -> SMB_VFS_UNLINKAT().
Jeremy Allison [Wed, 18 Sep 2019 17:04:03 +0000 (10:04 -0700)]
s3: VFS: Complete the replacement of SMB_VFS_UNLINK() -> SMB_VFS_UNLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Sep 26 18:40:53 UTC 2019 on sn-devel-184

4 years agos3: VFS: vfs_full_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:23:04 +0000 (09:23 -0700)]
s3: VFS: vfs_full_audit: Remove unlink_fn. No longer used.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_tdb: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 17:02:16 +0000 (10:02 -0700)]
s3: VFS: vfs_acl_tdb: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_xattr: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 17:01:32 +0000 (10:01 -0700)]
s3: VFS: vfs_acl_xattr: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_posix_eadb: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 17:00:43 +0000 (10:00 -0700)]
s3: VFS: vfs_posix_eadb: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_ceph: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:59:54 +0000 (09:59 -0700)]
s3: VFS: vfs_ceph: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_glusterfs: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:59:03 +0000 (09:59 -0700)]
s3: VFS: vfs_glusterfs: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_depot: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:57:59 +0000 (09:57 -0700)]
s3: VFS: vfs_streams_depot: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_syncops: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:56:53 +0000 (09:56 -0700)]
s3: VFS: vfs_syncops: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:54:10 +0000 (09:54 -0700)]
s3: VFS: vfs_fruit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_recycle: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 16:22:38 +0000 (09:22 -0700)]
s3: VFS: vfs_recycle: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_unityed_media: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:18:07 +0000 (19:18 -0700)]
s3: VFS: vfs_unityed_media: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_xattr_tdb: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:16:31 +0000 (19:16 -0700)]
s3: VFS: vfs_xattr_tdb: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_virusfilter: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:15:38 +0000 (19:15 -0700)]
s3: VFS: vfs_virusfilter: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_time_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:14:22 +0000 (19:14 -0700)]
s3: VFS: vfs_time_audit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:13:05 +0000 (19:13 -0700)]
s3: VFS: vfs_streams_xattr: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_snapper: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:05:27 +0000 (19:05 -0700)]
s3: VFS: vfs_snapper: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_shadow_copy2: Remove unlink_fn. No longer used.
Jeremy Allison [Wed, 18 Sep 2019 02:04:38 +0000 (19:04 -0700)]
s3: VFS: vfs_shadow_copy2: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_media_harmony: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:04:06 +0000 (18:04 -0700)]
s3: VFS: vfs_media_harmony: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_extd_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:03:10 +0000 (18:03 -0700)]
s3: VFS: vfs_extd_audit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_ceph_snapshots: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:02:06 +0000 (18:02 -0700)]
s3: VFS: vfs_ceph_snapshots: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_catia: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:01:26 +0000 (18:01 -0700)]
s3: VFS: vfs_catia: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_cap: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 01:00:31 +0000 (18:00 -0700)]
s3: VFS: vfs_cap: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_audit: Remove unlink_fn. No longer used.
Jeremy Allison [Tue, 17 Sep 2019 00:59:25 +0000 (17:59 -0700)]
s3: VFS: vfs_audit: Remove unlink_fn. No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: lib: adouble: Add dirfsp to ad_convert_delete_adfile(). Use UNLINKAT instead...
Jeremy Allison [Mon, 16 Sep 2019 22:15:05 +0000 (15:15 -0700)]
s3: lib: adouble: Add dirfsp to ad_convert_delete_adfile(). Use UNLINKAT instead of UNLINK.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: lib: adouble: Add struct files_struct *dirfsp parameter to ad_convert().
Jeremy Allison [Fri, 13 Sep 2019 21:52:00 +0000 (14:52 -0700)]
s3: lib: adouble: Add struct files_struct *dirfsp parameter to ad_convert().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Change delete_invalid_meta_stream() to use UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 21:21:28 +0000 (14:21 -0700)]
s3: VFS: vfs_fruit. Change delete_invalid_meta_stream() to use UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Change fruit_pread_meta_stream() to use UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 21:19:21 +0000 (14:19 -0700)]
s3: VFS: vfs_fruit. Change fruit_pread_meta_stream() to use UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_ad...
Jeremy Allison [Fri, 13 Sep 2019 21:11:46 +0000 (14:11 -0700)]
s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_adouble() and convert to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_st...
Jeremy Allison [Fri, 13 Sep 2019 21:10:16 +0000 (14:10 -0700)]
s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_stream() and convert to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_rsrc().
Jeremy Allison [Fri, 13 Sep 2019 21:08:08 +0000 (14:08 -0700)]
s3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_rsrc().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_meta_st...
Jeremy Allison [Fri, 13 Sep 2019 20:46:00 +0000 (13:46 -0700)]
s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_meta_stream() and convert to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_meta().
Jeremy Allison [Fri, 13 Sep 2019 20:44:21 +0000 (13:44 -0700)]
s3: VFS: vfs_fruit. Add files_struct *dirfsp parameter to fruit_unlink_meta().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Convert fruit_rmdir_internal() to UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 20:43:29 +0000 (13:43 -0700)]
s3: VFS: vfs_fruit: Convert fruit_rmdir_internal() to UNLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Add dirfsp files_struct pointer parameter to fruit_rmdir_internal().
Jeremy Allison [Fri, 13 Sep 2019 20:30:19 +0000 (13:30 -0700)]
s3: VFS: vfs_fruit: Add dirfsp files_struct pointer parameter to fruit_rmdir_internal().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit: Wrap fruit_rmdir() so we can add parameters.
Jeremy Allison [Fri, 13 Sep 2019 20:24:23 +0000 (13:24 -0700)]
s3: VFS: vfs_fruit: Wrap fruit_rmdir() so we can add parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Change fruit_unlink_internal() to call UNLNKAT.
Jeremy Allison [Fri, 13 Sep 2019 20:20:36 +0000 (13:20 -0700)]
s3: VFS: vfs_fruit. Change fruit_unlink_internal() to call UNLNKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Add files_struct *dirfsp to fruit_unlink_internal() so we can...
Jeremy Allison [Fri, 13 Sep 2019 20:18:28 +0000 (13:18 -0700)]
s3: VFS: vfs_fruit. Add files_struct *dirfsp to fruit_unlink_internal() so we can call UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_fruit. Wrap Convert fruit_unlink() -> fruit_unlink_internal() so we...
Jeremy Allison [Fri, 13 Sep 2019 20:16:19 +0000 (13:16 -0700)]
s3: VFS: vfs_fruit. Wrap Convert fruit_unlink() -> fruit_unlink_internal() so we can add parameters.

Make fruit_unlink() a wrapper calling the internal version.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change rmdir_internals() to call SMB_VFS_UNLINKAT() in 2 places.
Jeremy Allison [Fri, 13 Sep 2019 19:34:31 +0000 (12:34 -0700)]
s3: smbd: Change rmdir_internals() to call SMB_VFS_UNLINKAT() in 2 places.

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change recursive_rmdir() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 19:29:41 +0000 (12:29 -0700)]
s3: smbd: Change recursive_rmdir() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change close_remove_share_mode() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 19:25:10 +0000 (12:25 -0700)]
s3: smbd: Change close_remove_share_mode() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change delete_all_streams() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 19:23:02 +0000 (12:23 -0700)]
s3: smbd: Change delete_all_streams() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change smb_set_file_unix_basic() to call SMB_VFS_UNLINKAT() in 3 places.
Jeremy Allison [Fri, 13 Sep 2019 18:33:53 +0000 (11:33 -0700)]
s3: smbd: Change smb_set_file_unix_basic() to call SMB_VFS_UNLINKAT() in 3 places.

Use conn->cwd_fsp as current fsp. This is horrible code and must
be removed.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: pysmbd: Change py_smbd_unlink() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 18:22:06 +0000 (11:22 -0700)]
s3: pysmbd: Change py_smbd_unlink() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change remove_msdfs_link() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 18:20:36 +0000 (11:20 -0700)]
s3: smbd: Change remove_msdfs_link() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Change create_msdfs_link() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 18:17:45 +0000 (11:17 -0700)]
s3: smbd: Change create_msdfs_link() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp. Rework to modern standards.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT().
Jeremy Allison [Fri, 13 Sep 2019 17:56:30 +0000 (10:56 -0700)]
s3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_common: Convert unlink_acl_common(), acl_common_remove_object()...
Jeremy Allison [Tue, 17 Sep 2019 00:54:00 +0000 (17:54 -0700)]
s3: VFS: vfs_acl_common: Convert unlink_acl_common(), acl_common_remove_object() to UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common().
Jeremy Allison [Tue, 17 Sep 2019 00:50:17 +0000 (17:50 -0700)]
s3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_acl_xattr: Don't call unlink_acl_common() directly.
Jeremy Allison [Tue, 17 Sep 2019 00:44:33 +0000 (17:44 -0700)]
s3: VFS: vfs_acl_xattr: Don't call unlink_acl_common() directly.

Use a wrapper function so we can change the parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_virusfilter: Change UNLINK -> UNLINKAT in infected_file_action_delete()
Jeremy Allison [Tue, 17 Sep 2019 00:41:10 +0000 (17:41 -0700)]
s3: VFS: vfs_virusfilter: Change UNLINK -> UNLINKAT in infected_file_action_delete()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_posix_eadb: Wrap posix_eadb_unlink() into a call to posix_eadb_unlink_in...
Jeremy Allison [Thu, 19 Sep 2019 17:32:41 +0000 (10:32 -0700)]
s3: VFS: vfs_posix_eadb: Wrap posix_eadb_unlink() into a call to posix_eadb_unlink_internal().

Allows UNLINKAT parameters to be passed. Change posix_eadb_unlink_internal()
to call UNLINKAT instead of UNLINK.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_audit. Implement unlinkat().
Jeremy Allison [Tue, 17 Sep 2019 00:57:25 +0000 (17:57 -0700)]
s3: VFS: vfs_audit. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_virusfilter. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:16:55 +0000 (14:16 -0700)]
s3: VFS: vfs_virusfilter. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_unityed_media. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:14:01 +0000 (14:14 -0700)]
s3: VFS: vfs_unityed_media. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_time_audit. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:11:20 +0000 (14:11 -0700)]
s3: VFS: vfs_time_audit. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_syncops. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:09:27 +0000 (14:09 -0700)]
s3: VFS: vfs_syncops. Implement unlinkat().

This is identical to unlink(), as there
are no special cases needed for rmdir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr: Convert streams_xattr_unlink_internal() to use UNLINKAT.
Jeremy Allison [Wed, 18 Sep 2019 02:10:24 +0000 (19:10 -0700)]
s3: VFS: vfs_streams_xattr: Convert streams_xattr_unlink_internal() to use UNLINKAT.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr. Wrap Convert streams_xattr_unlink() -> streams_xattr_unli...
Jeremy Allison [Wed, 18 Sep 2019 02:08:26 +0000 (19:08 -0700)]
s3: VFS: vfs_streams_xattr. Wrap Convert streams_xattr_unlink() -> streams_xattr_unlink_internal() so we can add parameters.

Make streams_xattr_unlink() a wrapper calling the internal version.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: VFS: vfs_streams_xattr. Implement unlinkat().
Jeremy Allison [Thu, 12 Sep 2019 21:00:24 +0000 (14:00 -0700)]
s3: VFS: vfs_streams_xattr. Implement unlinkat().

Note this isn't identical to unlink() as
this must cope with (flags & AT_REMOVEDIR),
which is identical to rmdir(). It calls
either unlink or rmdir depending on the
flags parameter.

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