1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/source3
Volker Lendecke ac7a16f9cc smbd: Fix crossing automounter mount points
We get ENOENT on /proc/self/fd/<fdnum> when we try to turn the
mountpoint's O_PATH handle into a real one. This does not trigger a
mount attempt, you have to use name-based calls.

This is not the real fix, because if the autofs mount triggers, the
inode number will change. For directories this is not a huge problem
as we don't touch the share mode database before we open the "real"
fd. We would only violate potential share modes with other pure
READ_ATTRIBUTES (i.e. stat-) opens that came before the mount
trigger.

As I don't think share modes on directories are really relevant, I
think we can live with this "fix". Once we do directory leases this
will potentially change.

As a quick remedy we could use our defer_open() mechanism that starts
path processing from scratch. But as long as this seems not really
required, we should not add users of this really bad way of going back
to square 1.

The "real" fix would be to go back to the point where we open the last
component with openat(). In the retry round we need to do this without
O_PATH to trigger the mount and only then do the initial fstat.

Right now I don't see an easy way to properly test this
behaviour. Intercepting with vfs_error_inject is certainly possible,
but nailing the exact call would clutter the main code path. So I have
just tested this manually.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jun 27 11:59:05 UTC 2024 on atb-devel-224
2024-06-27 11:59:05 +00:00
..
auth s3:gse: Implement gensec_gse_security_by_oid() 2024-05-14 10:18:31 +00:00
build
client smbspool: let kerberos_ccache_is_valid() use smb_force_krb5_cc_default_name() 2024-05-14 10:18:32 +00:00
exports
groupdb s3:groupdb: Add missing newline to logging message 2023-08-08 04:39:38 +00:00
include s3:lib: let sessionid_traverse_read() report if the session was authenticated 2024-05-23 12:35:37 +00:00
intl
lib lib: Align an integer type 2024-06-24 16:21:32 +00:00
libads s3:libads: Do not fail if we don't get an IP passed down 2024-06-04 19:49:36 +00:00
libgpo/gpext lib: Give lib/util/util_file.c its own header file 2024-04-16 23:51:45 +00:00
libnet s3:libnet: Convert myalias to lower case 2024-05-22 20:33:36 +00:00
librpc gse: Simplify gse_errstr() with talloc_asprintf_addbuf() 2024-06-24 16:21:32 +00:00
libsmb s3:libsmb: we no longer need libads/kerberos_proto.h in namequery.c 2024-06-06 20:25:36 +00:00
locale s3:utils: Fix code spelling 2023-08-08 04:39:38 +00:00
locking smbd: Use direct struct initialization 2024-05-22 04:23:29 +00:00
modules vfs_ceph: use consistent code style when setting errno 2024-06-27 06:35:19 +00:00
nmbd s3:libsmb: Pass memory context to cli_connect_nb() 2024-04-29 08:43:32 +00:00
param docs-xml: Add smb.conf option 'dns hostname' 2024-05-22 20:33:36 +00:00
passdb passdb: Use getline(3) to read our old machine sid 2024-04-30 22:44:32 +00:00
printing s3:include: remove unused krb5_env.h 2024-05-14 10:18:31 +00:00
profile profile: Fix rusage reporting 2023-12-19 16:05:36 +00:00
registry s3:registry: Add missing return value checks 2024-06-24 06:14:36 +00:00
rpc_client s3:rpc_client: implement bind time feature negotiation 2024-04-23 17:29:55 +00:00
rpc_server s3:rpc_server: Make sure struct security_ace is initialized 2024-06-24 06:14:35 +00:00
rpcclient s3:libsmb: Pass memory context to cli_full_connection_creds() 2024-04-29 08:43:32 +00:00
script test_recycle.sh: make sure we don't see panics on the log files 2024-06-19 09:07:36 +00:00
selftest s3/torture: Add test for widelink case insensitivity on a MSDFS share. 2024-06-11 15:53:38 +00:00
services s3:services: Disable rcinit-based service control code 2021-12-10 14:02:30 +00:00
smbd smbd: Fix crossing automounter mount points 2024-06-27 11:59:05 +00:00
torture torture: Remove some pointless local variables 2024-06-04 07:11:35 +00:00
utils s3:utils: Fix get_window_height() return value 2024-06-24 06:14:36 +00:00
web
winbindd s3:winbind: Fix idmap_ad creating an invalid local krb5.conf 2024-06-04 19:49:36 +00:00
.clang_complete
.dmallocrc
.indent.pro
Doxyfile
mainpage.dox
smbadduser.in
wscript smbd: Fix crossing automounter mount points 2024-06-27 11:59:05 +00:00
wscript_build s3:libads: finally remove unused ads_connect[_user_creds]() and related code 2024-05-14 10:18:31 +00:00
wscript_configure_system_ncurses