]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: make struct fd_handle private
authorRalph Boehme <slow@samba.org>
Sun, 27 Sep 2020 17:39:37 +0000 (19:39 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:30 +0000 (09:08 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/vfs.h
source3/smbd/fd_handle.c
source3/smbd/fd_handle_private.h [new file with mode: 0644]

index 4bc2b1eb9870ac3a442f150912260e9ea4e380ba..63f0f9519e72c220f831d0195cb4805da89427ec 100644 (file)
@@ -363,21 +363,7 @@ typedef union unid_t {
        gid_t gid;
 } unid_t;
 
-struct fd_handle {
-       size_t ref_count;
-       int fd;
-       uint64_t position_information;
-       off_t pos;
-       uint32_t private_options;       /* NT Create options, but we only look at
-                                * NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and
-                                * NTCREATEX_OPTIONS_PRIVATE_DENY_FCB and
-                                * NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE
-                                * for print files *only*, where
-                                * DELETE_ON_CLOSE is not stored in the share
-                                * mode database.
-                                */
-       uint64_t gen_id;
-};
+struct fd_handle;
 
 struct fsp_lease {
        size_t ref_count;
index ba614eefba20518817aa1256ccb2b02735d3bd25..036bf65fdf81a2e9fe5214f6ceb7c49dff7c4219 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "fd_handle.h"
+#include "fd_handle_private.h"
 
 struct fd_handle *fd_handle_create(TALLOC_CTX *mem_ctx)
 {
diff --git a/source3/smbd/fd_handle_private.h b/source3/smbd/fd_handle_private.h
new file mode 100644 (file)
index 0000000..d5db810
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+   Unix SMB/CIFS implementation.
+   Files handle structure handling
+   Copyright (C) Ralph Boehme 2020
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef FD_HANDLE_PRIVATE_H
+#define FD_HANDLE_PRIVATE_H
+
+struct fd_handle {
+       size_t ref_count;
+       int fd;
+       uint64_t position_information;
+       off_t pos;
+       /*
+        * NT Create options, but we only look at
+        * NTCREATEX_FLAG_DENY_DOS and
+        * NTCREATEX_FLAG_DENY_FCB and
+        * NTCREATEX_FLAG_DELETE_ON_CLOSE
+        * for print files *only*, where
+        * DELETE_ON_CLOSE is not stored in the share
+        * mode database.
+        */
+       uint32_t private_options;
+       uint64_t gen_id;
+};
+
+#endif