summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-07-27 12:09:40 -0700
committerJeremy Allison <jra@samba.org>2009-07-27 12:09:40 -0700
commit9297b975f58a6c8a8609e05d0bed7b4846a2be32 (patch)
tree129ac7e913e6b9245c626f6b2b97fb57b21333f6 /source3
parent67d9130c134e885c17242596aacd2f265737d805 (diff)
downloadsamba-9297b975f58a6c8a8609e05d0bed7b4846a2be32.tar.gz
samba-9297b975f58a6c8a8609e05d0bed7b4846a2be32.tar.bz2
samba-9297b975f58a6c8a8609e05d0bed7b4846a2be32.zip
Fix the build breakage by #including modules/vfs_acl_common.c
into acl_tdb and acl_xattr. Duplicates the code size, but keeps the code in common so I don't have to do bug fixes in two places (which is what I really cared about). Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in4
-rw-r--r--source3/include/proto.h27
-rw-r--r--source3/modules/vfs_acl_common.c35
-rw-r--r--source3/modules/vfs_acl_tdb.c8
-rw-r--r--source3/modules/vfs_acl_xattr.c9
5 files changed, 33 insertions, 50 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index b963511b39..e6d0cf00dd 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -706,8 +706,8 @@ VFS_FILEID_OBJ = modules/vfs_fileid.o
VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
VFS_PREOPEN_OBJ = modules/vfs_preopen.o
VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
-VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o modules/vfs_acl_common.o
-VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o modules/vfs_acl_common.o
+VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
+VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o \
modules/onefs_open.o modules/onefs_streams.o modules/onefs_dir.o \
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3e9f5e8ae7..f7fedc7e52 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -7288,31 +7288,4 @@ uint32_t ds_uf2atype(uint32_t uf);
uint32_t ds_gtype2atype(uint32_t gtype);
enum lsa_SidType ds_atype_map(uint32_t atype);
-/* The following definitions come from modules/vfs_acl_xattr.c */
-NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
- vfs_handle_struct *handle,
- files_struct *fsp,
- const char *name,
- DATA_BLOB *pblob);
-NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
- files_struct *fsp,
- DATA_BLOB *pblob);
-NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
- const char *fname,
- DATA_BLOB *pblob);
-
-/* The following definitions come from modules/vfs_acl_common.c */
-int open_acl_common(vfs_handle_struct *handle,
- struct smb_filename *smb_fname,
- files_struct *fsp,
- int flags,
- mode_t mode);
-int mkdir_acl_common(vfs_handle_struct *handle, const char *path, mode_t mode);
-NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
- uint32_t security_info, struct security_descriptor **ppdesc);
-NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
- const char *name, uint32_t security_info, struct security_descriptor **ppdesc);
-NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
- uint32_t security_info_sent, const struct security_descriptor *psd);
-
#endif /* _PROTO_H_ */
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index d8ff8c648e..5fdd2b4725 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1,5 +1,6 @@
/*
* Store Windows ACLs in data store - common functions.
+ * #included into modules/vfs_acl_xattr.c and modules/vfs_acl_tdb.c
*
* Copyright (C) Volker Lendecke, 2008
* Copyright (C) Jeremy Allison, 2009
@@ -18,21 +19,25 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-/* NOTE: This is an experimental module, not yet finished. JRA. */
-
-#include "includes.h"
-#include "librpc/gen_ndr/xattr.h"
-#include "librpc/gen_ndr/ndr_xattr.h"
-#include "../lib/crypto/crypto.h"
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_VFS
-
static NTSTATUS create_acl_blob(const struct security_descriptor *psd,
DATA_BLOB *pblob,
uint16_t hash_type,
uint8_t hash[XATTR_SD_HASH_SIZE]);
+static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
+ vfs_handle_struct *handle,
+ files_struct *fsp,
+ const char *name,
+ DATA_BLOB *pblob);
+
+static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
+ files_struct *fsp,
+ DATA_BLOB *pblob);
+
+static NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
+ const char *fname,
+ DATA_BLOB *pblob);
+
#define HASH_SECURITY_INFO (OWNER_SECURITY_INFORMATION | \
GROUP_SECURITY_INFORMATION | \
DACL_SECURITY_INFORMATION | \
@@ -438,7 +443,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
Check ACL on open. For new files inherit from parent directory.
*********************************************************************/
-int open_acl_common(vfs_handle_struct *handle,
+static int open_acl_common(vfs_handle_struct *handle,
struct smb_filename *smb_fname,
files_struct *fsp,
int flags,
@@ -509,7 +514,7 @@ int open_acl_common(vfs_handle_struct *handle,
return fsp->fh->fd;
}
-int mkdir_acl_common(vfs_handle_struct *handle, const char *path, mode_t mode)
+static int mkdir_acl_common(vfs_handle_struct *handle, const char *path, mode_t mode)
{
struct smb_filename *smb_fname = NULL;
int ret = SMB_VFS_NEXT_MKDIR(handle, path, mode);
@@ -536,7 +541,7 @@ int mkdir_acl_common(vfs_handle_struct *handle, const char *path, mode_t mode)
Fetch a security descriptor given an fsp.
*********************************************************************/
-NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
+static NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
uint32_t security_info, struct security_descriptor **ppdesc)
{
return get_nt_acl_internal(handle, fsp,
@@ -547,7 +552,7 @@ NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
Fetch a security descriptor given a pathname.
*********************************************************************/
-NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
+static NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
const char *name, uint32_t security_info, struct security_descriptor **ppdesc)
{
return get_nt_acl_internal(handle, NULL,
@@ -558,7 +563,7 @@ NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
Store a security descriptor given an fsp.
*********************************************************************/
-NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
+static NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
uint32_t security_info_sent, const struct security_descriptor *psd)
{
NTSTATUS status;
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 07ad694a30..285c58ed9d 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -28,6 +28,8 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
+#include "modules/vfs_acl_common.c"
+
static unsigned int ref_count;
static struct db_context *acl_db;
@@ -135,7 +137,7 @@ static NTSTATUS acl_tdb_delete(vfs_handle_struct *handle,
Pull a security descriptor into a DATA_BLOB from a tdb store.
*******************************************************************/
-NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
+static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
vfs_handle_struct *handle,
files_struct *fsp,
const char *name,
@@ -193,7 +195,7 @@ NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
Store a DATA_BLOB into a tdb record given an fsp pointer.
*******************************************************************/
-NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
+static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
files_struct *fsp,
DATA_BLOB *pblob)
{
@@ -244,7 +246,7 @@ NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
Store a DATA_BLOB into a tdb record given a pathname.
*******************************************************************/
-NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
+static NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
const char *fname,
DATA_BLOB *pblob)
{
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index d7711760ed..7a9cd27e5f 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -28,11 +28,14 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
+/* Pull in the common functions. */
+#include "modules/vfs_acl_common.c"
+
/*******************************************************************
Pull a security descriptor into a DATA_BLOB from a xattr.
*******************************************************************/
-NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
+static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
vfs_handle_struct *handle,
files_struct *fsp,
const char *name,
@@ -90,7 +93,7 @@ NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
Store a DATA_BLOB into an xattr given an fsp pointer.
*******************************************************************/
-NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
+static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
files_struct *fsp,
DATA_BLOB *pblob)
{
@@ -128,7 +131,7 @@ NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
Store a DATA_BLOB into an xattr given a pathname.
*******************************************************************/
-NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
+static NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
const char *fname,
DATA_BLOB *pblob)
{