summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-12-12 15:37:30 +0100
committerJeremy Allison <jra@samba.org>2015-07-07 23:51:24 +0200
commit70283ffd38bdaccbf05f66953aec6cfd83611aa5 (patch)
tree88e79484ba4245f6a518b7e2d79acfa2e473cd8a /source3/modules
parentc118c301c9d9b5eb9244e473ac8f251d40d11526 (diff)
downloadsamba-70283ffd38bdaccbf05f66953aec6cfd83611aa5.tar.gz
smbd: Remove SMB_VFS_NOTIFY_WATCH
No longer needed Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_ceph.c18
-rw-r--r--source3/modules/vfs_default.c46
-rw-r--r--source3/modules/vfs_full_audit.c24
-rw-r--r--source3/modules/vfs_glusterfs.c13
-rw-r--r--source3/modules/vfs_time_audit.c29
5 files changed, 0 insertions, 130 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index ff642feda8a..0113faa1247 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1011,23 +1011,6 @@ static char *cephwrap_realpath(struct vfs_handle_struct *handle, const char *pa
return result;
}
-static NTSTATUS cephwrap_notify_watch(struct vfs_handle_struct *vfs_handle,
- struct sys_notify_context *ctx,
- const char *path,
- uint32_t *filter,
- uint32_t *subdir_filter,
- void (*callback)(struct sys_notify_context *ctx,
- void *private_data,
- struct notify_event *ev),
- void *private_data,
- void *handle_p)
-{
- /*
- * We cannot call inotify on files the kernel does not know about
- */
- return NT_STATUS_OK;
-}
-
static int cephwrap_chflags(struct vfs_handle_struct *handle, const char *path,
unsigned int flags)
{
@@ -1303,7 +1286,6 @@ static struct vfs_fn_pointers ceph_fns = {
.link_fn = cephwrap_link,
.mknod_fn = cephwrap_mknod,
.realpath_fn = cephwrap_realpath,
- .notify_watch_fn = cephwrap_notify_watch,
.chflags_fn = cephwrap_chflags,
.get_real_filename_fn = cephwrap_get_real_filename,
.connectpath_fn = cephwrap_connectpath,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index fcf3de5f7bb..9a0a46ecb55 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2132,51 +2132,6 @@ static char *vfswrap_realpath(vfs_handle_struct *handle, const char *path)
return result;
}
-static NTSTATUS vfswrap_notify_watch(vfs_handle_struct *vfs_handle,
- struct sys_notify_context *ctx,
- const char *path,
- uint32_t *filter,
- uint32_t *subdir_filter,
- void (*callback)(struct sys_notify_context *ctx,
- void *private_data,
- struct notify_event *ev),
- void *private_data, void *handle)
-{
- /*
- * So far inotify is the only supported default notify mechanism. If
- * another platform like the the BSD's or a proprietary Unix comes
- * along and wants another default, we can play the same trick we
- * played with Posix ACLs.
- *
- * Until that is the case, hard-code inotify here.
- */
-#ifdef HAVE_INOTIFY
- if (lp_kernel_change_notify()) {
- int ret;
- if (!lp_parm_bool(-1, "notify", "inotify", True)) {
- return NT_STATUS_INVALID_SYSTEM_SERVICE;
- }
- /*
- * "ctx->private_data" is not obvious as a talloc context
- * here. Without modifying the VFS we don't have a mem_ctx
- * available here, and ctx->private_data was used by
- * inotify_watch before it got a real talloc parent.
- */
- ret = inotify_watch(ctx->private_data, ctx,
- path, filter, subdir_filter,
- callback, private_data, handle);
- if (ret != 0) {
- return map_nt_error_from_unix(ret);
- }
- return NT_STATUS_OK;
- }
-#endif
- /*
- * Do nothing, leave everything to notify_internal.c
- */
- return NT_STATUS_OK;
-}
-
static int vfswrap_chflags(vfs_handle_struct *handle, const char *path,
unsigned int flags)
{
@@ -2643,7 +2598,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.link_fn = vfswrap_link,
.mknod_fn = vfswrap_mknod,
.realpath_fn = vfswrap_realpath,
- .notify_watch_fn = vfswrap_notify_watch,
.chflags_fn = vfswrap_chflags,
.file_id_create_fn = vfswrap_file_id_create,
.streaminfo_fn = vfswrap_streaminfo,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index c6648d15fb3..6de22b1d781 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -158,7 +158,6 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_LINK,
SMB_VFS_OP_MKNOD,
SMB_VFS_OP_REALPATH,
- SMB_VFS_OP_NOTIFY_WATCH,
SMB_VFS_OP_CHFLAGS,
SMB_VFS_OP_FILE_ID_CREATE,
SMB_VFS_OP_STREAMINFO,
@@ -286,7 +285,6 @@ static struct {
{ SMB_VFS_OP_LINK, "link" },
{ SMB_VFS_OP_MKNOD, "mknod" },
{ SMB_VFS_OP_REALPATH, "realpath" },
- { SMB_VFS_OP_NOTIFY_WATCH, "notify_watch" },
{ SMB_VFS_OP_CHFLAGS, "chflags" },
{ SMB_VFS_OP_FILE_ID_CREATE, "file_id_create" },
{ SMB_VFS_OP_STREAMINFO, "streaminfo" },
@@ -1630,27 +1628,6 @@ static char *smb_full_audit_realpath(vfs_handle_struct *handle,
return result;
}
-static NTSTATUS smb_full_audit_notify_watch(struct vfs_handle_struct *handle,
- struct sys_notify_context *ctx,
- const char *path,
- uint32_t *filter,
- uint32_t *subdir_filter,
- void (*callback)(struct sys_notify_context *ctx,
- void *private_data,
- struct notify_event *ev),
- void *private_data, void *handle_p)
-{
- NTSTATUS result;
-
- result = SMB_VFS_NEXT_NOTIFY_WATCH(handle, ctx, path,
- filter, subdir_filter, callback,
- private_data, handle_p);
-
- do_log(SMB_VFS_OP_NOTIFY_WATCH, NT_STATUS_IS_OK(result), handle, "");
-
- return result;
-}
-
static int smb_full_audit_chflags(vfs_handle_struct *handle,
const char *path, unsigned int flags)
{
@@ -2305,7 +2282,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.link_fn = smb_full_audit_link,
.mknod_fn = smb_full_audit_mknod,
.realpath_fn = smb_full_audit_realpath,
- .notify_watch_fn = smb_full_audit_notify_watch,
.chflags_fn = smb_full_audit_chflags,
.file_id_create_fn = smb_full_audit_file_id_create,
.streaminfo_fn = smb_full_audit_streaminfo,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index cd58080600c..a66887dbae3 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1039,18 +1039,6 @@ static int vfs_gluster_mknod(struct vfs_handle_struct *handle, const char *path,
return glfs_mknod(handle->data, path, mode, dev);
}
-static NTSTATUS vfs_gluster_notify_watch(struct vfs_handle_struct *handle,
- struct sys_notify_context *ctx,
- const char *path, uint32_t *filter,
- uint32_t *subdir_filter,
- void (*callback) (struct sys_notify_context *ctx,
- void *private_data,
- struct notify_event *ev),
- void *private_data, void *handle_p)
-{
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
static int vfs_gluster_chflags(struct vfs_handle_struct *handle,
const char *path, unsigned int flags)
{
@@ -1760,7 +1748,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
.link_fn = vfs_gluster_link,
.mknod_fn = vfs_gluster_mknod,
.realpath_fn = vfs_gluster_realpath,
- .notify_watch_fn = vfs_gluster_notify_watch,
.chflags_fn = vfs_gluster_chflags,
.file_id_create_fn = NULL,
.copy_chunk_send_fn = NULL,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 5c43d7ca7a3..7efad1efa5d 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1483,34 +1483,6 @@ static char *smb_time_audit_realpath(vfs_handle_struct *handle,
return result;
}
-static NTSTATUS smb_time_audit_notify_watch(struct vfs_handle_struct *handle,
- struct sys_notify_context *ctx,
- const char *path,
- uint32_t *filter,
- uint32_t *subdir_filter,
- void (*callback)(struct sys_notify_context *ctx,
- void *private_data,
- struct notify_event *ev),
- void *private_data, void *handle_p)
-{
- NTSTATUS result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_NOTIFY_WATCH(handle, ctx, path,
- filter, subdir_filter, callback,
- private_data, handle_p);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log_fname("notify_watch", timediff, path);
- }
-
- return result;
-}
-
static int smb_time_audit_chflags(vfs_handle_struct *handle,
const char *path, unsigned int flags)
{
@@ -2507,7 +2479,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.link_fn = smb_time_audit_link,
.mknod_fn = smb_time_audit_mknod,
.realpath_fn = smb_time_audit_realpath,
- .notify_watch_fn = smb_time_audit_notify_watch,
.chflags_fn = smb_time_audit_chflags,
.file_id_create_fn = smb_time_audit_file_id_create,
.streaminfo_fn = smb_time_audit_streaminfo,