1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2021-11-05 12:03:02 +01:00 committed by Jeremy Allison
parent 05c41a02dd
commit d64e180ba9
2 changed files with 18 additions and 42 deletions

View File

@ -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)
{

View File

@ -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