From b56f554ff00437993ae7fa37dcaebf9a080bf3e9 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sun, 27 Sep 2020 19:39:37 +0200 Subject: [PATCH] vfs: make struct fd_handle private Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/include/vfs.h | 16 +------------ source3/smbd/fd_handle.c | 1 + source3/smbd/fd_handle_private.h | 41 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 source3/smbd/fd_handle_private.h diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 4bc2b1eb987..63f0f9519e7 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -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; diff --git a/source3/smbd/fd_handle.c b/source3/smbd/fd_handle.c index ba614eefba2..036bf65fdf8 100644 --- a/source3/smbd/fd_handle.c +++ b/source3/smbd/fd_handle.c @@ -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 index 00000000000..d5db8102c8c --- /dev/null +++ b/source3/smbd/fd_handle_private.h @@ -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 . +*/ + +#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 -- 2.47.3