diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-04-10 16:01:00 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2012-04-10 16:01:00 +0200 |
commit | 6f77e7de6f0ad9a8d6991c213841c926acc53a96 (patch) | |
tree | 88d330373c30c4c5d2d3ed6b03c73c427981580d | |
parent | b0fa250ec0bd89386325d0153a7b3d72be729ebc (diff) | |
download | android_external_fuse-6f77e7de6f0ad9a8d6991c213841c926acc53a96.tar.gz android_external_fuse-6f77e7de6f0ad9a8d6991c213841c926acc53a96.tar.bz2 android_external_fuse-6f77e7de6f0ad9a8d6991c213841c926acc53a96.zip |
Check protocol version before sending notifications
Check protocol version before sending notifications and return -ENOSYS if a
particular notification is not supported.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fuse_lowlevel.c | 9 |
2 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2012-04-10 Miklos Szeredi <miklos@szeredi.hu> + + * Check protocol version before sending notifications and return + -ENOSYS if a particular notification is not supported. + 2012-01-27 Miklos Szeredi <miklos@szeredi.hu> * Interpret octal escape codes in options. Requested by Jan 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; |