]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: don't allow open on directories (externally)
authorMatt Benjamin <mbenjamin@redhat.com>
Mon, 14 Dec 2015 17:16:08 +0000 (12:16 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:06:38 +0000 (12:06 -0500)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc

index 9f8030f109533270dd11c571fb23ea3dc6aba2a8..bd65a6bdfda7b1b5892073d8f7eed36f2c0fc0fc 100644 (file)
@@ -519,6 +519,8 @@ int rgw_open(struct rgw_fs *rgw_fs,
    * for now, we will support single-open only, it's preferable to
    * anything we can otherwise do without access to the NFS state
    */
+  if (! rgw_fh->is_file())
+    return -EISDIR;
 
   // convert flags
   uint32_t oflags = 0;