]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_worm: move write_access_flags to global
authorBjörn Jacke <bjacke@samba.org>
Sat, 30 Dec 2023 20:01:04 +0000 (21:01 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 16 Jan 2024 14:37:31 +0000 (14:37 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/modules/vfs_worm.c

index f489c540c3a1c3e39dd2a65d5e811171a901c76d..0d17bbbc814cc9f215d98fedf396c2abf7041e9f 100644 (file)
 struct worm_config_data {
        double grace_period;
 };
+static const uint32_t write_access_flags = FILE_WRITE_DATA | FILE_APPEND_DATA |
+                                          FILE_WRITE_ATTRIBUTES |
+                                          DELETE_ACCESS | WRITE_DAC_ACCESS |
+                                          WRITE_OWNER_ACCESS;
 
 static int vfs_worm_connect(struct vfs_handle_struct *handle,
                            const char *service, const char *user)
@@ -102,10 +106,6 @@ static NTSTATUS vfs_worm_create_file(vfs_handle_struct *handle,
                                     const struct smb2_create_blobs *in_context_blobs,
                                     struct smb2_create_blobs *out_context_blobs)
 {
-       const uint32_t write_access_flags =
-               FILE_WRITE_DATA | FILE_APPEND_DATA |
-               FILE_WRITE_ATTRIBUTES | DELETE_ACCESS |
-               WRITE_DAC_ACCESS | WRITE_OWNER_ACCESS;
        NTSTATUS status;
        bool readonly;