New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luminous: user creation can overwrite existing user even if different uid is given #18436

Merged
merged 1 commit into from Oct 27, 2017

Conversation

Projects
None yet
2 participants
@theanalyst
Member

theanalyst commented Oct 20, 2017

rgw: RGWUser::init no longer overwrites user_id
if an admin op specifies a user_id and does not find a user with that
id, but does find a user based on a later field (email, access key,
etc), RGWUser::user_id will be overwritten with the existing user's id

when this happens on 'radosgw-admin user create', RGWUser::execute_add()
will modify that existing user, instead of trying to create a new user
with the given user_id (and failing due to the conflicting email,
access key, etc)

by preserving the original user_id (when specified), this uid conflict
is detected in RGWUser::check_op() and a "user id mismatch" error is
returned

Fixes: http://tracker.ceph.com/issues/21685

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 4e65c9e)

@theanalyst theanalyst self-assigned this Oct 20, 2017

@theanalyst theanalyst added this to the luminous milestone Oct 20, 2017

@theanalyst

This comment has been minimized.

Show comment
Hide comment
@theanalyst

theanalyst Oct 27, 2017

Member

Passed rgw suite at http://tracker.ceph.com/issues/21830#note-8 is this ok to merge?

Member

theanalyst commented Oct 27, 2017

Passed rgw suite at http://tracker.ceph.com/issues/21830#note-8 is this ok to merge?

@theanalyst theanalyst requested review from mattbenjamin and cbodley Oct 27, 2017

@theanalyst theanalyst merged commit 4a74a41 into ceph:luminous Oct 27, 2017

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment