From: Volker Lendecke Date: Fri, 5 Nov 2021 11:03:02 +0000 (+0100) Subject: smbd: Move "struct fd_handle" into fd_handle.c X-Git-Tag: ldb-2.5.0~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d64e180ba93630867d0027cca92c51f8f0ca7d31;p=thirdparty%2Fsamba.git smbd: Move "struct fd_handle" into fd_handle.c A separate header file is not required here, everything goes through the API published by fd_handle.c. This makes it harder to include the fd_handle definition and violate the guarantees. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/fd_handle.c b/source3/smbd/fd_handle.c index 036bf65fdf8..766b6c52c13 100644 --- a/source3/smbd/fd_handle.c +++ b/source3/smbd/fd_handle.c @@ -18,7 +18,24 @@ */ #include "fd_handle.h" -#include "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; +}; 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 deleted file mode 100644 index d5db8102c8c..00000000000 --- a/source3/smbd/fd_handle_private.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - 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