1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/ntvfs
Dmitry Antipov 9755206f6d s4:ntvfs:posix: avoid parsing empty blob in posix_eadb_add_list()
Strictly speaking, this is not a bug because parsing loop will just skip
an empty ({NULL}, 0) blob. But it's better to avoid this case because
UBSan (as of clang-17 at least) may complain on such a parsing attempt:

source4/ntvfs/posix/posix_eadb.c:56:62: runtime error: applying zero offset to null pointer
    #0 0x7f9d71ce7b2a in posix_eadb_add_list source4/ntvfs/posix/posix_eadb.c:56
    #1 0x7f9d71ce7b2a in push_xattr_blob_tdb_raw source4/ntvfs/posix/posix_eadb.c:178
    #2 0x7f9d71cec1f5 in py_wrap_setxattr source4/ntvfs/posix/python/pyposix_eadb.c:64
    #3 0x7f9d88bd4507 in cfunction_call (/lib64/libpython3.11.so.1.0+0x1d4507)
    [... a lot of Python calls skipped...]

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-09 01:59:32 +00:00
..
cifs s4:ntvfs: Use cli_credentials_init_server() 2021-04-09 10:46:28 +00:00
common messaging4: Pass fds to messaging handlers 2019-09-18 20:10:24 +00:00
ipc ntvfs: Remove orphans from 2006 2022-10-27 18:18:36 +00:00
posix s4:ntvfs:posix: avoid parsing empty blob in posix_eadb_add_list() 2023-05-09 01:59:32 +00:00
simple lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *) 2017-04-22 01:17:00 +02:00
sysdep s3/wscript: only check for F_SETLEASE being available at compile time 2020-12-07 19:02:33 +00:00
unixuid s4:auth/unix_token: remove unused tevent_context from security_token_to_unix_token() 2017-06-26 08:47:15 +02:00
ntvfs_base.c lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *) 2017-04-22 01:17:00 +02:00
ntvfs_generic.c smb: rename NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to NTCREATEX_FLAG_DENY_FCB 2020-10-23 17:44:33 +00:00
ntvfs_interface.c ntvfs: Remove now unused functions 2019-06-26 04:12:32 +00:00
ntvfs_util.c ntvfs: Remove now unused functions 2019-06-26 04:12:32 +00:00
ntvfs.h
README
wscript_build s4-ntvfs: Remove untested ntvfs_cifsposix backend 2019-05-22 07:15:43 +00:00

This is the base of the new NTVFS subsystem for Samba. The model for
NTVFS backends is quite different than for the older style VFS
backends, in particular:

- the NTVFS backends receive windows style file names, although they
  are in the unix charset (usually UTF8). This means the backend is
  responsible for mapping windows filename conventions to unix
  filename conventions if necessary

- the NTVFS backends are responsible for changing effective UID before
  calling any OS local filesystem operations (if needed). The
  become_*() functions are provided to make this easier.

- the NTVFS backends are responsible for resolving DFS paths

- each NTVFS backend handles either disk, printer or IPC$ shares,
  rather than one backend handling all types

- the entry points of the NTVFS backends correspond closely with basic
  SMB operations, wheres the old VFS was modelled directly on the
  POSIX filesystem interface.

- the NTVFS backends are responsible for all semantic mappings, such
  as mapping dos file attributes, ACLs, file ownership and file times