]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: delete_system_obj() fails on empty object name 13783/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 3 Mar 2017 17:10:40 +0000 (12:10 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 3 Mar 2017 17:16:24 +0000 (12:16 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc

index a5709f20ff3af536da6f333a4dc295679370269d..6b59f4f25c990f8984eefededf53896843b8a265 100644 (file)
@@ -8421,6 +8421,11 @@ int RGWRados::delete_obj(RGWObjectCtx& obj_ctx,
 
 int RGWRados::delete_system_obj(rgw_obj& obj, RGWObjVersionTracker *objv_tracker)
 {
+  if (obj.get_object().empty()) {
+    ldout(cct, 1) << "delete_system_obj got empty object name "
+        << obj << ", returning EINVAL" << dendl;
+    return -EINVAL;
+  }
   rgw_rados_ref ref;
   rgw_bucket bucket;
   int r = get_obj_ref(obj, &ref, &bucket);