summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Courtaut <christophe.courtaut@gmail.com>2013-07-01 14:57:17 +0200
committerYehuda Sadeh <yehuda@inktank.com>2013-07-10 09:16:54 -0700
commit54ee2dc80ed032c286546da51442340ec9991cdf (patch)
tree52297527cd283fc966a628372162e1af7bde17af
parent47852c263831707fff1570317a7446b0700c5962 (diff)
downloadceph-54ee2dc80ed032c286546da51442340ec9991cdf.tar.gz
rgw: Fix return value for swift user not found
http://tracker.ceph.com/issues/1779 fixes #1779 Adjust the return value from rgw_get_user_info_by_swift call in RGW_SWIFT_Auth_Get::execute() to have the correct return code in response. (cherry picked from commit 4089001de1f22d6acd0b9f09996b71c716235551)
-rw-r--r--src/rgw/rgw_swift_auth.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc
index b0be5d45938..d0987e10333 100644
--- a/src/rgw/rgw_swift_auth.cc
+++ b/src/rgw/rgw_swift_auth.cc
@@ -181,7 +181,10 @@ void RGW_SWIFT_Auth_Get::execute()
user_str = user;
if ((ret = rgw_get_user_info_by_swift(store, user_str, info)) < 0)
+ {
+ ret = -EACCES;
goto done;
+ }
siter = info.swift_keys.find(user_str);
if (siter == info.swift_keys.end()) {