1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

locking: hide share_mode_lock definition

This makes "struct share_mode_lock" an opaque data structure opened up
only to the code in locking/. This makes it much safer to modify the
data structure with defined accessor functions in share_mode_lock.c.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 10 21:12:48 UTC 2020 on sn-devel-184
This commit is contained in:
Volker Lendecke
2020-11-04 12:39:48 +01:00
committed by Jeremy Allison
parent df2ffaaa20
commit d762ab558a
4 changed files with 27 additions and 3 deletions

View File

@ -40,6 +40,7 @@
#include "system/filesys.h"
#include "lib/util/server_id.h"
#include "share_mode_lock.h"
#include "share_mode_lock_private.h"
#include "locking/proto.h"
#include "smbd/globals.h"
#include "dbwrap/dbwrap.h"

View File

@ -39,6 +39,7 @@
#include "system/filesys.h"
#include "lib/util/server_id.h"
#include "share_mode_lock.h"
#include "share_mode_lock_private.h"
#include "locking/proto.h"
#include "smbd/globals.h"
#include "dbwrap/dbwrap.h"

View File

@ -17,9 +17,7 @@
#define __LOCKING_SHARE_MODE_LOCK_H__
struct share_mode_data;
struct share_mode_lock {
struct share_mode_data *data;
};
struct share_mode_lock;
bool locking_init(void);
bool locking_init_readonly(void);

View File

@ -0,0 +1,24 @@
/*
* 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 __LOCKING_SHARE_MODE_LOCK_PRIVATE_H__
#define __LOCKING_SHARE_MODE_LOCK_PRIVATE_H__
struct share_mode_data;
struct share_mode_lock {
struct share_mode_data *data;
};
#endif