Skip to content

Commit

Permalink
rgw: require mfa only if mfa status actually changes
Browse files Browse the repository at this point in the history
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
  • Loading branch information
yehudasa committed Mar 23, 2018
1 parent 2255c82 commit 3e14ca6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,10 @@ void RGWSetBucketVersioning::execute()
if (op_ret < 0)
return;

bool cur_mfa_status = (s->bucket_info.flags & BUCKET_MFA_ENABLED) != 0;

mfa_set_status &= (mfa_status != cur_mfa_status);

if (mfa_set_status &&
!s->mfa_verified) {
op_ret = -ERR_MFA_REQUIRED;
Expand Down

0 comments on commit 3e14ca6

Please sign in to comment.