]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Move "struct fd_handle" into fd_handle.c
authorVolker Lendecke <vl@samba.org>
Fri, 5 Nov 2021 11:03:02 +0000 (12:03 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 11 Nov 2021 19:08:37 +0000 (19:08 +0000)
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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/fd_handle.c
source3/smbd/fd_handle_private.h [deleted file]

index 036bf65fdf81a2e9fe5214f6ceb7c49dff7c4219..766b6c52c13672475094b430fb70bdbb35da7f5a 100644 (file)
 */
 
 #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 (file)
index d5db810..0000000
+++ /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 <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