]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't override ret value in do_read_permisions
authorYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 25 Aug 2011 19:06:16 +0000 (12:06 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 25 Aug 2011 19:06:16 +0000 (12:06 -0700)
src/rgw/rgw_op.cc

index 0daea96b35e3a403ba45e781c671e8c87f501ee8..0dd79af933d7892e7510c40105ba2ac5288ef1cd 100644 (file)
@@ -1511,7 +1511,7 @@ int RGWHandler::do_read_permissions(bool only_bucket)
       ret = -EACCES;
   }
 
-  if (!s->bucket.name.empty()) {
+  if (ret == 0 && !s->bucket.name.empty()) {
     ret = rgwstore->get_bucket_id(s->bucket, &s->pool_id);
     if (ret < 0)
       return ret;