mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
r21109: Send notify_fam.c through the VFS. Lets see how the build farm likes this.
Volker
This commit is contained in:
parent
603a967613
commit
e57a6d4d63
@ -408,8 +408,7 @@ PROFILES_OBJ = utils/profiles.o \
|
||||
|
||||
OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o
|
||||
|
||||
NOTIFY_OBJ = smbd/notify.o smbd/notify_fam.o smbd/notify_inotify.o \
|
||||
smbd/notify_internal.o
|
||||
NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o
|
||||
|
||||
VFS_DEFAULT_OBJ = modules/vfs_default.o
|
||||
VFS_AUDIT_OBJ = modules/vfs_audit.o
|
||||
@ -436,6 +435,7 @@ VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
|
||||
VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
|
||||
VFS_COMMIT_OBJ = modules/vfs_commit.o
|
||||
VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
|
||||
VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
|
||||
|
||||
PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
|
||||
|
||||
@ -1559,6 +1559,11 @@ bin/gpfs.@SHLIBEXT@: $(VFS_GPFS_OBJ)
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_GPFS_OBJ) \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
bin/notify_fam.@SHLIBEXT@: $(VFS_NOTIFY_FAM_OBJ)
|
||||
@echo "Building plugin $@"
|
||||
@$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NOTIFY_FAM_OBJ) \
|
||||
@SONAMEFLAG@`basename $@`
|
||||
|
||||
#########################################################
|
||||
## IdMap NSS plugins
|
||||
|
||||
|
@ -2557,8 +2557,7 @@ if test x$enable_fam != xno; then
|
||||
fi
|
||||
|
||||
if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
|
||||
AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1,
|
||||
[Whether FAM file notifications are available])
|
||||
default_shared_modules="$default_shared_modules vfs_notify_fam"
|
||||
AC_TRY_COMPILE([#include <fam.h>],
|
||||
[FAMCodes code = FAMChanged;],
|
||||
AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1,
|
||||
@ -5960,6 +5959,7 @@ SMB_MODULE(vfs_cacheprime, \$(VFS_CACHEPRIME_OBJ), "bin/cacheprime.$SHLIBEXT", V
|
||||
SMB_MODULE(vfs_prealloc, \$(VFS_PREALLOC_OBJ), "bin/prealloc.$SHLIBEXT", VFS)
|
||||
SMB_MODULE(vfs_commit, \$(VFS_COMMIT_OBJ), "bin/commit.$SHLIBEXT", VFS)
|
||||
SMB_MODULE(vfs_gpfs, \$(VFS_GPFS_OBJ), "bin/gpfs.$SHLIBEXT", VFS)
|
||||
SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", VFS)
|
||||
|
||||
SMB_SUBSYSTEM(VFS,smbd/vfs.o)
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#ifdef HAVE_FAM_CHANGE_NOTIFY
|
||||
|
||||
#include <fam.h>
|
||||
|
||||
#if !defined(HAVE_FAM_H_FAMCODES_TYPEDEF)
|
||||
@ -202,7 +200,8 @@ static int fam_watch_context_destructor(struct fam_watch_context *ctx)
|
||||
add a watch. The watch is removed when the caller calls
|
||||
talloc_free() on *handle
|
||||
*/
|
||||
NTSTATUS fam_watch(struct sys_notify_context *ctx,
|
||||
static NTSTATUS fam_watch(vfs_handle_struct *vfs_handle,
|
||||
struct sys_notify_context *ctx,
|
||||
struct notify_entry *e,
|
||||
void (*callback)(struct sys_notify_context *ctx,
|
||||
void *private_data,
|
||||
@ -280,4 +279,24 @@ NTSTATUS fam_watch(struct sys_notify_context *ctx,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
#endif /* HAVE_FAM_CHANGE_NOTIFY */
|
||||
/* VFS operations structure */
|
||||
|
||||
static vfs_op_tuple notify_fam_op_tuples[] = {
|
||||
|
||||
{SMB_VFS_OP(fam_watch),
|
||||
SMB_VFS_OP_NOTIFY_WATCH,
|
||||
SMB_VFS_LAYER_OPAQUE},
|
||||
|
||||
{SMB_VFS_OP(NULL),
|
||||
SMB_VFS_OP_NOOP,
|
||||
SMB_VFS_LAYER_NOOP}
|
||||
|
||||
};
|
||||
|
||||
|
||||
NTSTATUS vfs_notify_fam_init(void);
|
||||
NTSTATUS vfs_notify_fam_init(void)
|
||||
{
|
||||
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "notify_fam",
|
||||
notify_fam_op_tuples);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user