aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <mszeredi@suse.cz>2012-04-10 16:01:00 +0200
committerGravatar Miklos Szeredi <mszeredi@suse.cz>2012-04-10 16:01:00 +0200
commit6f77e7de6f0ad9a8d6991c213841c926acc53a96 (patch)
tree88d330373c30c4c5d2d3ed6b03c73c427981580d /lib
parentb0fa250ec0bd89386325d0153a7b3d72be729ebc (diff)
Check protocol version before sending notifications
Check protocol version before sending notifications and return -ENOSYS if a particular notification is not supported.
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse_lowlevel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index a0d4887..2282ccf 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2028,6 +2028,9 @@ int fuse_lowlevel_notify_delete(struct fuse_chan *ch,
if (!f)
return -ENODEV;
+ if (f->conn.proto_minor < 18)
+ return -ENOSYS;
+
outarg.parent = parent;
outarg.child = child;
outarg.namelen = namelen;
@@ -2059,6 +2062,9 @@ int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
if (!f)
return -ENODEV;
+ if (f->conn.proto_minor < 15)
+ return -ENOSYS;
+
out.unique = 0;
out.error = FUSE_NOTIFY_STORE;
@@ -2138,6 +2144,9 @@ int fuse_lowlevel_notify_retrieve(struct fuse_chan *ch, fuse_ino_t ino,
if (!f)
return -ENODEV;
+ if (f->conn.proto_minor < 15)
+ return -ENOSYS;
+
rreq = malloc(sizeof(*rreq));
if (rreq == NULL)
return -ENOMEM;