]> git.samba.org - samba.git/commit - source3/smbd/files.c
VFS: NULL dirfsp for openat on stream opens
authorVolker Lendecke <vl@samba.org>
Tue, 14 Jun 2022 14:33:57 +0000 (16:33 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 25 Jul 2022 12:04:33 +0000 (12:04 +0000)
commitc267c9839eb75ee458e28d545e8941aec35b8062
tree207ff9e111970a6d68e07dc821096d2672673d09
parent0c8d55ed899f5035f1168f9d018b87806289be1e
VFS: NULL dirfsp for openat on stream opens

The main optimization is to avoid non_widelink_open() for streams
opens based on the fact that all streams opens are relative to
fsp->base_fsp, which is a pathref fsp already.

Neither streams_xattr nor streams_depot referenced dirfsp for the
streams case. Make this more obvious in the callers by passing NULL
and asserting this: non-streams opens and streams opens are just
different things, streams-opens can and do reference a base fsp and
don't need the non_widelink_open logic.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fruit.c
source3/modules/vfs_streams_depot.c
source3/modules/vfs_streams_xattr.c
source3/smbd/files.c
source3/smbd/open.c
source3/torture/cmd_vfs.c