[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Wed Sep 30 22:09:02 UTC 2020
The branch, master has been updated
via a9186829eb2 s3: smbd: Remove unused check_path_syntax_wcard().
via f9321ed7dd7 s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from parse_dfs_path().
via 25ef25528e6 s3: smbd: Implement the 'allow_wcards' parameter inside parse_dfs_path().
via b7bb348bfe7 s3: smbd: Remove wrapper resolve_dfspath_wcard(). Just call dfs_redirect() directly.
via e7bb8075d24 s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from dfs_redirect()
via e59c810f265 s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from resolve_dfspath_wcard()
via b3334eb9d86 s3: smbd: Remove the 'bool *ppath_contains_wcard' parameter from filename_convert_internal()
via eb60ed6b5ed s3: smbd: The only caller of filename_convert_with_privilege() passes in NULL for the 'bool *ppath_contains_wcard' parameter.
via ff4e8b2c841 s3: smbd: All callers to filename_convert() pass in NULL for the 'bool *ppath_contains_wcard' parameter.
via 4d7cdefb9d1 s3: smbd: As srvstr_get_path_internal() ignores the wcard parameter, use check_path_syntax() instead of check_path_syntax_wcard()
via 5ea69c262dd s3: smbd: Rename srvstr_get_path_wcard_internal() -> srvstr_get_path_internal().
via 7a1839ab735 s3: smbd: All callers to srvstr_get_path_wcard_internal() pass 'ignore' as the last parameter.
via 9392b13dff6 s3: smbd: Remove the wrapper srvstr_get_path_req_wcard().
via 26e8bd7e1ee s3: smbd: Remove srvstr_get_path_wcard() - no longer used.
via 4f0ecc7dcc6 s3: smbd: srvstr_get_path_wcard_posix() is no longer used.
via 9c16729a7b8 s3: smbd: smb_file_rename_information() doesn't need to use the wildcard status of the destination.
via bf966dc2ca0 s3: smbd: SMB1 call_nt_transact_rename() never needs wcard bool.
via 08d029c2902 s3: smbd: SMB1 reply_copy(). Use srvstr_get_path_req() not srvstr_get_path_req_wcard()
via 9269e9c232f s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names.
via 079aec9d09e s3: smbd: SMB1 reply_mv() no longer needs the XX_has_wcard variables.
via b89c0a6d3f4 s3: smbd: SMB1 rename_internals() can figure out the wildcard status of the paths by itself.
via 83b17f4f3e1 s3: smbd: SMB1 reply_unlink() - use srvstr_get_path_req() not srvstr_get_path_req_wcard()
via 0fbce948631 s3: smbd: SMB1 call_trans2findnext() doesn't need the mask_contains_wcard bool.
via ed0c07e298c s3: smbd: SMB1 call_trans2findfirst(). Don't need the wildcard status of the mask here.
via 96b9842e31f s3: smbd: unlink_internals() can figure out if the mask has a wildcard on its own.
via 49be6d38671 s3: smbd: SMB1 reply_fclose() doesn't need wcard, use srvstr_get_path_req() not srvstr_get_path_req_wcard().
via edee7198d97 s3: smbd: SMB1 reply_search(). Use srvstr_get_path_req() not srvstr_get_path_req_wcard()
via e3611cc05f8 s3: smbd: SMB1 reply_search(). The dptr already knows if the mask has a wildcard.
via 97a4dfbd4a3 s3: smbd: SMB1 reply_search() doesn't actually care if the mask contains a wildcard or not.
via 078f2d94563 s3: smbd: In SMB2 query directory we don't need to do full path resolution of the mask component.
via 525ccadd641 s3: smbd: srvstr_get_path_req_wcard() is now static to reply.c
via db20ef392e7 s3: smbd: SMB1 reply_ntrename() - now we set dest_has_wcard separately we don't need to pass it to filename_convert().
via f43c04164db s3: smbd: SMB1 reply_ntrename() - now we set dest_has_wcard separately we can use srvstr_get_path_req() instead of srvstr_get_path_req_wcard().
via c518111e117 s3: smbd: SMB1 reply_ntrename() - set dest_has_wcard from the parsed last component.
via 71c4c96d978 s3: smbd: SMB1 reply_ntrename() - Move the call to get_original_lcomp() to before filename_convert() for the destination name.
via b7ca811ef53 s3: smbd: SMB1 reply_ntrename() - the source cannot have a wildcard.
via 5547cc803c1 s3: smbd: SMB1 comment out unused UCF_COND_ALLOW_WCARD_LCOMP flag.
via e188b74aa9b s3: smbd: SMB1 Remove the crazy semantics in filename_convert_internal() using UCF_COND_ALLOW_WCARD_LCOMP.
via 8d11a87ea13 s3: smbd: MS-DFS - We no longer ever set UCF_COND_ALLOW_WCARD_LCOMP so don't check for it.
via 5082423f182 s3: smbd: SMB1 reply_ntrename() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
via 10e034ec21f s3: smbd: SMB1 reply_copy() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
via 38bdb082b89 s3: smbd: SMB1 reply_mv() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
via 93fcb44961c s3: smbd: SMB1 reply_unlink() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
via 33fffcd2702 s3: smbd: dptr_create() doesn't need a separate wcard_has_wild parameter.
from b8653f4ee7a Restrict GSSAPI query to the krb5 mechanism
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a9186829eb2b2365a91d870d8c04fe3506366f18
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 17:18:59 2020 -0700
s3: smbd: Remove unused check_path_syntax_wcard().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Wed Sep 30 22:08:01 UTC 2020 on sn-devel-184
commit f9321ed7dd77e48af5c8707b843a2c93082d3ba1
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 17:14:22 2020 -0700
s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from parse_dfs_path().
check_path_syntax_wcard() is now unused.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 25ef25528e698976ada97e71ecb021cac201aaf1
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 17:11:47 2020 -0700
s3: smbd: Implement the 'allow_wcards' parameter inside parse_dfs_path().
Previously this didn't actually restrict wildcards here, as check_path_syntax_wcard()
returns the fact there was a wildcard in the last component, but doesn't
return an error. Just use check_path_syntax() instead and check
for wildcards separately.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b7bb348bfe7a2cfda52a9c4ef8b64bb9f057b0a0
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:24:10 2020 -0700
s3: smbd: Remove wrapper resolve_dfspath_wcard(). Just call dfs_redirect() directly.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e7bb8075d2404c3dd798447b79842c0a8e2af898
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:21:08 2020 -0700
s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from dfs_redirect()
resolve_dfspath_wcard() is now a tranparent wrapper for dfs_redirect().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e59c810f2654fdd34f78376d46f559d17d86ec06
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:17:35 2020 -0700
s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from resolve_dfspath_wcard()
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b3334eb9d86ea146e5ae6eb7ced59ad564d88ba5
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:12:41 2020 -0700
s3: smbd: Remove the 'bool *ppath_contains_wcard' parameter from filename_convert_internal()
It's always ignored.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit eb60ed6b5ed12f144642b58203d5d37ab81fe20b
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:09:55 2020 -0700
s3: smbd: The only caller of filename_convert_with_privilege() passes in NULL for the 'bool *ppath_contains_wcard' parameter.
Remove it.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit ff4e8b2c841ac2d901faeac42f8625110440b56a
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:08:09 2020 -0700
s3: smbd: All callers to filename_convert() pass in NULL for the 'bool *ppath_contains_wcard' parameter.
Remove it.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 4d7cdefb9d1454fa5975def03d40910b606c4d99
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 17:16:26 2020 -0700
s3: smbd: As srvstr_get_path_internal() ignores the wcard parameter, use check_path_syntax() instead of check_path_syntax_wcard()
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 5ea69c262dde34c2b107477c171ab0b948fe800d
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:01:57 2020 -0700
s3: smbd: Rename srvstr_get_path_wcard_internal() -> srvstr_get_path_internal().
It now does nothing with wildcards.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 7a1839ab7350f502383da0040778ccee6243382f
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 14:01:01 2020 -0700
s3: smbd: All callers to srvstr_get_path_wcard_internal() pass 'ignore' as the last parameter.
Move it internal to srvstr_get_path_wcard_internal().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 9392b13dff69effb0f76fff4074d20e06f249feb
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:58:22 2020 -0700
s3: smbd: Remove the wrapper srvstr_get_path_req_wcard().
Rename srvstr_get_path_req_wcard() -> srvstr_get_path_req()
as it no longer gets ward status.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 26e8bd7e1eee76917e039783ed43ac5b02e5b89c
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:51:46 2020 -0700
s3: smbd: Remove srvstr_get_path_wcard() - no longer used.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 4f0ecc7dcc61dce7f99fbb11fcdbb20fb6e02b40
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:48:57 2020 -0700
s3: smbd: srvstr_get_path_wcard_posix() is no longer used.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 9c16729a7b8ba7d958d85dba300fedcec9098a1d
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:47:08 2020 -0700
s3: smbd: smb_file_rename_information() doesn't need to use the wildcard status of the destination.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit bf966dc2ca0a96e6ef6e35483dfeebef5e0f9090
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:44:15 2020 -0700
s3: smbd: SMB1 call_nt_transact_rename() never needs wcard bool.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 08d029c2902dd70fe64e08e6fb212ae7cbb0882c
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:26:02 2020 -0700
s3: smbd: SMB1 reply_copy(). Use srvstr_get_path_req() not srvstr_get_path_req_wcard()
Now we check the wildcard status elsewhere. Don't pass to filename_convert() either.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 9269e9c232f0ef9e402f70875381e47ca3a1c9c9
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:24:29 2020 -0700
s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 079aec9d09ee0be72a635ce17aa97686239df4f4
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:09:52 2020 -0700
s3: smbd: SMB1 reply_mv() no longer needs the XX_has_wcard variables.
Use srvstr_get_path_req() not srvstr_get_path_req_wcard().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b89c0a6d3f456fe597949b660a3c2ddbbad2be42
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:08:01 2020 -0700
s3: smbd: SMB1 rename_internals() can figure out the wildcard status of the paths by itself.
No need to pass them as parameters.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 83b17f4f3e11cb47b57e10569a5f2cc18730e361
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 12:32:02 2020 -0700
s3: smbd: SMB1 reply_unlink() - use srvstr_get_path_req() not srvstr_get_path_req_wcard()
Now unlink_internals() checks its own wildcard on the mask.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 0fbce9486311f6ef710c747169b03560f3c4cc1d
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:40:12 2020 -0700
s3: smbd: SMB1 call_trans2findnext() doesn't need the mask_contains_wcard bool.
dptr already knows this.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit ed0c07e298c2122fc2ef0ded9833bd5a6592eb9e
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 13:31:21 2020 -0700
s3: smbd: SMB1 call_trans2findfirst(). Don't need the wildcard status of the mask here.
dptr_create() can work this out all on its own.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 96b9842e31f975500f37373af1543214f078188e
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 12:30:53 2020 -0700
s3: smbd: unlink_internals() can figure out if the mask has a wildcard on its own.
Doesn't need a parameter for that.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 49be6d38671c00e1d818d92dfda36f74cfd1a2e4
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 12:14:11 2020 -0700
s3: smbd: SMB1 reply_fclose() doesn't need wcard, use srvstr_get_path_req() not srvstr_get_path_req_wcard().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit edee7198d9745899408bdb9de3153fc5484892f0
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 12:07:39 2020 -0700
s3: smbd: SMB1 reply_search(). Use srvstr_get_path_req() not srvstr_get_path_req_wcard()
If we have a wildcard is found by other means now.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e3611cc05f8ffcaa2a955aa2c2754d2ae6bff8d9
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 12:05:53 2020 -0700
s3: smbd: SMB1 reply_search(). The dptr already knows if the mask has a wildcard.
Get the value from the dptr instead.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 97a4dfbd4a3184cac49dceb1ef0b016e891f96d2
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:49:01 2020 -0700
s3: smbd: SMB1 reply_search() doesn't actually care if the mask contains a wildcard or not.
Don't pass to filename_convert().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 078f2d94563922cdba01d609efad3d668e2115d8
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:36:50 2020 -0700
s3: smbd: In SMB2 query directory we don't need to do full path resolution of the mask component.
get_original_lcomp() does all the name canonicalization required for the mask.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 525ccadd641260f8c8f3229341927de04a4fe046
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:13:03 2020 -0700
s3: smbd: srvstr_get_path_req_wcard() is now static to reply.c
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit db20ef392e7ca820e370e27c61c7a528bbc8f2eb
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:11:43 2020 -0700
s3: smbd: SMB1 reply_ntrename() - now we set dest_has_wcard separately we don't need to pass it to filename_convert().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit f43c04164db3a93b4eb5715d6626ff3dd18d806a
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:10:19 2020 -0700
s3: smbd: SMB1 reply_ntrename() - now we set dest_has_wcard separately we can use srvstr_get_path_req() instead of srvstr_get_path_req_wcard().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit c518111e1178e55fcb1f66d974b7a37a4cdbe05e
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:06:54 2020 -0700
s3: smbd: SMB1 reply_ntrename() - set dest_has_wcard from the parsed last component.
We eventually want to remove the last_component_has_wcard out of the srvstr_get_pathXXX()
calls and just use srvstr_get_path_req().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 71c4c96d97888588b78bddee495106ac08745fb2
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:47:42 2020 -0700
s3: smbd: SMB1 reply_ntrename() - Move the call to get_original_lcomp() to before filename_convert() for the destination name.
Simple code re-arrangement to make the next change clear.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b7ca811ef53955d4e931bd258f47d677070afa2c
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:45:55 2020 -0700
s3: smbd: SMB1 reply_ntrename() - the source cannot have a wildcard.
Simplify the wildcard processing of the source name.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 5547cc803c1c6d94d1b6352e613a1dfbe00e64f9
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:12:23 2020 -0700
s3: smbd: SMB1 comment out unused UCF_COND_ALLOW_WCARD_LCOMP flag.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e188b74aa9bea5ab443d7c96d9b108c1268aa52e
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:10:32 2020 -0700
s3: smbd: SMB1 Remove the crazy semantics in filename_convert_internal() using UCF_COND_ALLOW_WCARD_LCOMP.
In the places where wildcards are allowed in SMB1
we always pass in UCF_ALWAYS_ALLOW_WCARD_LCOMP.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 8d11a87ea13101962420e38a5cf96bf03f8ca0b6
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:08:45 2020 -0700
s3: smbd: MS-DFS - We no longer ever set UCF_COND_ALLOW_WCARD_LCOMP so don't check for it.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 5082423f182c32f71cda2ec1e0f1edb5526b5b86
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:07:36 2020 -0700
s3: smbd: SMB1 reply_ntrename() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
There's either a wildcard in the last component or not. Always use
UCF_ALWAYS_ALLOW_WCARD_LCOMP for calls that can take a wildcard.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 10e034ec21fc2fe1a3a23a769f17623b330c83e4
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:06:04 2020 -0700
s3: smbd: SMB1 reply_copy() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
There's either a wildcard in the last component or not. Always use
UCF_ALWAYS_ALLOW_WCARD_LCOMP for calls that can take a wildcard.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 38bdb082b897e1b8e0fb3e36e815b6c447e42b84
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:04:51 2020 -0700
s3: smbd: SMB1 reply_mv() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
There's either a wildcard in the last component or not. Always use
UCF_ALWAYS_ALLOW_WCARD_LCOMP for calls that can take a wildcard.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 93fcb44961c78c0850cf8815ad10e64336230d35
Author: Jeremy Allison <jra at samba.org>
Date: Mon Sep 28 20:03:08 2020 -0700
s3: smbd: SMB1 reply_unlink() - the UCF_COND_ALLOW_WCARD_LCOMP makes no sense.
There's either a wildcard in the last component or not. Always use
UCF_ALWAYS_ALLOW_WCARD_LCOMP for calls that can take a wildcard.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 33fffcd2702f4559f093a3253a3d06c98c47cfdc
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 29 11:58:54 2020 -0700
s3: smbd: dptr_create() doesn't need a separate wcard_has_wild parameter.
It can figure this out by itself.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/printing/nt_printing.c | 2 +-
source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 -
source3/smbd/dir.c | 3 +-
source3/smbd/filename.c | 39 ++----
source3/smbd/msdfs.c | 72 ++--------
source3/smbd/nttrans.c | 57 ++++----
source3/smbd/proto.h | 43 +-----
source3/smbd/reply.c | 224 ++++++++++--------------------
source3/smbd/smb2_create.c | 3 +-
source3/smbd/smb2_query_directory.c | 38 -----
source3/smbd/smbd.h | 2 +-
source3/smbd/trans2.c | 57 ++------
12 files changed, 147 insertions(+), 395 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 355953fa222..e57ff3404de 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2040,7 +2040,7 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
goto err_out;
}
- status = unlink_internals(conn, NULL, 0, smb_fname, false);
+ status = unlink_internals(conn, NULL, 0, smb_fname);
err_out:
talloc_free(tmp_ctx);
return status;
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 6d955269ab0..2f18127b03b 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2420,7 +2420,6 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
r->in.file,
ucf_flags,
0,
- NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(nt_status)) {
werr = ntstatus_to_werror(nt_status);
@@ -2556,7 +2555,6 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
r->in.file,
ucf_flags,
0,
- NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(nt_status)) {
werr = ntstatus_to_werror(nt_status);
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 41c760ec943..6a2538549e4 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -204,7 +204,6 @@ NTSTATUS dptr_create(connection_struct *conn,
bool expect_close,
uint16_t spid,
const char *wcard,
- bool wcard_has_wild,
uint32_t attr,
struct dptr_struct **dptr_ret)
{
@@ -261,7 +260,7 @@ NTSTATUS dptr_create(connection_struct *conn,
(wcard[0] == '.' && wcard[1] == 0)) {
dptr->has_wild = True;
} else {
- dptr->has_wild = wcard_has_wild;
+ dptr->has_wild = ms_has_wild(dptr->wcard);
}
dptr->attr = attr;
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 73ea63ffd25..00e5d93cc95 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -487,8 +487,8 @@ Note NT_STATUS_OK doesn't mean the name exists or is valid, just that we
didn't get any fatal errors that should immediately terminate the calling SMB
processing whilst resolving.
-If UCF_ALWAYS_ALLOW_WCARD_LCOMP is passed in, then a MS wildcard was detected
-and should be allowed in the last component of the path only.
+If UCF_ALWAYS_ALLOW_WCARD_LCOMP is passed in, then a MS wildcard
+should be allowed in the last component of the path only.
If the orig_path was a stream, smb_filename->base_name will point to the base
filename, and smb_filename->stream_name will point to the stream name. If
@@ -1823,15 +1823,14 @@ char *get_original_lcomp(TALLOC_CTX *ctx,
NTSTATUS status;
if (ucf_flags & UCF_DFS_PATHNAME) {
- status = resolve_dfspath_wcard(ctx,
+ status = dfs_redirect(ctx,
conn,
filename_in,
ucf_flags,
!conn->sconn->using_smb2,
- &fname,
- NULL);
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
- DBG_DEBUG("resolve_dfspath "
+ DBG_DEBUG("dfs_redirect "
"failed for name %s with %s\n",
filename_in,
nt_errstr(status));
@@ -1901,9 +1900,6 @@ char *get_original_lcomp(TALLOC_CTX *ctx,
* @param smbreq SMB request if we're using privileges.
* @param name_in The unconverted name.
* @param ucf_flags flags to pass through to unix_convert().
- * UCF_ALWAYS_ALLOW_WCARD_LCOMP will be OR'd in if
- * p_cont_wcard != NULL and is true and
- * UCF_COND_ALLOW_WCARD_LCOMP.
* @param twrp Optional VSS time
* @param p_cont_wcard If not NULL, will be set to true if the dfs path
* resolution detects a wildcard.
@@ -1919,7 +1915,6 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx,
const char *name_in,
uint32_t ucf_flags,
NTTIME twrp,
- bool *ppath_contains_wcard,
struct smb_filename **_smb_fname)
{
struct smb_filename *smb_fname = NULL;
@@ -1928,25 +1923,20 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx,
*_smb_fname = NULL;
if (ucf_flags & UCF_DFS_PATHNAME) {
- bool path_contains_wcard = false;
char *fname = NULL;
- status = resolve_dfspath_wcard(ctx, conn,
+ status = dfs_redirect(ctx, conn,
name_in,
ucf_flags,
!conn->sconn->using_smb2,
- &fname,
- &path_contains_wcard);
+ &fname);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10,("filename_convert_internal: resolve_dfspath "
+ DEBUG(10,("filename_convert_internal: dfs_redirect "
"failed for name %s with %s\n",
name_in,
nt_errstr(status) ));
return status;
}
name_in = fname;
- if (ppath_contains_wcard != NULL && path_contains_wcard) {
- *ppath_contains_wcard = path_contains_wcard;
- }
ucf_flags &= ~UCF_DFS_PATHNAME;
}
@@ -1962,15 +1952,6 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx,
return NT_STATUS_OK;
}
- /*
- * If the caller conditionally allows wildcard lookups, only add the
- * always allow if the path actually does contain a wildcard.
- */
- if (ucf_flags & UCF_COND_ALLOW_WCARD_LCOMP &&
- ppath_contains_wcard != NULL && *ppath_contains_wcard) {
- ucf_flags |= UCF_ALWAYS_ALLOW_WCARD_LCOMP;
- }
-
status = unix_convert(ctx, conn, name_in, twrp, &smb_fname, ucf_flags);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10,("filename_convert_internal: unix_convert failed "
@@ -2021,7 +2002,6 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx,
const char *name_in,
uint32_t ucf_flags,
NTTIME twrp,
- bool *ppath_contains_wcard,
struct smb_filename **pp_smb_fname)
{
return filename_convert_internal(ctx,
@@ -2030,7 +2010,6 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx,
name_in,
ucf_flags,
twrp,
- ppath_contains_wcard,
pp_smb_fname);
}
@@ -2044,7 +2023,6 @@ NTSTATUS filename_convert_with_privilege(TALLOC_CTX *ctx,
struct smb_request *smbreq,
const char *name_in,
uint32_t ucf_flags,
- bool *ppath_contains_wcard,
struct smb_filename **pp_smb_fname)
{
return filename_convert_internal(ctx,
@@ -2053,6 +2031,5 @@ NTSTATUS filename_convert_with_privilege(TALLOC_CTX *ctx,
name_in,
ucf_flags,
0,
- ppath_contains_wcard,
pp_smb_fname);
}
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 2c31e2b960a..b5c1ccdb846 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -58,8 +58,7 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
const char *pathname,
bool allow_wcards,
bool allow_broken_path,
- struct dfs_path *pdp, /* MUST BE TALLOCED */
- bool *ppath_contains_wcard)
+ struct dfs_path *pdp) /* MUST BE TALLOCED */
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
@@ -208,20 +207,19 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
local_path:
- *ppath_contains_wcard = False;
-
pdp->reqpath = p;
/* Rest is reqpath. */
if (pdp->posix_path) {
status = check_path_syntax_posix(pdp->reqpath);
} else {
- if (allow_wcards) {
- status = check_path_syntax_wcard(pdp->reqpath,
- ppath_contains_wcard);
- } else {
- status = check_path_syntax(pdp->reqpath);
+ if (!allow_wcards) {
+ bool has_wcard = ms_has_wild(pdp->reqpath);
+ if (has_wcard) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
}
+ status = check_path_syntax(pdp->reqpath);
}
if (!NT_STATUS_IS_OK(status)) {
@@ -703,9 +701,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
if (NT_STATUS_IS_OK(status)) {
/* XX_ALLOW_WCARD_XXX is called from search functions. */
- if (ucf_flags &
- (UCF_COND_ALLOW_WCARD_LCOMP|
- UCF_ALWAYS_ALLOW_WCARD_LCOMP)) {
+ if (ucf_flags & UCF_ALWAYS_ALLOW_WCARD_LCOMP) {
DEBUG(6,("dfs_path_lookup (FindFirst) No redirection "
"for dfs link %s.\n", dfspath));
status = NT_STATUS_OK;
@@ -818,19 +814,17 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
returned to the client.
*****************************************************************/
-static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
+NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
connection_struct *conn,
const char *path_in,
uint32_t ucf_flags,
bool allow_broken_path,
- char **pp_path_out,
- bool *ppath_contains_wcard)
+ char **pp_path_out)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
NTSTATUS status;
- bool search_wcard_flag = (ucf_flags &
- (UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP));
+ bool search_wcard_flag = (ucf_flags & UCF_ALWAYS_ALLOW_WCARD_LCOMP);
struct dfs_path *pdp = talloc(ctx, struct dfs_path);
if (!pdp) {
@@ -838,8 +832,7 @@ static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
}
status = parse_dfs_path(conn, path_in, search_wcard_flag,
- allow_broken_path, pdp,
- ppath_contains_wcard);
+ allow_broken_path, pdp);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(pdp);
return status;
@@ -978,7 +971,6 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
struct connection_struct *conn = NULL;
int snum;
NTSTATUS status = NT_STATUS_NOT_FOUND;
- bool dummy;
struct dfs_path *pdp = talloc_zero(frame, struct dfs_path);
if (!pdp) {
@@ -988,8 +980,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
*self_referralp = False;
- status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path,
- pdp, &dummy);
+ status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path, pdp);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(frame);
return status;
@@ -1231,15 +1222,13 @@ bool create_junction(TALLOC_CTX *ctx,
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
int snum;
- bool dummy;
struct dfs_path *pdp = talloc(ctx,struct dfs_path);
NTSTATUS status;
if (!pdp) {
return False;
}
- status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path,
- pdp, &dummy);
+ status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path, pdp);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
@@ -1806,36 +1795,3 @@ struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx,
}
return jn;
}
-
-/******************************************************************************
- Core function to resolve a dfs pathname possibly containing a wildcard. If
- ppath_contains_wcard != NULL, it will be set to true if a wildcard is
- detected during dfs resolution.
-******************************************************************************/
-
-NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
- connection_struct *conn,
- const char *name_in,
- uint32_t ucf_flags,
- bool allow_broken_path,
- char **pp_name_out,
- bool *ppath_contains_wcard)
-{
- bool path_contains_wcard = false;
- NTSTATUS status = NT_STATUS_OK;
-
- status = dfs_redirect(ctx,
- conn,
- name_in,
- ucf_flags,
- allow_broken_path,
- pp_name_out,
- &path_contains_wcard);
-
- if (NT_STATUS_IS_OK(status) &&
- ppath_contains_wcard != NULL &&
- path_contains_wcard) {
- *ppath_contains_wcard = path_contains_wcard;
- }
- return status;
-}
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 8b3dcd87b5a..bc3cb82c889 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -630,7 +630,6 @@ void reply_ntcreate_and_X(struct smb_request *req)
fname,
ucf_flags,
0,
- NULL,
&smb_fname);
TALLOC_FREE(case_state);
@@ -1234,7 +1233,6 @@ static void call_nt_transact_create(connection_struct *conn,
fname,
ucf_flags,
0,
- NULL,
&smb_fname);
TALLOC_FREE(case_state);
@@ -1708,7 +1706,6 @@ void reply_ntrename(struct smb_request *req)
const char *dst_original_lcomp = NULL;
const char *p;
NTSTATUS status;
- bool src_has_wcard = False;
bool dest_has_wcard = False;
uint32_t attrs;
uint32_t ucf_flags_src = ucf_flags_from_smb_request(req);
@@ -1728,8 +1725,8 @@ void reply_ntrename(struct smb_request *req)
rename_type = SVAL(req->vwv+1, 0);
p = (const char *)req->buf + 1;
- p += srvstr_get_path_req_wcard(ctx, req, &oldname, p, STR_TERMINATE,
- &status, &src_has_wcard);
+ p += srvstr_get_path_req(ctx, req, &oldname, p, STR_TERMINATE,
+ &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
goto out;
@@ -1741,8 +1738,8 @@ void reply_ntrename(struct smb_request *req)
}
p++;
- p += srvstr_get_path_req_wcard(ctx, req, &newname, p, STR_TERMINATE,
- &status, &dest_has_wcard);
+ p += srvstr_get_path_req(ctx, req, &newname, p, STR_TERMINATE,
+ &status);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
goto out;
@@ -1765,8 +1762,7 @@ void reply_ntrename(struct smb_request *req)
* destination's last component.
*/
if (rename_type == RENAME_FLAG_RENAME) {
- ucf_flags_src |= UCF_COND_ALLOW_WCARD_LCOMP;
- ucf_flags_dst |= UCF_COND_ALLOW_WCARD_LCOMP;
+ ucf_flags_dst |= UCF_ALWAYS_ALLOW_WCARD_LCOMP;
}
/* rename_internals() calls unix_convert(), so don't call it here. */
@@ -1774,7 +1770,6 @@ void reply_ntrename(struct smb_request *req)
oldname,
ucf_flags_src,
0,
- NULL,
&smb_fname_old);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,
@@ -1788,11 +1783,24 @@ void reply_ntrename(struct smb_request *req)
goto out;
}
+ /* Get the last component of the destination for rename_internals(). */
+ dst_original_lcomp = get_original_lcomp(ctx,
+ conn,
+ newname,
+ ucf_flags_dst);
+ if (dst_original_lcomp == NULL) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ goto out;
+ }
+
+ if (!req->posix_pathnames) {
+ dest_has_wcard = ms_has_wild(dst_original_lcomp);
+ }
+
status = filename_convert(ctx, conn,
newname,
ucf_flags_dst,
0,
- &dest_has_wcard,
&smb_fname_new);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,
@@ -1806,16 +1814,6 @@ void reply_ntrename(struct smb_request *req)
goto out;
}
- /* Get the last component of the destination for rename_internals(). */
- dst_original_lcomp = get_original_lcomp(ctx,
- conn,
- newname,
- ucf_flags_dst);
- if (dst_original_lcomp == NULL) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- goto out;
- }
-
if (stream_rename) {
/* smb_fname_new must be the same as smb_fname_old. */
TALLOC_FREE(smb_fname_new->base_name);
@@ -1841,12 +1839,10 @@ void reply_ntrename(struct smb_request *req)
dst_original_lcomp,
attrs,
false,
- src_has_wcard,
- dest_has_wcard,
DELETE_ACCESS);
break;
case RENAME_FLAG_HARD_LINK:
- if (src_has_wcard || dest_has_wcard) {
+ if (dest_has_wcard) {
/* No wildcards. */
status = NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
} else {
@@ -1858,7 +1854,7 @@ void reply_ntrename(struct smb_request *req)
}
break;
case RENAME_FLAG_COPY:
- if (src_has_wcard || dest_has_wcard) {
+ if (dest_has_wcard) {
/* No wildcards. */
status = NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
} else {
@@ -2029,7 +2025,6 @@ static void call_nt_transact_rename(connection_struct *conn,
char *params = *ppparams;
char *new_name = NULL;
files_struct *fsp = NULL;
- bool dest_has_wcard = False;
NTSTATUS status;
TALLOC_CTX *ctx = talloc_tos();
@@ -2043,25 +2038,23 @@ static void call_nt_transact_rename(connection_struct *conn,
return;
}
if (req->posix_pathnames) {
- srvstr_get_path_wcard_posix(ctx,
+ srvstr_get_path_posix(ctx,
params,
req->flags2,
&new_name,
params+4,
parameter_count - 4,
STR_TERMINATE,
- &status,
- &dest_has_wcard);
+ &status);
} else {
- srvstr_get_path_wcard(ctx,
+ srvstr_get_path(ctx,
params,
--
Samba Shared Repository
More information about the samba-cvs
mailing list