]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_user.cc: add missing break in switch
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 10 May 2013 10:41:04 +0000 (12:41 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 10 May 2013 22:02:54 +0000 (00:02 +0200)
Fix switch handling for case KEY_TYPE_SWIFT, add break after the
case to prevent fall through into KEY_TYPE_S3 case.

CID 1019563 Missing break in switch (CWE-484)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_user.cc

index 1d998e2b33829d25d1270a93574ccabd3c128867..b160ff87444c89df3bb50c659fed8099218fcafb 100644 (file)
@@ -716,6 +716,7 @@ int RGWAccessKeyPool::generate_key(RGWUserAdminOpState& op_state, std::string *e
         set_err_msg(err_msg, "existing swift key in RGW system:" + id);
         return -EEXIST;
       }
+      break;
     case KEY_TYPE_S3:
       if (rgw_get_user_info_by_access_key(store, id, duplicate_check) >= 0) {
         set_err_msg(err_msg, "existing S3 key in RGW system:" + id);