]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Prevent wrongly privilege escalation of a context
authorXueChendi <chendi.xue@intel.com>
Wed, 3 Jul 2013 14:20:32 +0000 (22:20 +0800)
committerXueChendi <chendi.xue@intel.com>
Mon, 8 Jul 2013 07:00:34 +0000 (15:00 +0800)
commitca0e7295f44235c7d64954a225a172718a074dd8
tree1c290f0d2cff5cb4298e72c74d1f1a0d7663da97
parentfaffe83d88276633fb701996b0e44f34b7a2daa0
Prevent wrongly privilege escalation of a context

Current codes in create_volume() may exists a scenario that
a context which is not elevated but after it fails in volume
creation, it becomes elevated. This patch saves original
context, so that if it fails in volume creation simply use the
original context for further scheduling.

Fix bug:1187076

Change-Id: I2822b1612ec741209b278fc65f18d0f8f3243e0a
cinder/context.py
cinder/tests/test_volume.py
cinder/volume/manager.py