vfs: Add VFS_OPEN_HOW_WITH_BACKUP_INTENT
authorVolker Lendecke <vl@samba.org>
Fri, 1 Sep 2023 12:51:47 +0000 (14:51 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 5 Oct 2023 14:00:33 +0000 (14:00 +0000)
commitd1846452e96217695c8cb2537f071f287ab210d4
tree1fd36e35221f3de19446c4da4eb33214feeff59f
parentf701faf6677100bef6cbcf7f3d5c973f76a6bb49
vfs: Add VFS_OPEN_HOW_WITH_BACKUP_INTENT

Indicate BACKUP_INTENT to vfs_openat(). Why? I have a customer request
who wants to add O_NOATIME in this case to avoid metadata updates when
a backup or virus-checking application comes along.

This does not fully handle BACKUP_INTENT correctly, this would require
become_root() appropriately. We might want to do that later after a
lot of careful security audit, but this patch independently might
already provide some infrastructure for it.

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 Oct  5 14:00:33 UTC 2023 on atb-devel-224
source3/include/vfs.h
source3/modules/vfs_default.c
source3/smbd/open.c